AnsweredAssumed Answered

bpm_package is null in adv. workflow

Question asked by kbootz on Aug 28, 2009
Latest reply on Sep 10, 2009 by kbootz
I'm trying to start an advanced workflow and set corresponding content model values based on user initialization parameters. I'm debugging the AlfrescoJavaScript class and when it tries to read the bpm_package variable I either get an undefined value error OR the value of bpm_package is null.

What is the proper(Javascript) way to access the underlying workflow content in Alfresco Community 3.2? I've attached the start task below, if more information is needed please let me know.

Thanks

   <start-state name="start">
      <task name="wf:startTask" swimlane="initiator"/>
      <event type="task-create">
        <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
          <script>
            <variable name="wf_FileName" access="read" />
            <expression>
            bpm_package.children[0].properties["doc.filename"] = wf_FileName;

           </expression>
         </script>
        </action>     
     </event>
     <transition name="" to="testContinuation"></transition>
   </start-state>

Outcomes