Hola!Introduzco este post para saber si alguien me puede echar una mano porque me estoy volviendo loca.Estoy intentando añadir una aspecto que he definido en mi fichero model a un espacio para que después utilizando este aspecto el usuario pueda hacer diferentes cosas.He definido mi fichero EmisionConsModel.xml de la siguiente forma:
<model name="emcon:EmisionConsModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Emision Contratos Model</description>
<author></author>
<version>1.0</version>
<imports>
<!– Import Alfresco Dictionary Definitions –>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!– Import Alfresco Content Domain Model Definitions –>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<!– Introduction of new namespaces defined by this model –>
<!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>
<namespaces>
<namespace uri="EmisionConsModel.model" prefix="emcon"/>
</namespaces>
<types>
<!– Definicion de documentos administrativos relacionados con facturas –>
<type name="emcon:ContratosEmitidos">
<title>Contratos Emitidos</title>
<parent>cm:content</parent>
<properties>
<property name="emcon:fecha_contrato">
<title>Fecha emisión contrato</title>
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="emcon:fecha_caducidad">
<title>Fecha caducidad contrato</title>
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="emcon:estado">
<title>Estado Contrato</title>
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
</types>
<aspects>
<aspect name="emcon:EmisionCons">
<title>Espacio Emision_Contratos</title>
</aspect>
</aspects>
</model>
He definido mi fichero web-client-config-custom.xml como sigue:
<alfresco-config>
<config evaluator="string-compare" condition="Action Wizards">
<!– The list of transformers to show in the transform actions –>
<transformers>
<transformer name="application/rtf"/>
</transformers>
</config>
<config evaluator="string-compare" condition="Languages">
<languages>
<language locale="es_ES">Spanish</language>
</languages>
</config>
<config evaluator="string-compare" condition="Views">
<!– the views available in the client –>
<views>
<view-impl>org.alfresco.web.ui.common.renderer.data.RichListRenderer$DetailsViewRenderer</view-impl>
<view-impl>org.alfresco.web.ui.common.renderer.data.RichListRenderer$IconViewRenderer</view-impl>
<view-impl>org.alfresco.web.ui.common.renderer.data.RichListRenderer$ListViewRenderer</view-impl>
<view-impl>org.alfresco.web.bean.forums.ForumsBean$TopicBubbleViewRenderer</view-impl>
<!– default values for the views available in the client –>
<view-defaults>
<browse>
<!– allowable values: list|details|icons –>
<view>details</view>
<page-size>
<list>20</list>
<details>20</details>
<icons>20</icons>
</page-size>
</browse>
<forums>
<!– allowable values: list|details|icons –>
<view>list</view>
<page-size>
<list>20</list>
<details>20</details>
<icons>20</icons>
</page-size>
</forums>
<forum>
<!– allowable values: details –>
<view>details</view>
<page-size>
<details>20</details>
</page-size>
</forum>
<topic>
<!– allowable values: details|bubble –>
<view>bubble</view>
<sort-column>created</sort-column>
<!– allowable values: ascending|descending –>
<sort-direction>descending</sort-direction>
<page-size>
<bubble>5</bubble>
<details>20</details>
</page-size>
</topic>
</view-defaults>
</views>
</config>
<!– The config below shows how to incorporate the example model–>
<!– into the web client, for this to work you will need to –>
<!– rename example-model-context.xml.sample to example-model-context.xml –>
<config evaluator="node-type" condition="content">
<property-sheet>
<show-property name="author" show-in-edit-mode="false" show-in-view-mode="false" />
<show-property name="size" show-in-edit-mode="false" show-in-view-mode="false" />
<show-property name="mimetype" show-in-edit-mode="false" show-in-view-mode="false" />
<show-property name="modifier" show-in-edit-mode="false" show-in-view-mode="false" />
</property-sheet>
</config>
<config evaluator="aspect-name" condition="author">
<property-sheet>
<show-property name="author" show-in-edit-mode="false" show-in-view-mode="false"/>
</property-sheet>
</config>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="fraE:DocsAdmin" />
</content-types>
</config>
<config evaluator="node-type" condition="fraE:DocsAdmin">
<property-sheet>
<show-property name="title" show-in-edit-mode="false" show-in-view-mode="false" />
<show-property name="author" show-in-edit-mode="false" show-in-view-mode="false" />
<show-property name="size" show-in-edit-mode="false" show-in-view-mode="false" />
<show-property name="mimetype" show-in-edit-mode="false" show-in-view-mode="false" />
<show-property name="modifier" show-in-edit-mode="false" show-in-view-mode="false" />
<show-property name="cm:author" show-in-edit-mode="false" show-in-view-mode="false" />
<show-property name="fraE:id" />
<show-property name="fraE:date" />
<show-property name="fraE:type" />
<show-association name="fraE:relatedInvoices"
component-generator="AssociationWithLinksGenerator"
show-in-edit-mode="false"/>
<!– <show-association name="fraE:relatedInvoices" /> –>
</property-sheet>
</config>
<config evaluator="string-compare" condition="Action Wizards">
<subtypes>
<type name="fraE:DocsAdmin"/>
<type name="emfra:FacturasEmitidas"/>
<type name="emcon:ContratosEmitidos"/>
</subtypes>
<specialise-types>
<type name="fraE:DocsAdmin"/>
<type name="emfra:FacturasEmitidas"/>
<type name="emcon:ContratosEmitidos"/>
</specialise-types>
<aspects>
<aspect name="fraE:repoCertificados"/>
<aspect name="fraE:spaceEmpresa"/>
<aspect name="emfra:EmitirFras"/>
<aspect name="emcon:EmitirCons"/>
</aspects>
</config>
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="fraE:DocsAdmin" />
<type name="conE:DocsAdmin" />
</content-types>
<custom-properties>
<meta-data type="fraE:DocsAdmin" property="fraE:id" />
<meta-data type="fraE:DocsAdmin" property="fraE:date" />
<meta-data type="fraE:DocsAdmin" property="fraE:type" />
</custom-properties>
</advanced-search>
</config>
<config evaluator="node-type" condition="fra:facturas">
<property-sheet>
<show-property name="size"
display-label-id="size"
converter="org.alfresco.faces.ByteSizeConverter"
show-in-edit-mode="false" show-in-view-mode="false"/>
<show-property name="modifier" show-in-edit-mode="false" show-in-view-mode="false" />
<show-property name="ownable" show-in-edit-mode="false" show-in-view-mode="false" />
</property-sheet>
</config>
<config evaluator="node-type" condition="emfra:FacturasEmitidas">
<property-sheet>
<show-property name="emfra:id"/>
<show-property name="emfra:date"/>
<show-property name="emfra:cif"/>
<show-property name="emfra:email"/>
<show-property name="emfra:nbEmpresaEmisora" show-in-edit-mode="false" show-in-view-mode="true"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="emfra:CodigoEmision">
<property-sheet>
<show-property name="emfra:codigo" show-in-edit-mode="false" show-in-view-mode="false"/>
</property-sheet>
</config>
<!–
<config evaluator="aspect-name" condition="emcon:EmisionCons">
<property-sheet>
<show-property name="emcon:fecha_contrato"/>
<show-property name="emcon:fecha_caducidad"/>
<show-property name="emcon:estado"/>
</property-sheet>
</config>
–>
<config evaluator="node-type" condition="emcon:ContratosEmitidos">
<property-sheet>
<show-property name="emcon:fecha_contrato"/>
<show-property name="emcon:fecha_caducidad"/>
<show-property name="emcon:estado"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="emcon:EmisionCons">
<property-sheet>
<show-property name="emcon:EmiCons" show-in-edit-mode="false" show-in-view-mode="false"/>
</property-sheet>
</config>
<config evaluator="string-compare" condition="Advanced Search EmFra">
<advanced-search>
<content-types>
<type name="emcon:ContratosEmitidos" />
</content-types>
<custom-properties>
<meta-data type="emcon:ContratosEmitidos" property="emcon:fecha_contrato" />
<meta-data type="emcon:ContratosEmitidos" property="emcon:fecha_caducidad" />
<meta-data type="emcon:ContratosEmitidos" property="emcon:estado" />
</custom-properties>
</advanced-search>
</config>
<config evaluator="string-compare" condition="Advanced Search EmCon">
<advanced-search>
<content-types>
<type name="emcon:ContratosEmitidos" />
</content-types>
<custom-properties>
<meta-data type="emcon:ContratosEmitidos" property="emcon:fecha_contrato" />
<meta-data type="emcon:ContratosEmitidos" property="emcon:fecha_caducidad" />
<meta-data type="emcon:ContratosEmitidos" property="emcon:estado" />
</custom-properties>
</advanced-search>
</config>
</alfresco-config>
Hace referncia a otras etiquetas que también están definidas en sus correspondientes ficheros model. Y he añadido el fichero EmisionConsModel.xml a custom-model-contes.xml tal y como sigue:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Registration of new models –>
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<!– <value>alfresco/extension/incisModel.xml</value> –>
<!–<value>alfresco/extension/facturaRModel.xml</value> –>
<value>alfresco/extension/facturaModel.xml</value>
<value>alfresco/extension/fraExtensionModel.xml</value>
<value>alfresco/extension/EmisionFrasModel.xml</value>
<value>alfresco/extension/EmisionConsModel.xml</value>
</list>
</property>
</bean>
</beans>
El caso que cuendo intento añadir el aspecto al espacio a través de la interfaz, es decir, entro en el espacio voy a "Ver Detalles" y en acciones voy a "Ejecutar una acción", al intentar añadir el aspecto al espacio lo selecciono y cuando le doy a finish me muestra el siguiente error por la pantalla de alfresco: Please correct the errors below then click Finish.Failed to run Actions due to error: The aspect is invalid: {EmisionConsModel.model}EmitirConsEn log de alfresco tengo: 10:09:35,779 ERROR [org.alfresco.web.ui.common.Utils] Failed to run Actions due to error: The aspect is invalid: {EmisionConsModel.model}EmitirConsorg.alfresco.service.cmr.dictionary.InvalidAspectException: The aspect is invalid: {EmisionConsModel.model}EmitirCons at org.alfresco.repo.node.db.DbNodeServiceImpl.addAspect(DbNodeServiceImpl.java:554) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.alfresco.repo.transaction.SingleEntryTransactionResourceInterceptor.invokeInternal(SingleEntryTransactionResourceInterceptor.java:163) at org.alfresco.repo.transaction.SingleEntryTransactionResourceInterceptor.invoke(SingleEntryTransactionResourceInterceptor.java:138) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy7.addAspect(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy7.addAspect(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221) at $Proxy8.addAspect(Unknown Source) at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:301) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:154) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:154) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy7.addAspect(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy7.addAspect(Unknown Source) at org.alfresco.repo.action.executer.AddFeaturesActionExecuter.executeImpl(AddFeaturesActionExecuter.java:104) at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127) at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:592) at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:529) at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:391) at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:379) at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:600) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy22.executeAction(Unknown Source) at org.alfresco.web.bean.actions.RunActionWizard.finishImpl(RunActionWizard.java:101) at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:121) at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:118) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:227) at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:127) at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:580) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61) at javax.faces.component.UICommand.broadcast(UICommand.java:109) at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171) at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:662)Alguien tiene alguna idea de lo que puede estar pasando??Estuve revisando los ficheros de configuración y en principio no detecto ningún error…seguro que se me está escapando algo!!!Muchísimas gracias por vuestra ayuda.