AnsweredAssumed Answered

BPMN guidance

Question asked by aoliver on Oct 24, 2012
Latest reply on Oct 26, 2012 by jbarrez
I have a BPMN question.  I currently have 2 distinct workflows; we'll call them Workflow1 and Workflow2.  Currently, Workflow1 is triggered by a spring-integration file poller.  When the file arrives in the polled directory, Workflow1 process instance is started.  Workflow2 uses a spring scheduler to wake up and look for a status in a database table.  Additionally, Workflow2 checks to see if it already ran today.  When the status is appropriate and the process has not run today, Workflow2 process instance is started.  These 2 workflows are independent of each other.  Also, Workflow1 and Workflow2 contain long-running tasks and are implemented using Receive/Wait tasks.

However, a new requirement is that after both Workflow1 and Workflow2 have been completed, Workflow3 (a new workflow) must be started.

I'm imagining that Workflow1 and Workflow2 should become either subprocesses or call activities and connected via parallel/join gateways and subsequently connecting to Workflow3 after the join, as such:


However, my queston is how to invoke Workflow1 and Workflow2 subprocesses/call activities independently and yet still join to invoke Workflow3 subprocess/call activity?  Should i create receive tasks for both Workflow1 and Workflow2 subprocesses/call activities that perform the file polling and database polling which, when conditions are met, will signal the subprocess to continue?  Or should i use a boundary event?  Or is there a more appropriate way to achieve this in BPMN?

Also, if these subprocesses are wrapped in a workflow, what would be the appropriate way to start the parent workflow?  Basically, when the parent workflow completes, it needs to run again.

Thank you for your expert assistance.