cancel
Showing results for 
Search instead for 
Did you mean: 

Integrate two workflows

robin
Champ in-the-making
Champ in-the-making
Hi All,

I am working with activiti and i have created two separate workflows.
I have a requirement in which the flow should happen like this: Start 1st workflow and in the mid-way the flow routes to second workflow, once the second workflow is over the flow should again come back to 1st workflow.
I have read about sub processes in activiti guide but that requires you to 'create' a workflow within another. I am looking forward to a solution in which i should be able to 'call' a workflow whilst being in another.
Request to help if anyone have any insight on this.

Regards,
Robin
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
If the second workflow starts and ends in the context of the first workflow then a sub-process is the way to go.

If, on the other hand, the second workflow is already running and you need your first workflow to "pass control" to the second workflow, or not necessarily pass control but at least give some data to the second workflow, then you should be able to do that with the API as long as the first workflow knows how to find the second workflow (e.g., it has the workflow ID or can get to it in some other way).

I can't help you with the Activiti-specific syntax at the moment, but conceptually, you'd have a wait-state in the first workflow and a wait-state in the second workflow. When the execution arrives at the first workflow's wait-state it would signal the wait-state in the second workflow. The second workflow processes and then calls back to the first workflow's wait-state to let it know to continue processing.

Seems like you could also do this with a message queue rather than having the two workflows talk directly to each other.

Hope that helps,

Jeff

potnurusrinivas
Champ in-the-making
Champ in-the-making
Hi All,
           
Step1: First of all I am creating a sample activity in that sample activity added  subprocess task .

Step2: In that subprocess take one UserTask.

Step3: Now generate the bpmn file like Process Definition File.

Step4: Now copy the code in below this tag.

          <subProcess id="subprocess1" name="Sub Process">

Step5: In Above tag ,what ever adding the subprocess  Use Cases (i.e.Example:–> UseCase 34 Iam doing) directly copy the bpmn process definition File.

Step6: Here to :

     <startEvent id="startevent1" name="1 Press Specialist" activiti:formKey="xxxxSmiley Tongueressspecialist_cun34" activiti:initiator="pressspecialist"></startEvent>

Step7: Upto </process> End tag.

Note: In this Way acitivity  is not generating  clearly.

Upto </process> End tag.





Regards,
Srinivasarao