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.
<!– The following items allow to keep track of the different owners in the document –> <type name="sw:ownerhistoryitem"> <title>Owner history Item</title> <properties> <property name="sw:ownerusername"> <title>Username</title> <type>d:text</type> </property> <property name="sw:owningdate"> <title>Date of Ownership</title> <type>d:date</type> </property> </properties> </type> <aspect name="sw:ownerhistory"> <title>Playlist</title> <associations> <association name="sw:ownerhistoryitem"> <source> <mandatory>false</mandatory> <many>true</many> </source> <target> <class>sw:ownerhistoryitem</class> <mandatory>true</mandatory> <many>true</many> </target> </association> </associations> </aspect>
<event type="task-assign"> <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"> <script> //Adds versioning to the document to help in the workflow var actor = search.luceneSearch("@cm\\:userName:\"" + taskInstance.actorId + "\""); var props = new Array(2); props["sw:ownerusername"] = actor.properties["cm:userName"]; props["sw:owningdate"] = new Date().toGMTString() ; for (var i = 0; i < bpm_package.children.length; i++) { bpm_package.children[i].addAspect("sw:ownerhistory",props); bpm_package.children[i].save(); } </script> </action> </event>