Author |
Message
|
marcioalcantara |
Posted: Thu Sep 26, 2002 11:09 am Post subject: Process expiration is not working... HELP ME!!! |
|
|
Novice
Joined: 25 Jun 2001 Posts: 23
|
Hi, All.
Does anyone know how can I terminate a process instance after specific time?
I'm trying to use the DURATION OF PROCESS property from Diagram properties in MQWF Buildtime and, after the time specified, is created only a notification work item in the user work list, and the proces instance still running.
Thanks a lot.
Bye. |
|
Back to top |
|
 |
jmac |
Posted: Thu Sep 26, 2002 12:09 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
There is no way to get a ProcessInstance to Terminate based on a time limit.
Let's assume that your ProcessTemplate (ProcessModel) is "TEMP001"
What you need to do is to set your ProcessDuration (like you have already done) being sure that you specify a ProcessAdministrator. I would use a dummy user let's call them "PADMIN"
Now when the ProcessDuration has expired, the Notification will be sent to the ProcessAdministrator.
What you need is a job that runs on a cron, the periodically wakes up and loggs in as user "PADMIN" and then runs the ProcessInstanceNotificationList. Any process intstances on this list that were created from "TEMP001" can then be terminated using the API. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
marcioalcantara |
Posted: Thu Sep 26, 2002 12:34 pm Post subject: |
|
|
Novice
Joined: 25 Jun 2001 Posts: 23
|
Thank you very much for your support.
I'll try to do that.
Bye. |
|
Back to top |
|
 |
jmac |
Posted: Thu Sep 26, 2002 3:27 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
If you have a problem just post the specifics and I will see if I can help you. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
marcioalcantara |
Posted: Fri Oct 04, 2002 7:49 am Post subject: |
|
|
Novice
Joined: 25 Jun 2001 Posts: 23
|
Hi, John?
Do you have a java sample to query a proccess instance and terminate it?
I'm trying to make a Dummy test now but I don't have an example with me.
Thanks a lot. |
|
Back to top |
|
 |
jmac |
Posted: Fri Oct 04, 2002 8:01 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Here's a little snip of code:
Code: |
ProcessInstance [] pi = myExecService.queryProcessInstances(
"NAME = '<the pi name you want>'",
null,null)
if ( pi.length != 0 )
System.out.println("Could not find pi");
else
{
pi[0].terminate
}
|
_________________ John McDonald
RETIRED |
|
Back to top |
|
 |
marcioalcantara |
Posted: Tue Oct 15, 2002 9:46 am Post subject: |
|
|
Novice
Joined: 25 Jun 2001 Posts: 23
|
|
Back to top |
|
 |
|