Author |
Message
|
mca |
Posted: Mon Apr 03, 2006 12:25 pm Post subject: Identifing Process Instances using Workflow API |
|
|
Disciple
Joined: 09 Mar 2005 Posts: 196
|
I have 2 instances of Workflow running with the same order no. Now we start 3rd instance for the same order no. and for it to proceed to next step, we need to check if the earlier two instances are done running. In all the 3 instances Source System variable value differs.
Can we do this uisng Workflow API? Like to check if there are any process instances running for that order no. except for the self.
Our business logic is if there are any running, then sleep for 10 mins and check again...if not proceed to second step.
Can anyone tell if we can do this using API? If so how?
Thanks,
MCA |
|
Back to top |
|
 |
jmac |
Posted: Mon Apr 03, 2006 12:56 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
If I am understanding you correctly, this should be no problem.... You simply check to see if the other 2 instances are running based on their names. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
rokual |
Posted: Mon Apr 03, 2006 12:58 pm Post subject: |
|
|
Apprentice
Joined: 07 Feb 2006 Posts: 26
|
Hi,
Can you be more specific on how to use the API?
thanks
R |
|
Back to top |
|
 |
rokual |
Posted: Mon Apr 03, 2006 3:19 pm Post subject: |
|
|
Apprentice
Joined: 07 Feb 2006 Posts: 26
|
Hi John,
Can you be more specific on your detail of using API for the scenario explained by MCA. Can you point us to any sample programs, if available?
For example, capturing all the instances that are running/suspended with same(similar) order numbers?
Thanks,
R |
|
Back to top |
|
 |
jmac |
Posted: Mon Apr 03, 2006 9:17 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Simplly use the queryProcessInstances with a filter and that should do it _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
hos |
Posted: Mon Apr 03, 2006 11:06 pm Post subject: |
|
|
Chevalier
Joined: 03 Feb 2002 Posts: 470
|
Hi,
you should use a ProcessContext value to logically group related process instances. It was designed to meet exactly your usage pattern. See the Programming Guide (CreateAndStart or Start process instances) how to use a process context. |
|
Back to top |
|
 |
|