Author |
Message
|
DragonFist |
Posted: Tue Feb 24, 2004 9:34 am Post subject: workitem |
|
|
 Acolyte
Joined: 11 Nov 2003 Posts: 52
|
Suppose there are 10 workitems on the worklist. How do we know which workitems input or output container we are accessing. Is there a way to identify a particular workitem with some kind of id using Java API.
Thanks in Advance _________________ DragonFist |
|
Back to top |
|
 |
vennela |
Posted: Tue Feb 24, 2004 10:07 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
You should do some real simple programming to know this otherwise whatever we tell you you will not be able to get. I'll still try but then again...
A work list contains work items.
Each work item has an INPUT container and an OUTPUT container. Now what is your problem.
Some of the samples at
http://www.developer.ibm.com/tech/sampmq.html |
|
Back to top |
|
 |
manoj |
Posted: Tue Feb 24, 2004 10:39 am Post subject: |
|
|
 Master
Joined: 30 Jan 2002 Posts: 237 Location: Virgina
|
Hey Dragon,
There's a persistentOID associated with every workitem and this is unique. You can access this OID via the API call getPersistentOID().
Since u use java i am assuming that u use value objects (java beans) to map the workitem attributes and the input container, so map the OID also in u r java bean.
When a user cherry picks a workitem u 've to pass the correct OID to API setPersistentOID() so that the same workitem is reconstructed. Now u can call methods on that workitem to access the input/output containers.
One caution u 've to take is the OID might contain wild card charectors (e.g +) so if u use web interface and if u pass the OID as querystring to server u will 've to encode it.
Best of luck _________________ -manoj |
|
Back to top |
|
 |
dsim |
Posted: Tue Feb 24, 2004 7:01 pm Post subject: |
|
|
Acolyte
Joined: 11 Aug 2003 Posts: 67 Location: Toronto
|
Quote: |
Is there a way to identify a particular workitem with some kind of id using Java API |
Yes, one way is to use the name of the program assigned to the activity.
Dan |
|
Back to top |
|
 |
Ratan |
Posted: Fri Feb 27, 2004 8:48 am Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
Quote: |
Yes, one way is to use the name of the program assigned to the activity.
|
No, you cant use this, as there will be multiple Workitems for the same program derived from different Process Instances.
Manoj's solution is the way to go. _________________ -Ratan |
|
Back to top |
|
 |
dsim |
Posted: Fri Feb 27, 2004 9:56 pm Post subject: |
|
|
Acolyte
Joined: 11 Aug 2003 Posts: 67 Location: Toronto
|
Ratan,
It depends on how you read the initial post;
A single question that I believe was DF's intention:
- Supposing there are 10 different workitems on the worklist, is there a way to identify what are the input and output containers for particular workitem with some kind of id ?
Two distinct questions:
- Supposing there are 10 different workitems on the worklist, how do we know which workitems input or output container we are accessing ?
- Supposing there are 10 different workitems on the worklist, is there a way to identify a particular workitem with some kind of id using Java API ?
I replied as to the single question and I think the answer is right.
Dan |
|
Back to top |
|
 |
MaheshPN |
Posted: Tue Mar 23, 2004 7:39 am Post subject: |
|
|
 Master
Joined: 21 May 2003 Posts: 245 Location: Charlotte, NC
|
We are getting the object does not exist error and found it is because of '+' in oid.
Quote: |
One caution u 've to take is the OID might contain wild card charectors (e.g +) so if u use web interface and if u pass the OID as querystring to server u will 've to encode it.
|
Manoj, We are facing the same problem. What do u mean by encoding the OId? How we can do it? Can u give me an example please.
Anybody who has handled it, I would appreciate their comments.
Thanks,
-Mahesh |
|
Back to top |
|
 |
dsim |
Posted: Tue Mar 23, 2004 3:39 pm Post subject: |
|
|
Acolyte
Joined: 11 Aug 2003 Posts: 67 Location: Toronto
|
Mahesh,
I believe Manoj was talking about using the static methods of java.net.URLEncoder and java.net.URLDecoder to encode/decode the object IDs when these IDs are used as URL parameters.
Dan |
|
Back to top |
|
 |
|