12-25-2012 03:42 PM
<transition name="normal" to="Capture" >
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="girproxyvoting2_companyName" access="read"/>
<variable name="girproxyvoting2_meetingDate" access="read"/>
<variable name="bpm_package" access="read,write" />
<expression>
executionContext.setVariable("coordinator", person.properties.email.toString());
var coordinatorName = person.properties.firstName.toString() + " " + person.properties.lastName.toString();
executionContext.setVariable("coordinatorName",coordinatorName);
var monthString = new String((girproxyvoting2_meetingDate.getMonth() + 1));
if(girproxyvoting2_meetingDate.getMonth() < 9) monthString = '-0' + monthString;
else monthString = '-' + monthString;
var spaceName = girproxyvoting2_companyName + " (" + (girproxyvoting2_meetingDate.getYear() + 1900) + monthString + "-" + girproxyvoting2_meetingDate.getDate() + ")";
var parentNode = companyhome.childByNamePath("GDV/Open");
var workingCopySpace = parentNode.createFolder(spaceName);
// Copy
while(bpm_package.children.length > 0) {
var document = bpm_package.children[0];
document.copy(workingCopySpace);
document.remove();
}
// Add copied files to BPM package
for(var i = 0; i < workingCopySpace.children.length; i++) {
bpm_package.addNode(workingCopySpace.children[i]);
}
</expression>
</script>
</action>
05-22-2013 01:20 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.