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 » How do i get the name of the workitem ???

Post new topic  Reply to topic
 How do i get the name of the workitem ??? « View previous topic :: View next topic » 
Author Message
elvis_gn
PostPosted: Fri Feb 11, 2005 3:59 am    Post subject: How do i get the name of the workitem ??? Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

First I would like to know what i should enter in the fields,
[b]Path and file Name:
Command Line Parameters:[/b]
If i want to run a JAVA program................

How can i find the name of this workitem which is running this program....

If i do a workitem.name,it will return all the existing workitem names,isn't it ?????

I want to get only this name which is responsible for running this program.
Back to top
View user's profile Send private message Send e-mail
jmac
PostPosted: Fri Feb 11, 2005 5:06 am    Post subject: Re: How do i get the name of the workitem ??? Reply with quote

Jedi Knight

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

elvis_gn wrote:
First I would like to know what i should enter in the fields,
Path and file Name:

java.exe (full path if not in system path)
Quote:
Command Line Parameters:

classname (must be accessible via classpath

Note that this is not really a good way to run things, since you will be constantly creating processes and JVMs. This is a fat client implementation and is fine for experimenting or for a utilitity program, but you really should use a thin (Web) client implementation for client use.

Quote:
If i want to run a JAVA program................
How can i find the name of this workitem which is running this program....
If i do a workitem.name,it will return all the existing workitem names,isn't it ?????

No it gets you the name of the current workitem
I.E.

WorkItem [] wi = es.queryWorkItems(, , ,)
Any item name is wi[i].name();
_________________
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
elvis_gn
PostPosted: Fri Feb 11, 2005 5:37 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

I havent got it,sorry.....

If i have one processInstance.......even if 10 workitems are created they will call 10 instances of the common JAVA program.

All the 10 started JAVA programs on doing "es.queryWorkItems( , , ,)" will return the array of all 10 workItems.......

I dont want this.....i want each program to know which was the workItem which called it......so i mean it will return its unique workItem.

I hope i'm making sense.......
Back to top
View user's profile Send private message Send e-mail
jmac
PostPosted: Fri Feb 11, 2005 5:46 am    Post subject: Reply with quote

Jedi Knight

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

elvis_gn wrote:
If i have one processInstance.......even if 10 workitems are created they will call 10 instances of the common JAVA program.


I am assuming that you mean that you have one activity assigned to 10 different people. The flaw in your logic is that although only one of those workitems will ever run, there are indeed 10 workitems with the exact same Activity name and the exact same Process Instance Name.

I am not certain exactly what your question is.
_________________
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
elvis_gn
PostPosted: Fri Feb 11, 2005 6:08 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Ya, you have got my problem......but i think i have figured out a solution for myself.....How is this.....

My data container has a code field which is unique in each work item,so i can pass this as a command line parameter......

This program is actually for waiting on a queue....so i will get this same code value from the Queue message and compare will all the workitems to identify which my workitem is

is it possible to pass workItem name or some unique detail like that in the parameter field ???? This will help me pick the workItem easily
Back to top
View user's profile Send private message Send e-mail
Ratan
PostPosted: Fri Feb 11, 2005 10:20 am    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

Sound like you are doing a brain surgery on something this is pretty simple. If you can let us know what you are trying to achieve, may be we can figure out an easy solution.
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
elvis_gn
PostPosted: Fri Feb 11, 2005 8:56 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai


ok i'll explain...............

I've started a process instance with the help of a JAVA standalone application which is continuously waiting on a queue.....The data from the queue is made the input container....I can have same identical details coming for different workItems.

Once the instance is started,the first work item is running another JAVA program (Automatically) which should wait on another queue to get some new information related to the message from the first queue
i.e both the messages have to be compared to be sisters......

Now the problem was that,if i have same data in multiple workItems.....I would pick the message from 2nd queue,and do the compare to the first successfully compared workItem,and finish it,even though it was not the one which started this JAVA program....

I hope u got it......this is why i had to introduce a unique id for each workItem to identify workItems uniquely.....
Plz forget it if i'm not making any sense
Back to top
View user's profile Send private message Send e-mail
vennela
PostPosted: Sat Feb 12, 2005 10:33 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Quote:
I've started a process instance with the help of a JAVA standalone application which is continuously waiting on a queue.....The data from the queue is made the input container....I can have same identical details coming for different workItems.

How?
Using XML interface or using Java API's
Either way, you should be able to create (or get) the process instance name. That itself is your unique identifier.

Quote:
Plz forget it if i'm not making any sense

Infact it doesn't. Maybe you are missing some more pieces of it. I don't understand the whole concept of waiting on queues.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
elvis_gn
PostPosted: Sat Feb 12, 2005 11:06 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

MQSI is communicating to WorkFlow.....so i am getting data messages(message1, message2) on 2 queues (queue1, queue2) from MQSI.

Both the data messages must have arrived to continue the workflow at a point say "A"......

there is no unique field in the message2 in queue2 to identify it as the sister concern of the first message1 in queue1 that has arrived first,since they come from totally unrelated places.....

so if i start the workflow with message1 from queue1,i wait now at point "A" for message2 from queue2,now even if i have the processInstance Name,it dosent help me in identification of the correct sister message2.......

I could only figure out that i have to introduce a id in both messages.......
Back to top
View user's profile Send private message Send e-mail
vennela
PostPosted: Sun Feb 13, 2005 12:53 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Quote:
I could only figure out that i have to introduce a id in both messages.......


Looks like that's the only way.
If the messages are external and not controlled by workflow, then you have to find a way for yourself
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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 » How do i get the name of the workitem ???
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.