07-15-2010 09:06 AM
var personNodeRef = personService.getPerson(admin);
NodeRef homespaceNodeRef = (NodeRef) nodeService.getProperty(personNodeRef, ContentModel.PROP_HOMEFOLDER);
NodeRef localeNoderef = document.getnodeRef;
filefolderservice.copy(localeNoderef,homespaceNoderef, "test");
copy.save();
<task name="wf:approvedTask" swimlane="initiator" />
<transition name="" to="end">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
// it should be here?
</script>
</action>
</transition>
</task-node>
07-15-2010 11:18 AM
<transition to="model:sometasknode" name="SomeAction">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
<script>
<import resource="classpath:alfresco/extension/workflows/MyCustomWorkflowLogic.js">
myCustomFunction(bpm_package.children[0], "FolderName");
</script>
</action>
</transition>
function myCustomFunction( doc, parameter) {
var destination = companyhome.childByNamePath("Sites/somesite/documentLibrary/");
var destination2 = userhome..childByNamePath(parameter);
doc.copy(destination);
doc.copy(destination2);
doc.properties["some:prop"]="A detail here";
// whatever else, ie. mail a person or whatever.
}
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.