AnsweredAssumed Answered

Problem with sub-process

Question asked by epaquette75 on Dec 11, 2007
Good day,

I'm trying to call a second workflow has a sub-process and it's seem's to not work. What's the proper process to get this to work. Do I need to deploy both workflow in the console first? What's the proper way to have it to work in Alfresco.

Module A

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

<process-definition
  xmlns="urn:jbpm.org:jpdl-3.2"  name="moduleA">

   <swimlane name="initiator" />

   <start-state name="start">
      <task name="mainWorkflowTask" swimlane="initiator"/>
      <transition name="" to="ScreenApplicationLevel1"></transition>
   </start-state>

  <swimlane name="admin">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
          <actor>admin</actor>
      </assignment>
   </swimlane>

  <task-node name="ScreenApplicationLevel1">
      <task name="test" swimlane="admin"></task>
      <transition name="To test 1" to="test1"/>
   </task-node>

    <process-state name="test1">
      <sub-process name="moduleB" />
      <transition name="To End" to="End"></transition> 
    </process-state>
 
  <end-state name="End"></end-state>
  
</process-definition>

Module B

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

<process-definition
  xmlns="urn:jbpm.org:jpdl-3.2"  name="moduleB">
  
   <swimlane name="initiator" />
  
   <start-state name="start">
   <transition name="" to="task1"></transition>
   </start-state>

   <task-node name="task1">
      <task name="testPassEnd"/>
      <transition name="Pass end" to="end1"></transition>
   </task-node>
   
   <end-state name="end1"></end-state>
   <event type="process-end">
   <script>
   System.out.println("—————-pass end—————");
   </script>
   </event>
</process-definition>

Thanks in advance

Outcomes