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 » [SOLVED] lookup the first activity in certain process(java)

Post new topic  Reply to topic
 [SOLVED] lookup the first activity in certain process(java) « View previous topic :: View next topic » 
Author Message
Surfer
PostPosted: Wed May 04, 2005 11:11 am    Post subject: [SOLVED] lookup the first activity in certain process(java) Reply with quote

Apprentice

Joined: 14 Jun 2002
Posts: 31

I am using Workflow 3.4.
I need to know by using java what is the first activity in a process.
THank you in advance for your help.
Back to top
View user's profile Send private message Send e-mail
Ratan
PostPosted: Wed May 04, 2005 11:25 am    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

you have to get a list of Activity instances and control Connector instances. An Activity which does not have an incoming control connector is your first activity. Check the Java API.
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
Ratan
PostPosted: Wed May 04, 2005 11:42 am    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

go through these posts.

http://www.mqseries.net/phpBB2/viewtopic.php?t=12426&highlight=java+monitor

http://www.mqseries.net/phpBB2/viewtopic.php?t=11020&highlight=monitor+api
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
Surfer
PostPosted: Wed May 04, 2005 11:53 am    Post subject: How to lookup the first activity in certain process(java) Reply with quote

Apprentice

Joined: 14 Jun 2002
Posts: 31

Yes I an checking java API but can t find the way to check what is the incoming control instance.

ActivityInstance actINs[] = procInstances[ndx].obtainProcessMonitor(true).activityInstances();
if ( actINs != null)
for (int i = 0; i < actINs.length; i++)
{
System.out.println("instances name :" + actINs[i].fullName());
ControlConnectorInstance[] cci = actINs[i].obtainProcessInstanceMonitor(true).controlConnectorInstances();

}

Tnak you for your help
Back to top
View user's profile Send private message Send e-mail
jmac
PostPosted: Wed May 04, 2005 12:09 pm    Post subject: Reply with quote

Jedi Knight

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

What you are trying to do is non-trivial. I agree with what Ratan is saying that you will need to use the ControlConnector Instances. The trick is going to be to figure out which are your "start" activities, i.e those which have no incomming control connector. I have done similar things in the past so I am sure it can be done, you will just need to work thru a simple example.

Also, be aware, that it is possible for an instance to have multiple "start" activities.

GOOD LUCK

Ratan and I posted simultaneously.... but I agree exactly with what he is saying.
_________________
John McDonald
RETIRED


Last edited by jmac on Wed May 04, 2005 12:25 pm; edited 1 time in total
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 May 04, 2005 12:09 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

A Control Connector instance has a source activity and a target activity. Take the source activity and see if it is the target activity for another control connector. If so, take another control connector instance and get the source and target activities and repeat the process. You should end up with atleast one source activity which is not a target activity for any connectors. That is your first activity.
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
Surfer
PostPosted: Thu May 12, 2005 4:43 pm    Post subject: Hi Reply with quote

Apprentice

Joined: 14 Jun 2002
Posts: 31

Thank you soo much. I solved the problem by following your suggestion. It works very nice.
Thank you once again for your help.
Back to top
View user's profile Send private message Send e-mail
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 » [SOLVED] lookup the first activity in certain process(java)
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.