ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » Work Item States

Post new topic  Reply to topic
 Work Item States « View previous topic :: View next topic » 
Author Message
kutulu2000
PostPosted: Fri Feb 03, 2006 10:00 am    Post subject: Work Item States Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
Ratan
PostPosted: Fri Feb 03, 2006 11:50 am    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

The workitem has to be assigned to user deleting it.
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
kutulu2000
PostPosted: Fri Feb 03, 2006 11:56 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
jmac
PostPosted: Fri Feb 03, 2006 4:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
kutulu2000
PostPosted: Sat Feb 04, 2006 4:36 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
jmac
PostPosted: Sat Feb 04, 2006 4:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
kutulu2000
PostPosted: Tue Feb 07, 2006 5:56 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » Work Item States
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.