AnsweredAssumed Answered

Problems with variables during workflow execution

Question asked by blackout on Jan 25, 2007
Latest reply on Jan 26, 2007 by davidc
I encountered problems using some Alfresco defined variables during workflow execution.

I wanted to create some folders at run time, the best way I found to do it was using code like this:
Node createFolder(string name)
and this:
Node createNode(string name, string type)
and I noticed that companyhome, userhome and initiatorhome were not working, so I thought to use bpm_context, and even this time I had a null reference!

The specific part of code where I used it was:
   <swimlane name="reception">
      <assignment actor-id="admin"/>
   </swimlane>

   <start-state name="start">
      <task name="wf:startGoFlow" swimlane="reception"/>
      <transition name="" to="updatePipeline">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
               var testFolder = companyhome.childByNamePath("Test Space");
               var prjFolder = testFolder.createFolder("Test Folder");
               prjFolder = prjFolder.childByNamePath("Test Folder");
               prjFolder.createFolder("Documents");
               prjFolder.createfolder("Random Folder");
            </script>
           </action>
        </transition>
   </start-state>

How can I manage this?

Another thing: can I add dinamically documents to the bpm_package? If yes, how?

Thanks again for your help!

Outcomes