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 » Killing Process Instances

Post new topic  Reply to topic
 Killing Process Instances « View previous topic :: View next topic » 
Author Message
scar
PostPosted: Thu Jul 06, 2006 4:18 am    Post subject: Killing Process Instances Reply with quote

Centurion

Joined: 23 Jun 2004
Posts: 145

WF - 3.5

We have some 10000 Process instances running,i need to delete all of them whats the best way to do it other than selecting every thing and terminating them.
Back to top
View user's profile Send private message
jmac
PostPosted: Thu Jul 06, 2006 5:18 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

Write a quick java program to query those instances and then loop through and kill them
_________________
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
JKehoe
PostPosted: Fri Jul 07, 2006 11:34 am    Post subject: Reply with quote

Novice

Joined: 10 Aug 2005
Posts: 20

It just so happens that I wrote a method that does this... not the most elegant, but it gets the job done.

Code:

   public void terminateAllProcessInstances() throws MQWFException {
      try {
         ProcessInstance[] piList = service.queryProcessInstances(null,
               null, null);
         ProcessInstance pi;
         for (int i = 0; i < piList.length; i++) {
            pi = piList[i];
            System.out.println("Terminating: " + pi.name());
            pi.terminate();
         }

      } catch (FmcException e) {
         throw new MQWFException(
               "Exception caught while terminating all instances.", e);
      }
   }


-- MQWFException is my custom Exception
-- service is an instance of ExecutionService

good luck!

josh
Back to top
View user's profile Send private message
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 » Killing Process Instances
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.