AnsweredAssumed Answered

bpm_package in expression

Question asked by suleyman on Jul 17, 2007
Latest reply on Jul 17, 2007 by suleyman
Hi,

I'm trying to make a simple decision node in a workflow for days. For some reason bpm_package is not defined within expression tag.
This works:

   <decision name="testAction1">
      <event type="node-enter">
          <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
           <script>
             <variable name="ovs_BouwAan" access="read,write" />
             <expression>
             ovs_BouwAan=false;
              </expression>
           </script>
         </action>   
      </event>   
     <transition name="Actie2" to="DoAction2" />      
      <transition name="Actie1" to="DoAction1">
        <condition>#{ovs_BouwAan==true}</condition>
      </transition>    
   </decision>

This one doesn't work (bpm_package not defined error):
   <decision name="testAction1">
      <event type="node-enter">
          <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
           <script>
             <variable name="ovs_BouwAan" access="read,write" />
             <expression>
              var wf_Document = bpm_package.children[0];
              ovs_BouwAan = wf_Document.properties["omgevingsvergunning:bouwvergunning"];
             </expression>
           </script>
         </action>   
      </event>   
     <transition name="Actie2" to="DoAction2" />      
      <transition name="Actie1" to="DoAction1">
        <condition>#{ovs_BouwAan==true}</condition>
      </transition>    
   </decision>

Is it even prossible to read a property from a workflow resource document within a decision node? I have tried every possible way. Please help me with this error.

Outcomes