Versionado

cancel
Showing results for 
Search instead for 
Did you mean: 
nalvarez_colesc
Active Member II

Versionado

Muy buenos dias. En el dia de hoy mi consulta es referida a Versionado de documentos.

Nuestro alfresco se utiliza para almacenar documentos provenientes de un sistema llamado Firma Digital. El sistema basicamente funciona de la siguiente manera:

1)  Sube archivo base.

2) Sube Archivo firmado digitalmente por Escribano.

3) Sube Archivo firmado digitalmente por el Colegio de Escribanos.

Esto da como resultado 3 documentos distintos, cuando me gustaria manejarlos como un solo documento con 3 versiones distintas.

A su vez estos documentos son de un tipo personalizado, llamdo COLESCBA, el cual contiene metadatos propios del documento.

La idea en cuestion seria:

                     Utilizar un aspecto personalizado, por ejemplo llamado AuditableCol (ya esta creado y funciona ok), en el cual yo pueda en cada version cambiar las propiedades de dicho aspecto. Para que qeude mas claro, cada version con el aspecto AuditableCol, va a guardar:

Usuario:

Fecha:

Operación:

Módulo:

 

Que en cada version es diferente. Esto es posible ????? Esto es viable ???? Es recomendable ????

Sinceramente, estamos dando nuestros primeros pasos en aspectos, ya que habíamos comenzando mal (Armamos un modelo, el cual contenía datos que luego nos dimos cuentas que eran muy genéricos y trasversales a todos los documentos que nuestro Alfresco va a manejar en un futuro), y en esta etapa de replanteo empezamos a toparnos con estas inquietudes, dudas o errores....

Desde ya muchas gracias, saludos Nelson....

7 Replies
angelborroy
Alfresco Employee

Re: Versionado

Exactamente para eso se usan las versiones.

Hyland Developer Evangelist
nalvarez_colesc
Active Member II

Re: Versionado

Entiendo que es así Angel, pero me podrías ayudar o guiar un poco mas ? La cuestión es así, creo los aspectos, correctamente, los mismos los veo ok para poder asignarlos a documentos:

Al revisar los Archivos, estos tienen el aspecto cargado, pero al momento de editar las propiedades, no logro ver las que son propias de esos aspectos, solo veo las propias del documento:

Sabrias deirme si me falta algo, o realice algo mal ?????, cuando inicio alfresco no tengo ningun error al respecto, y en :

/opt/alfresco-community/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml

Defini los formularios para dichos aspectos, desde ya muchas gracias, saludos Nelson.

nalvarez_colesc
Active Member II

Re: Versionado

Angel, agrego un poco mas de info... Al asignarle un tipo al documento, ahora si veo las propiedades del aspecto.... Esto quiere decir que no puedo ver las propiedades del aspecto sino le asigno un modelo ??????

Como vemos en esta imagen, ademas de los metadatos del modelo que le asigne, tambien veo las del aspecto (Modulo y operacion)

angelborroy
Alfresco Employee

Re: Versionado

Depende de como hayas definido los formularios en share-config-custom.xml

Puedes adjuntarlo?

Hyland Developer Evangelist
nalvarez_colesc
Active Member II

Re: Versionado

Hola Angel, gracias por tu interes, te adjunto el archivo en cuestion, no sin antres consultarte:  Por lo que noto es que no me es posible ver las propiedades del aspecto asignado si no le indico un"tipo", esto es asi ??? necesita si o si un tipo para poder editar las propiedades del aspecto???? sin mas, te adjunto mi archivo

<alfresco-config>

<!-- Global config section -->
<config replace="true">
<flags>
<!--
Developer debugging setting to turn on DEBUG mode for client scripts in the browser
-->
<client-debug>false</client-debug>

<!--
LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
This flag automatically activates logging on page load.
-->
<client-debug-autologging>false</client-debug-autologging>
</flags>
</config>

