As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
java.lang.IllegalStateException: Operation not allowed against node pending deletion. Check the node for aspect {http://www.alfresco.org/model/system/1.0}pendingDelete
<aspect name="rassleg:arg_corr"> <title>Argomenti correlati</title> <mandatory-aspects> <aspect>cm:taggable</aspect> </mandatory-aspects> </aspect> <aspect name="rassleg:doc_corr"> <title>Documenti correlati</title> <associations> <association name="rassleg:relatedDocuments"> <title>Documenti correlati</title> <source> <mandatory>false</mandatory> <many>true</many> </source> <target> <class>rassleg:base_type</class> <mandatory>false</mandatory> <many>true</many> </target> </association> </associations> </aspect>
… public class RuleTriggerBidirectionalAssoc extends RuleTriggerAbstractBase implements NodeServicePolicies.OnDeleteAssociationPolicy, NodeServicePolicies.OnCreateAssociationPolicy { Log log = LogFactory.getLog(RuleTriggerBidirectionalAssoc.class); public void onDeleteAssociation(AssociationRef nodeAssocRef) { log.info("Called onDeleteAssociation"); nodeService.removeAssociation(nodeAssocRef.getTargetRef(), nodeAssocRef.getSourceRef(), nodeAssocRef.getTypeQName()); } public void onCreateAssociation(AssociationRef nodeAssocRef) { log.info("Called onCreateAssociation"); nodeService.createAssociation(nodeAssocRef.getTargetRef(), nodeAssocRef.getSourceRef(), nodeAssocRef.getTypeQName()); } public void registerRuleTrigger() { log.info("Called registerRuleTrigger"); this.policyComponent.bindAssociationBehaviour(QName.createQName( NamespaceService.ALFRESCO_URI, "onCreateAssociation"), this, new JavaBehaviour(this, "onCreateAssociation")); this.policyComponent.bindAssociationBehaviour(QName.createQName( NamespaceService.ALFRESCO_URI, "onDeleteAssociation"), this, new JavaBehaviour(this, "onDeleteAssociation")); } }
<config evaluator="aspect" condition="rassleg:doc_corr"> <forms> <form> <field-visibility> <show id="rassleg:relatedDocuments" /> </field-visibility> <appearance> <field id="rassleg:relatedDocuments" label-id="label.avvproj-rassleg-relatedDocuments"> <control template="/com/avvproj/components/form/controls/association.ftl"> <control-param name="displayMode">items</control-param> <control-param name="showTargetLink">true</control-param> <control-param name="allowNavigationToContentChildren">false</control-param> <control-param name="startLocation">{doclib}</control-param> </control> </field> </appearance> </form> </forms> </config>