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 » UPES question

Post new topic  Reply to topic Goto page Previous  1, 2
 UPES question « View previous topic :: View next topic » 
Author Message
jmac
PostPosted: Tue Apr 22, 2003 2:31 pm    Post subject: Reply with quote

Jedi Knight

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

You need code like this.

Code:
// pi is a pointer to the proper ProcessInstance
    InstanceMonitor piM = pi.obtainProcessMonitor(false);
    ActivityInstance[] ais = piM.activityInstances();
    // Now loop thru the ais[] and find the right activityinstance by
    // matching the ais[i].name()
 
    // once you have the right one simply issue force restart
    ais[i].forceRestart();

_________________
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
Ratan
PostPosted: Tue Apr 22, 2003 2:44 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

I dont have a code., but just wrote up a fragment of how i t would look like this:

Code:

Agent agent = new Agent();
     agent.setLocator(Agent.LOC_LOCATOR); 
     agent.setName(AgentName);
     service = agent.locate(WFGroup,WFSystem);
     service.logon(UserName, password);
     ProcessInstance[] PInstances;
     ProcessInstance pi;

     PInstances = service.queryProcessInstances(FILTER, SORTCRITERIA,null);
     //set the filter with NAME, so you will only get the process instance you require.
     pi = PInstance[0];

     ActivityInstance[] ainstances;
     ActivityInstance ai;
     
     InstanceMonitor im = pi.obtainProcessMonitor(boolean value);
     
     ainstances = im.activityInstances();
   
    for(i=0; i<= ainstances.length(); i++)
          { ai = ainstances[i];
              if ( ai.fullName().equals("YOUR ACTIVITY NAME")) // replace with your activity name
                   ai.forceRestart();
           }


-Ratan
Back to top
View user's profile Send private message Send e-mail
ucbus1
PostPosted: Wed Apr 23, 2003 4:50 am    Post subject: Reply with quote

Knight

Joined: 30 Jan 2002
Posts: 560

Thanks Ratan and Jmac.
Just to seek further clarification as this is going to be my first modification. The code you have sent ..Is it going to be a stand alone program or I have to include it in some other existing programs suppiled by MQ Workflow??

Also, it would be great help if any of you come across the reason for "all buttons NOT showing upon my webclient", I appreciate very much
Back to top
View user's profile Send private message Send e-mail
jmac
PostPosted: Wed Apr 23, 2003 5:33 am    Post subject: Reply with quote

Jedi Knight

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

Ucbus:

Vennys program will run standalone. His example is more complete than the snip of code I posted. You should be able to just compile and run.

As far as the Buttons not showing up. I would recommend you open a PMR with IBM, since as far as I know there is no reason for this behaviour.

When you get an answer from IBM, please post it here.

THANKS
_________________
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
kriersd
PostPosted: Wed Apr 23, 2003 6:08 am    Post subject: Reply with quote

Master

Joined: 22 Jul 2002
Posts: 209
Location: IA, USA

I have a question? When you clicked on the monitor (Movie Cam button) and it displayed your process model. Did you click on the upes activity icon that of which is in the running state. I am using the out of the box web client for version 3.3.0.3 and I can only see the force restart button if I click on the activity within the monitor view. I would guess this to be the same for everyone?
_________________
Dave Krier

IBM WebSphere MQ Workflow V3.4 Solution Designer
Back to top
View user's profile Send private message
jmac
PostPosted: Wed Apr 23, 2003 6:17 am    Post subject: Reply with quote

Jedi Knight

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

Dave:

Based on a previous post in this thread, I believe that the Activity Instance was displayed, as Ucbus indicated he could see the Input and Ouptut container tabs.

It seems like you are running the same version as Ucbus, so to me this seems to indicate that there might be a problem with the JSP that is being used to display the monitor.

Perhaps you could post the exact size of your Monitor.jsp file and UCBUS could compare and see if he has the latest version. At one point in time, for sure, there was a version that did not have the buttons, since the API (forceRestartwithContainer) is newer than the WebClient.
_________________
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
Ratan
PostPosted: Wed Apr 23, 2003 9:16 am    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

The program will be stand-alone, but you have to complete it (import statements and Java stuff). Also you have to specify values for FILTER, SORTCRITERIA, .... . I am not sure if all those methods are supported with your version on MQWF. Check the API and fix it as needed.

-Ratan.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » UPES question
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.