AnsweredAssumed Answered

Swimlanes

Question asked by suleyman on Jul 23, 2007
Latest reply on Sep 18, 2007 by rob562435
Hi,

I'm trying to make a script for selecting the actors automaticly and assigning them to the swimlanes.
Is het possible to write the usernames to variables and use the varibles at the swimlane assignment.

Like this:

<?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="urn:jbpm.org:jpdl-3.1"  name="ovs:ovaanvraag">

   <swimlane name="initiator" />
        
   <start-state name="start">
        <task name="ovs:startaanvraag" swimlane="initiator">
      <event type="node-leave">
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
               <script>                          
                  <expression>
                     
                     CoordinatorUser = "Bouw1";
                     
                     BouwUser = "Bouw1";
                     ReclameUser = "Reclame1";
                     InuitritUser = "Inuitrit1";
                     KapUser = "Kap1";
                     SloopUser = "Sloop1";                     
                  </expression>   
                  <variable name="CoordinatorUser" access="write" />
                  <variable name="BouwUser" access="write" />
                  <variable name="ReclameUser" access="write" />
                  <variable name="InuitritUser" access="write" />
                  <variable name="KapUser" access="write" />
                  <variable name="SloopUser" access="write" />                                    
               </script>
            </action>
         </event>       
        </task>
      <transition name="" to="ControleerAanvraag"></transition>
   </start-state>

  <swimlane name="coordinator">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
          <actor>#{people.getPerson(CoordinatorUser).properties["cm:userName"]}</actor>
      </assignment>
   </swimlane>
  
  <swimlane name="bouwadv">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
          <actor>#{BouwUser}</actor>
      </assignment>
   </swimlane>

………..

I'm getting the error message: org.mozilla.javascript.EcmaError: ReferenceError: "CoordinatorUser" is not defined. (AlfrescoScript#1)

Can anyone tell me why i'm getting this error.

Thanks in advance

Outcomes