cancel
Showing results for 
Search instead for 
Did you mean: 

Use of sub process (process-state)

bch
Champ in-the-making
Champ in-the-making
Hi,

I try to use a sub-process in my process. Per example :


   <process-state name="ProcessState1">
      <sub-process name="sub-process"/>
        
      <transition name="toEnd" to="end">
        </transition>
   </process-state>


<?xml version="1.0" encoding="iso-8859-1"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="sub-process">

     <swimlane name="EngineeringGroup">
           <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
              <pooledactors>GROUP_engineering</pooledactors>              
           </assignment>  
     </swimlane>
     <swimlane name="initiator">
     </swimlane>

     <start-state name="StartSub">
        <task name="wfbx:StartSub" swimlane="initiator">
        </task>

        
        <transition name="Transition1" to="CoucouTask">

        </transition>
     </start-state>

   <end-state name="EndSub"/>

   <task-node name="CoucouTask">
      <task name="wfbx:CoucouTask" swimlane="EngineeringGroup">

        </task>

           <transition name="Transition1" to="EndSubPotts">

        </transition>
   </task-node>

</process-definition>

But, I have an error when I start the sub-process :
17:15:42,033 ERROR [org.alfresco.web.ui.common.Utils] A system error happened during the operation: Mandatory task properties have not been provided: {http://www.alfresco.org/model/bpm/1.0}package
org.alfresco.service.cmr.workflow.WorkflowException: Mandatory task properties have not been provided: {http://www.alfresco.org/model/bpm/1.0}package

My sub-process is not linked to a document. How to assign to the sub-process the document used in the parent process ?

Thank you
9 REPLIES 9

mrogers
Star Contributor
Star Contributor
You need to give the workflow an an empty package.

bch
Champ in-the-making
Champ in-the-making
Thanks for your response.

Where can I do that ?

jayjayecl
Confirmed Champ
Confirmed Champ

bch
Champ in-the-making
Champ in-the-making
Hi,

Thanks for your help !

I have found an other solution ! My goal is to have the same joined documents in the parent process and in the sub process. I have added in my parent process :


   <process-state name="ProcessState1">
      <sub-process name="wfbx:sub-process"></sub-process>
      <variable name="bpm_package"/>

      <transition name="" to="end">
        </transition>
   </process-state>

jayjayecl
Confirmed Champ
Confirmed Champ
Could you provide us with your full process_definition ?
I don't get where is this <process-state> … </process-state>  included in your workflow definition.
Moreover, I don't understand how just adding <variable name="bpm_package"> could set a sub-process variable.

I'd be glad to run some tests about subprocesses.

Regards,

bch
Champ in-the-making
Champ in-the-making
Hi,

We have a product that permits you to generate alfresco model, workflow… on Alfresco. We works actually on Alfresco 3. If you are interested, you can find more informations here : http://www.bluexml.com

For my example, my parent process is :


<?xml version="1.0" encoding="iso-8859-1"?>

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

   <swimlane name="initiator">
   </swimlane>

   <start-state name="Start">
      <task name="wfbx:Start" swimlane="initiator">
      </task>

      <transition name="Transition1" to="ProcessState1">
      </transition>
   </start-state>

   <node name="Submit">
       …
   </node>

   <process-state name="ProcessState1">
      <sub-process name="wfbx:sub-process" />
      <variable name="bpm_package" />

      <transition name="Submit" to="Submit">
      </transition>
   </process-state>

       …

</process-definition>


And my sub process is :


<?xml version="1.0" encoding="iso-8859-1"?>

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

   <swimlane name="EngineeringGroup">

      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>GROUP_engineering</pooledactors>
      </assignment>
   </swimlane>
   <swimlane name="initiator">
   </swimlane>

   <start-state name="StartSub">
      <task name="wfbx:StartSub" swimlane="initiator">
      </task>


      <transition name="Transition1" to="HelloTask">

      </transition>
   </start-state>

   <end-state name="EndSub" />

   <task-node name="HelloTask">
      <task name="wfbx:HelloTask" swimlane="EngineeringGroup">
      </task>


      <transition name="Transition1" to="EndSub">
      </transition>
   </task-node>

</process-definition>

salmon
Champ in-the-making
Champ in-the-making
Is there a way to define sub-processes in workflows using BlueXML Developer Studio? Can you point me to some example / tutorial?

Thanx in advance.

bch
Champ in-the-making
Champ in-the-making
Hi,

For the actual version, it's not possible but we work a new version called S-IDE (Sustainable Integrated Development Environment). This version permits to use sub-process. We have tested it and it's now usable.

We think that S-IDE will be published in June.

Thanks

Benjamin

jck
Champ in-the-making
Champ in-the-making
SIDE-Labs has been released in GPL v3 during 2009 summer. It's a set of graphical tools to develop Alfresco applications in a quickier and easier way than usual xml programing.
You can design sub processes and reuse them in many ways in your application. Moreover, you can integrate workflows and forms, also designed through a graphical tool, to build paperless procedures.

SIDE-Labs is available at http://www.side-labs.org

JC