I need to make a new document and attach it to currently running workflow. So far i made a file and placed it to Some Folder. In next step of workflow i don't see that this file is attached to workflow. I've been trying to attach this file to wf, but with no success. The code is shown bellow
<transition to="" name="test">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var dest = companyhome.childByNamePath("User Homes");
var file = dest.createFile("file_name");
file.save();
</script>
</action>
</transition>
I've searched this forum but with no succes. Does anyone knows how to implement this?