cancel
Showing results for 
Search instead for 
Did you mean: 

Swimlanes

suleyman
Champ in-the-making
Champ in-the-making
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
20 REPLIES 20

rob562435
Champ in-the-making
Champ in-the-making
What might be missing is the assignment in the taskenode:
 <task-node name="mtConceptApproval">
  <task name="qcp:mtConceptApproval">
   <assignment actor-id="#{qcp_mtApprover.properties['cm:userName']}"/>
   <event type="task-create">
  …
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.