<config evaluator="string-compare" condition="WebFramework">
<web-framework>
<!-- SpringSurf Autowire Runtime Settings -->
<!--
Developers can set mode to 'development' to disable; SpringSurf caches,
FreeMarker template caching and Rhino JavaScript compilation.
-->
<autowire>
<!-- Pick the mode: "production" or "development" -->
<mode>production</mode>
</autowire>

<!-- Allows extension modules with <auto-deploy> set to true to be automatically deployed -->
<module-deployment>
<mode>manual</mode>
<enable-auto-deploy-modules>true</enable-auto-deploy-modules>
</module-deployment>
</web-framework>
</config>

<!-- Disable the CSRF Token Filter -->
<!--
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
<filter/>
</config>
-->

<!--
To run the CSRF Token Filter behind 1 or more proxies that do not rewrite the Origin or Referere headers:

1. Copy the "CSRFPolicy" default config in share-security-config.xml and paste it into this file.
2. Replace the old config by setting the <config> element's "replace" attribute to "true" like below:
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
3. To every <action name="assertReferer"> element add the following child element
<param name="referer">http://www.proxy1.com/.*|http://www.proxy2.com/.*</param>
4. To every <action name="assertOrigin"> element add the following child element
<param name="origin">http://www.proxy1.com|http://www.proxy2.com</param>
-->

<!--
Remove the default wildcard setting and use instead a strict whitelist of the only domains that shall be allowed
to be used inside iframes (i.e. in the WebView dashlet on the dashboards)
-->
<!--
<config evaluator="string-compare" condition="IFramePolicy" replace="true">
<cross-domain>
<url>http://www.trusted-domain-1.com/</url>
<url>http://www.trusted-domain-2.com/</url>
</cross-domain>
</config>
-->

<!-- Turn off header that stops Share from being displayed in iframes on pages from other domains -->
<!--
<config evaluator="string-compare" condition="SecurityHeadersPolicy">
<headers>
<header>
<name>X-Frame-Options</name>
<enabled>false</enabled>
</header>
</headers>
</config>
-->

<!-- Prevent browser communication over HTTP (for HTTPS servers) -->
<!--
<config evaluator="string-compare" condition="SecurityHeadersPolicy">
<headers>
<header>
<name>Strict-Transport-Security</name>
<value>max-age=31536000</value>
</header>
</headers>
</config>
-->

<config evaluator="string-compare" condition="Replication">
<share-urls>
<!--
To locate your current repositoryId go to Admin Console > General > Repository Information:
http://localhost:8080/alfresco/s/enterprise/admin/admin-repositoryinfo

Example config entry:
<share-url repositoryId="622f9533-2a1e-48fe-af4e-ee9e41667ea4">http://new-york-office:8080/share/</share-url>
-->
</share-urls>
</config>

<!-- Document Library config section -->
<config evaluator="string-compare" condition="DocumentLibrary" replace="true">

<tree>
<!--
Whether the folder Tree component should enumerate child folders or not.
This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.
-->
<evaluate-child-folders>false</evaluate-child-folders>

<!--
Optionally limit the number of folders shown in treeview throughout Share.
-->
<maximum-folder-count>1000</maximum-folder-count>

<!--
Default timeout in milliseconds for folder Tree component to recieve response from Repository
-->
<timeout>7000</timeout>
</tree>

<!--
Used by "Manage Rules" -> "Add aspect" action.

If an aspect has been specified without a title element in the content model,
or you need to support multiple languages,
then an i18n file is needed on the Repo AMP/JAR extension side for the aspect to
be visible when creating rules:

custom_customModel.aspect.custom_myaspect.title=My Aspect

Used by the "Manage Aspects" action.

For the aspect to have a localised label add relevant i18n string(s) in a Share AMP/JAR extension:

