Author |
Message
|
faiiq |
Posted: Thu Feb 14, 2008 2:02 am Post subject: Deleting Work Item from Worklist |
|
|
 Newbie
Joined: 16 Jan 2008 Posts: 9 Location: Pakistan
|
I'm using MQ Workflow Client 3.5. I have a worklist in FMCGRP and there are many Work Items in that list. Most of these items are too old that I don't want them now or they are in error condition etc. Now I want to clear the worklist of all items but can't seem to find any way.
At least I couldn't find such way in Workflow Client despite looking through all the documentation I had. The closest thing I could find was the delete() API call for the work item, but I'm sure there must way other than coding. I'm new to MQ Series so its possible I'm skipping some vital things. I've also gone through this forum but couldn't find anything saving me. [though there were few posts telling that Fat client may do the job but I don't really know how to invoke fat client :s]
I'll appreciate if anyone tells me how to clear a worklist of all items, or at least a way to delete items one by one.
Regards,
Faisal |
|
Back to top |
|
 |
faiiq |
Posted: Thu Feb 14, 2008 3:47 am Post subject: |
|
|
 Newbie
Joined: 16 Jan 2008 Posts: 9 Location: Pakistan
|
I just found out that if I take ownership and Force Finish a work item its automatically deleted by cleanup server probably. But that doesn't seem the best solution of I have more than a thousand work items. Also if the state of a work item is CheckedOut I can't take ownership of it, and can't Force Finish [Get FMC_API_ERROR_WRONG_STATE error message].
So the problem still remains. Any solution anyone? |
|
Back to top |
|
 |
jmac |
Posted: Thu Feb 14, 2008 6:05 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Firstly, you should figure out why you have these old workitems that are in the IN ERROR state. Hopefully, we are talking about a development and not a production system.
The best way to do this is to write a simple utility that will retrieve the workitems based on your filter criteria, then ASSUMING you really want to get rid of them all, you can First do a CancelCheckout on items in a CHECKEDOUT state, and the ForceFinish those, and you can ForceFinish any that are in a ready state.
Be AWARE that IF this is a production system, you are going to possibly pull the rug out from under any users currently working on the system.
One other thing 3.5 is out of support, you should upgrade. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
faiiq |
Posted: Thu Feb 14, 2008 10:50 am Post subject: |
|
|
 Newbie
Joined: 16 Jan 2008 Posts: 9 Location: Pakistan
|
yeah that is a development server, and those "InError" items are the one which went into error but we didn't Force Restart/Start them. And the reason I'm deleting everything is to make the system ready for production
So basically I have to write a utility to achieve the desired result [delete all], and this cannot be achieved through some existing client interface. Thanks a lot for your help. I'll do it and (possibly) come here again in case of any other problem This forum sure is a nice place to get some help regarding MQ. |
|
Back to top |
|
 |
faiiq |
Posted: Fri Feb 15, 2008 4:34 am Post subject: |
|
|
 Newbie
Joined: 16 Jan 2008 Posts: 9 Location: Pakistan
|
Another problem here...
I was coding for the utility to delete work items in java. I was getting an exception at agent.setConfigurationID/agent.setName
Here is some of the code
String agentName = "MQWFAGENT";
String configID = "FMC";
Agent agent = new Agent();
agent.setLocator(Agent.LOC_LOCATOR);
agent.setConfigurationID(configID);
agent.setName(agentName);
for this code i'm getting the following exception
java.lang.NullPointerException
at com.ibm.workflow.catalog.FmcProfile.loadProfile(FmcProfile.java:101)
at com.ibm.workflow.catalog.FmcProfile.CreateInstance(FmcProfile.java:64)
at com.ibm.workflow.catalog.FmcProfile.GetInstance(FmcProfile.java:398)
at com.ibm.workflow.api.Agent.setConfigurationID(Agent.java:252)
at HelloApplication.main(HelloApplication.java:80)
If i comment out agent.setConfiguration, i get an exception in agent.setName
java.lang.NullPointerException
at com.ibm.workflow.catalog.FmcProfile.loadProfile(FmcProfile.java:101)
at com.ibm.workflow.catalog.FmcProfile.CreateInstance(FmcProfile.java:64)
at com.ibm.workflow.catalog.FmcProfile.GetInstance(FmcProfile.java:398)
at com.ibm.workflow.api.Agent$LocLocator.locate(Agent.java:62)
at com.ibm.workflow.api.Agent.setName(Agent.java:200)
at HelloApplication.main(HelloApplication.java:81)
Agent Name [MQWFAGENT] and ConfigurationID [FMC] are correct and being used in another project which is working perfectly fine.
I'm using fmcjapi.jar file in my project. Also JRE version is 1.4 at the moment [yeah i know its pretty old ] but I don't think that would be the reason. Someone help me plz... |
|
Back to top |
|
 |
hos |
Posted: Fri Feb 15, 2008 4:50 am Post subject: |
|
|
Chevalier
Joined: 03 Feb 2002 Posts: 470
|
If you want to get rid of your workitems fast and efficient, terminate and delete all related process instances. |
|
Back to top |
|
 |
jmac |
Posted: Fri Feb 15, 2008 5:34 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Now that I know exactly what you are doing, I would say you should use Volker's suggestion, to delete all the instances... OR MAYBE, simply remove the configuratin and then build a new one... This way you will start with a brand new runtime DB. You probably want to do an EXPORT ALL of your BTDB prior to removing the configuration. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
faiiq |
Posted: Tue Feb 19, 2008 5:28 am Post subject: |
|
|
 Newbie
Joined: 16 Jan 2008 Posts: 9 Location: Pakistan
|
Thanks a lot guys for your support. Seems like my issue is solved with the help of above two replies  |
|
Back to top |
|
 |
|