Author |
Message
|
kutulu2000 |
Posted: Fri Feb 03, 2006 10:00 am Post subject: Work Item States |
|
|
 Acolyte
Joined: 08 Nov 2005 Posts: 63 Location: Mexico
|
Hi, thanx again for your time.
I'm writing a program to evaluate if a workitem can be deleted. My code looks like this.
switch( arregloWorkItemsParaReubicar[i].processInstance().state().value()){
case ExecutionState._RUNNING:
System.out.println("El estado del ProcessInstance es RUNNING." );
if( arregloWorkItemsParaReubicar[i].state().value() == ExecutionState._READY){
arregloWorkItemsParaReubicar[i].transfer(servicio.userID());
arregloWorkItemsParaReubicar[i].delete();
}
break;
// Some evaluations more
}
The programming guide provides a diagram where you can find the workitems states and the state of his process instance. I evaluate first the state of the process instance and then the state of the workitem to execute a call to the delete() method. At this point I have the following exception
FmcException occured
RC : 507
Origin : e:\v332\src\fmcjcitm.cxx, line 1596
MessageText: FMC00507E Action not allowed
I want to know why I can't perform the delete of the workitem.
Thanx!! _________________ #10 |
|
Back to top |
|
 |
Ratan |
Posted: Fri Feb 03, 2006 11:50 am Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
The workitem has to be assigned to user deleting it. _________________ -Ratan |
|
Back to top |
|
 |
kutulu2000 |
Posted: Fri Feb 03, 2006 11:56 am Post subject: |
|
|
 Acolyte
Joined: 08 Nov 2005 Posts: 63 Location: Mexico
|
I transfer the workitem to the user that login, and then I try to call the delete() method.
Thanx _________________ #10 |
|
Back to top |
|
 |
jmac |
Posted: Fri Feb 03, 2006 4:52 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
If I am reading correctly... it looks like your workitem is in a RUNNING state. I don't beleive you can delete a workitem in the RUNNING state _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
kutulu2000 |
Posted: Sat Feb 04, 2006 4:36 am Post subject: |
|
|
 Acolyte
Joined: 08 Nov 2005 Posts: 63 Location: Mexico
|
Hi jmac and thanx.
The workitem is in Ready state and his process instance is in Running state. The state chart tells that you can call the delete() method if the work item is in Ready state and his process instance is in Running state. The code I post initially shows this procedure.
Thanx again. _________________ #10 |
|
Back to top |
|
 |
jmac |
Posted: Sat Feb 04, 2006 4:15 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
OK... I see that now.. sorry.... You should be able to delete the workitem
A quick search of the programming gude and I found this
Programming manual wrote: |
If the work item is in the Ready state and represents the only work associated with the activity instance and when the associated process instance is not Terminating or Terminated, then deletion is rejected. |
The error FMC507 indicates that this is the case for you... so you can not delete the workitem because it is the only one. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
kutulu2000 |
Posted: Tue Feb 07, 2006 5:56 am Post subject: |
|
|
 Acolyte
Joined: 08 Nov 2005 Posts: 63 Location: Mexico
|
Ok. So I must put the process instance in terminated state an then delete the workitem?
workitem.processInstance.terminate();
workitem.delete();
I will try this.
Thanx. _________________ #10 |
|
Back to top |
|
 |
|