aspect.custom_myaspect=My Aspect
-->
<aspects>
<!-- Aspects that a user can see -->
<visible>
<aspect name="cm:generalclassifiable" />
<aspect name="cm:complianceable" />
<aspect name="cm:dublincore" />
<aspect name="cm:effectivity" />
<aspect name="cm:summarizable" />
<aspect name="cm:versionable" />
<aspect name="cm:templatable" />
<aspect name="cm:emailed" />
<aspect name="emailserver:aliasable" />
<aspect name="cm:taggable" />
<aspect name="app:inlineeditable" />
<aspect name="cm:geographic" />
<aspect name="exif:exif" />
<aspect name="audio:audio" />
<aspect name="cm:indexControl" />
<aspect name="dp:restrictable" />
<aspect name="smf:customConfigSmartFolder" />
<aspect name="smf:systemConfigSmartFolder" />
<aspect name="publicable:documento" />
<aspect name="auditable:documento" />
</visible>

<!-- Aspects that a user can add. Same as "visible" if left empty -->
<addable>
</addable>

<!-- Aspects that a user can remove. Same as "visible" if left empty -->
<removeable>
</removeable>
</aspects>

<!--
Used by "Manage Rules" -> "Specialise type" action.

If a type has been specified without a title element in the content model,
or you need to support multiple languages,
then an i18n file is needed on the Repo AMP/JAR extension side for the type to
be visible when creating rules:

custom_customModel.type.custom_mytype.title=My SubType

Used by the "Change Type" action.

For the type to have a localised label add relevant i18n string(s) in a Share AMP/JAR extension:

type.custom_mytype=My SubType

Define valid subtypes using the following example:

<type name="cm:content">
<subtype name="custom:mytype" />
</type>

-->

<!-- DEFINICION DE MODELOS PROPIOS -->
<types>
<type name="cm:content">
<subtype name="boletin:documento" />
</type>


<type name="cm:content">
<subtype name="revista:documento" />
</type>


<type name="cm:content">
<subtype name="soin:documento" />
</type>

<type name="cm:content">
<subtype name="publicable:documento" />
</type>

<type name="cm:content">
<subtype name="auditable:documento" />
</type>

<!-- FIN DEFINICION DE MODELOS PROPIOS -->



<type name="cm:content">
<subtype name="smf:smartFolderTemplate" />
</type>

<type name="cm:folder">
</type>

<type name="trx:transferTarget">
<subtype name="trx:fileTransferTarget" />
</type>
</types>


<create-content>
<content id="boletin" mimetype="text/xml" label="Boletin Informativo" itemid="boletin:documento"/>
<content id="revista" mimetype="text/xml" label="Revista Notarial" itemid="revista:documento"/>
<content id="soin" mimetype="text/xml" label="SOIN" itemid="soin:documento"/>
<!-- <content id="publicable" mimetype="text/xml" label="PUBLICABLE" itemid="publicable:documento"/>
<content id="auditable" mimetype="text/xml" label="AUDITABLE" itemid="auditable:documento"/> -->
</create-content>


<!--
If set, will present a WebDAV link for the current item on the Document and Folder details pages.
Also used to generate the "View in Alfresco Explorer" action for folders.
-->
<repository-url>http://localhost:8080/alfresco</repository-url>

<!--
Google Docs™ integration
-->
<google-docs>
<!--
Enable/disable the Google Docs UI integration (Extra types on Create Content menu, Google Docs actions).
-->
<enabled>false</enabled>

<!--
The mimetypes of documents Google Docs allows you to create via the Share interface.
The I18N label is created from the "type" attribute, e.g. google-docs.doc=Google Docs&trade; Document
-->
<creatable-types>
<creatable type="doc">application/vnd.openxmlformats-officedocument.wordprocessingml.document</creatable>
<creatable type="xls">application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</creatable>
<creatable type="ppt">application/vnd.ms-powerpoint</creatable>
</creatable-types>
</google-docs>

<!--
File upload configuration
-->
<file-upload>
<!--
Adobe Flash™
In certain environments, an HTTP request originating from Flash cannot be authenticated using an existing session.
See: http://bugs.adobe.com/jira/browse/FP-4830
For these cases, it is useful to disable the Flash-based uploader for Share Document Libraries.
-->
<adobe-flash-enabled>true</adobe-flash-enabled>
</file-upload>
</config>


<!-- INICIO FORMULARIOS PARA SHARE -->

<config evaluator="model-type" condition="soin:documento">
<forms>
<form id="search">
<field-visibility>
<show id="soin:Cabezal" />
<show id="soin:Circular" />
<show id="soin:Año" />
<show id="soinSmiley Surprisedbjeto" />
<show id="soin:estado" />
</field-visibility>
<appearance>
</appearance>
</form>
</forms>
</config>

<config evaluator="node-type" condition="boletin:documento">
<forms>
<form id="search">
<field-visibility>
<show id="boletin:Numero" />
<show id="boletin:Año" />
<show id="boletin:Fecha" />
</field-visibility>
<appearance>
</appearance>
</form>
</forms>
</config>

<config evaluator="model-type" condition="revista:documento">
<forms>
<form id="search">
<field-visibility>
<show id="revista:Numero" />
<show id="revistaSmiley Frustratedeccion" />
<show id="revista:Año" />
<show id="revista:Titulo" />
<show id="revista:Autor" />
</field-visibility>
<appearance>
</appearance>
</form>
</forms>
</config>


<config evaluator="node-type" condition="publicable:documento">
<forms>
<form id="search">
<field-visibility>
<show id="publicable:Fecha" />
<show id="publicableSmiley Tongueublico" />
</field-visibility>

</form>
</forms>
</config>

<config evaluator="node-type" condition="auditable:documento">
<forms>
<form id="search">
<field-visibility>
<show id="auditable:Fecha" />
<show id="auditable:Usuario" />
<show id="auditableSmiley Surprisedperacion" />
<show id="auditable:Modulo" />
</field-visibility>

</form>
</forms>
</config>

<!-- INICIO FORMULARIOS DE BUSQUEDA AVANZADA -->

<config evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>
<forms>
<form labelId="Boletin"
descriptionId="Boletin Informativo">
boletin:documento
</form>

<form labelId="Revista"
descriptionId="Revista Notarial">
revista:documento
</form>

<form labelId="Soin"
descriptionId="SOIN">
soin:documento
</form>

<form labelId="Publicable"
descriptionId="Publicable">
publicable:documento
</form>

<form labelId="Auditable"
descriptionId="Auditable">
auditable:documento
</form>


</forms>
</advanced-search>
</config>

<!-- FIN FORMULARIOS DE BUSQUEDA AVANZADA -->

<!-- Custom DocLibActions config section -->
<config evaluator="string-compare" condition="DocLibActions">
<actionGroups>
<actionGroup id="document-browse">

<!-- Simple Repo Actions -->
<!--
<action index="340" id="document-extract-metadata" />
<action index="350" id="document-increment-counter" />
-->

<!-- Dialog Repo Actions -->
<!--
<action index="360" id="document-transform" />
<action index="370" id="document-transform-image" />
<action index="380" id="document-execute-script" />
-->

</actionGroup>
</actionGroups>
</config>

<!-- Global folder picker config section -->
<config evaluator="string-compare" condition="GlobalFolder">
<siteTree>
<container type="cm:folder">
<!-- Use a specific label for this container type in the tree -->
<rootLabel>location.path.documents</rootLabel>
<!-- Use a specific uri to retreive the child nodes for this container type in the tree -->
<uri>slingshot/doclib/treenode/site/{site}/{container}{path}?children={evaluateChildFoldersSite}&amp;max={maximumFolderCountSite}</uri>
</container>
</siteTree>
</config>

<!-- Repository Library config section -->
<config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
<!--
Root nodeRef or xpath expression for top-level folder.
e.g. alfresco://user/home, /app:company_home/st:sites/cm:site1
If using an xpath expression, ensure it is properly ISO9075 encoded here.
-->
<root-node>alfresco://company/home</root-node>

<tree>
<!--
Whether the folder Tree component should enumerate child folders or not.
This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.
-->
<evaluate-child-folders>false</evaluate-child-folders>

<!--
Optionally limit the number of folders shown in treeview throughout Share.
-->
<maximum-folder-count>500</maximum-folder-count>
</tree>

<!--
Whether the link to the Repository Library appears in the header component or not.
-->
<visible>true</visible>
</config>

<!-- Kerberos settings -->
<!-- To enable kerberos rename this condition to "Kerberos" -->
<config evaluator="string-compare" condition="KerberosDisabled" replace="true">
<kerberos>
<!--
Password for HTTP service account.
The account name *must* be built from the HTTP server name, in the format :
HTTP/<server_name>@<realm>
(NB this is because the web browser requests an ST for the
HTTP/<server_name> principal in the current realm, so if we're to decode
that ST, it has to match.)
-->
<password>secret</password>
<!--
Kerberos realm and KDC address.
-->
<realm>ALFRESCO.ORG</realm>
<!--
Service Principal Name to use on the repository tier.
This must be like: HTTP/host.name@REALM
-->
<endpoint-spn>HTTP/repository.server.com@ALFRESCO.ORG</endpoint-spn>
<!--
JAAS login configuration entry name.
-->
<config-entry>ShareHTTP</config-entry>
<!--
A Boolean which when true strips the @domain sufix from Kerberos authenticated usernames.
Use together with stripUsernameSuffix property in alfresco-global.properties file.
-->
<stripUserNameSuffix>true</stripUserNameSuffix>
</kerberos>
</config>

<!-- Uncomment and modify the URL to Activiti Admin Console if required. -->
<!--
<config evaluator="string-compare" condition="ActivitiAdmin" replace="true">
<activiti-admin-url>http://localhost:8080/alfresco/activiti-admin</activiti-admin-url>
</config>
-->

<config evaluator="string-compare" condition="Remote">
<remote>
<endpoint>
<id>alfresco-noauth</id>
<name>Alfresco - unauthenticated access</name>
<description>Access to Alfresco Repository WebScripts that do not require authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<identity>none</identity>
</endpoint>

<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<identity>user</identity>
</endpoint>

<endpoint>
<id>alfresco-feed</id>
<name>Alfresco Feed</name>
<description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
<connector-id>http</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<basic-auth>true</basic-auth>
<identity>user</identity>
</endpoint>

<endpoint>
<id>alfresco-api</id>
<parent-id>alfresco</parent-id>
<name>Alfresco Public API - user access</name>
<description>Access to Alfresco Repository Public API that require user authentication.
This makes use of the authentication that is provided by parent 'alfresco' endpoint.</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://localhost:8080/alfresco/api</endpoint-url>
<identity>user</identity>
</endpoint>
</remote>
</config>

<!--
Overriding endpoints to reference an Alfresco server with external SSO enabled
NOTE: If utilising a load balancer between web-tier and repository cluster, the "sticky
sessions" feature of your load balancer must be used.
NOTE: If alfresco server location is not localhost:8080 then also combine changes from the
"example port config" section below.
*Optional* ssl-config contains:
keystore for managing client key and certificate.
truststore for managing trusted CAs.
Used to authenticate share to an external SSO system such as CAS or
to make share talk to SSL layers that require client certificates.
Remove the ssl-config section if not required i.e. for NTLM.

NOTE: For Kerberos SSO rename the "KerberosDisabled" condition above to "Kerberos"

NOTE: For external SSO, switch the endpoint connector to "alfrescoHeader" and set
the userHeader value to the name of the HTTP header that the external SSO
uses to provide the authenticated user name.
NOTE: For external SSO, Share now supports the "userIdPattern" mechanism as is available
on the repository config for External Authentication sub-system. Add the following
element to your "alfrescoHeader" connector config:
<userIdPattern>^ignore-(\w+)-ignore</userIdPattern>
This is an example, ensure the Id pattern matches your repository config.
NOTE: For external SSO, Share now supports stateless (no Http Session or sticky session)
connection to the repository when using the alfrescoHeader remote user connector.
e.g. You can change endpoint config to use the faster /service URL instead of the
/wcs URL if you are using External Authentication and then remove sticky session config
from your proxy between Share and Alfresco. Note that this is also faster because Share
will no longer call the /touch REST API before every remote call to the repository.
-->

<!-- Security warning -->
<!-- For production environment set verify-hostname to true.-->
<!--
<config evaluator="string-compare" condition="Remote">
<remote>
<ssl-config>
<keystore-path>alfresco/web-extension/alfresco-system.p12</keystore-path>
<keystore-type>pkcs12</keystore-type>
<keystore-password>alfresco-system</keystore-password>

<truststore-path>alfresco/web-extension/ssl-truststore</truststore-path>
<truststore-type>JCEKS</truststore-type>
<truststore-password>password</truststore-password>

<verify-hostname>true</verify-hostname>
</ssl-config>

<connector>
<id>alfrescoCookie</id>
<name>Alfresco Connector</name>
<description>Connects to an Alfresco instance using cookie-based authentication</description>
<class>org.alfresco.web.site.servlet.SlingshotAlfrescoConnector</class>
</connector>

<connector>
<id>alfrescoHeader</id>
<name>Alfresco Connector</name>
<description>Connects to an Alfresco instance using header and cookie-based authentication</description>
<class>org.alfresco.web.site.servlet.SlingshotAlfrescoConnector</class>
<userHeader>SsoUserHeader</userHeader>
</connector>

<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfrescoCookie</connector-id>
<endpoint-url>http://localhost:8080/alfresco/wcs</endpoint-url>
<identity>user</identity>
<external-auth>true</external-auth>
</endpoint>

<endpoint>
<id>alfresco-feed</id>
<parent-id>alfresco</parent-id>
<name>Alfresco Feed</name>
<description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
<connector-id>alfrescoHeader</connector-id>
<endpoint-url>http://localhost:8080/alfresco/wcs</endpoint-url>
<identity>user</identity>
<external-auth>true</external-auth>
</endpoint>

<endpoint>
<id>alfresco-api</id>
<parent-id>alfresco</parent-id>
<name>Alfresco Public API - user access</name>
<description>Access to Alfresco Repository Public API that require user authentication.
This makes use of the authentication that is provided by parent 'alfresco' endpoint.</description>
<connector-id>alfrescoHeader</connector-id>
<endpoint-url>http://localhost:8080/alfresco/api</endpoint-url>
<identity>user</identity>
<external-auth>true</external-auth>
</endpoint>
</remote>
</config>
-->

<!-- Cookie settings -->
<!-- To disable alfUsername2 cookie set enableCookie value to "false" -->
<!--
<plug-ins>
<element-readers>
<element-reader element-name="cookie" class="org.alfresco.web.config.cookie.CookieElementReader"/>
</element-readers>
</plug-ins>

<config evaluator="string-compare" condition="Cookie" replace="true">
<cookie>
<enableCookie>false</enableCookie>
<cookies-to-remove>
<cookie-to-remove>alfUsername3</cookie-to-remove>
<cookie-to-remove>alfLogin</cookie-to-remove>
</cookies-to-remove>
</cookie>
</config>
-->
</alfresco-config>

angelborroy
Alfresco Employee

Re: Versionado

Te sobran estas lineas, ya que no aplican para los aspectos:

<type name="cm:content">
<subtype name="publicable:documento" />
</type>
<type name="cm:content">
<subtype name="auditable:documento" />
</type>

Por otra parte cuando defines el formulario para un aspecto, debes cambiar la condición. Algo así. 

<config evaluator="aspect" condition="publicable:documento">
<forms>
<form id="search">
<field-visibility>
<show id="publicable:Fecha" />
<show id="publicable:publico" />
</field-visibility>

Aqui tienes una explicación de la diferencia entre tipos y aspectos en la definición de formularios para Share:

Displaying aspect metadata | Alfresco Documentation 

De esta manera, solo con que un documento tengo el aspecto, veras los metadatos.

Hyland Developer Evangelist
nalvarez_colesc
Active Member II

Re: Versionado

Muchas gracias Angel por tu respuesta, y la complementaria documentacion, pude resolver lo que necesitaba.... Una vez mas gracias...