Author |
Message
|
kutulu2000 |
Posted: Tue Jan 02, 2007 9:24 am Post subject: Query WorkItems by process context |
|
|
 Acolyte
Joined: 08 Nov 2005 Posts: 63 Location: Mexico
|
Hi,
I'm developing an application to relocate several bad workitems ( in error state ). This application must query workitems by process context.
filter = "PROCESS_CONTEXT = '" + processContext.trim() + "' AND STATE IN (READY)";
Integer umbral = new Integer(5);
WorkItem [] wi = null;
wi = servicioWF.queryWorkItems( filtro, null, umbral);
But I want to know if this is the best manner to query workitems using the process context and if the process context is a unique identifier for each work item.
Thanx for your time. _________________ #10 |
|
Back to top |
|
 |
jmac |
Posted: Tue Jan 02, 2007 10:44 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Since you set the Process Context, only you would know whether Process Context is unique or not.
Some other small issues...
1. Are you sure you can do a queryWorkItems with PROCESS_CONTEXT in the filter?
2. you indicate that these work items are in the INERROR state but your state filter says Ready? _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
kutulu2000 |
Posted: Tue Jan 02, 2007 11:07 am Post subject: |
|
|
 Acolyte
Joined: 08 Nov 2005 Posts: 63 Location: Mexico
|
Hi Jmac,
The query by process_context I hope I can do it . This is one of the ITStrings that specified the JavaDoc.
ITString
>>-+- DESCRIPTION------+---------------------------------------><
+- NAME-------------+
+- PROCESS_CATEGORY-+
+- PROCESS_CONTEXT--+
'- PROCESS_NAME-----'
You're right, I'm wrong in the state
As we say in Mexico, "se me chispoteó"
Here in the company, we work with workOrders. Since the workOrders travel along the workflow and create different workitems , generally I identify this workOrder by a dataMember of the Data Structure ( DESCRIPTION LIKE '*" + ot.trim() + "*' AND " +
"DESCRIPTION LIKE '*" + poliza.trim() + ), but this information isn't always unique. I want to find a unique identifier give by MQWorkflow to query the workitems, I can use the Process_Name, but this only works one time ( while the workOrder don't "walk" to the other program_activity and generate a different workitem ).
I'm trying using the process context, but can you tell me a better form?
I appreciate so much your help _________________ #10 |
|
Back to top |
|
 |
jmac |
Posted: Tue Jan 02, 2007 11:34 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Not sure what version you are looking at... but when I look at my environment which is 3.6.0.4, This is what I see:
ITString
>>-+- DESCRIPTION------+---------------------------------------><
+- NAME-------------+
+- PROCESS_CATEGORY-+
'- PROCESS_NAME-----'
I also ran a quick test, and I am unable to get PROCESS_CONTEXT to work in a workitem filter... I am close to 100% certain it would work in a Process Instance filter. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
kutulu2000 |
Posted: Tue Jan 02, 2007 1:39 pm Post subject: |
|
|
 Acolyte
Joined: 08 Nov 2005 Posts: 63 Location: Mexico
|
mmmmm, I see.
I'm using MQWorkflow v3.3.2, and this is what I see.
Do you think that I must still query the workitems by using Description Like .......?
Do you think that it's the only way?
Thanx. _________________ #10 |
|
Back to top |
|
 |
jmac |
Posted: Tue Jan 02, 2007 1:48 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
kutulu2000 wrote: |
I'm using MQWorkflow v3.3.2, and this is what I see.
|
OY This is way out of support. For support you must be on 3.5, or better yet get on 3.6 current version is 3.6.0.4.
Well if you want all the workitems that are in error why not just filter based on that state?
I really don't understand exactly what it is you want to do. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
kutulu2000 |
Posted: Tue Jan 02, 2007 2:27 pm Post subject: |
|
|
 Acolyte
Joined: 08 Nov 2005 Posts: 63 Location: Mexico
|
jajaja, yes Jmac, we're little obsolete.
I try to do this;
1.- I get a set of workitems in error state.
2.- I keep the container of each workitem.
3.- I eliminate them.
4.- I create the new workitems ( at the beggining of the flow).
5.- Checkin, Checkout to each workitem generated until advance at the correct station ( program activity).
I hope to have been clear, my english isn't very good.
Thanx _________________ #10 |
|
Back to top |
|
 |
jmac |
Posted: Tue Jan 02, 2007 4:04 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
OK... I see what you are doing. You want to "re-play" an existing instance up to the point of failure.
Is there some reason that you can not use the forceRestart2 API to fix your container so you don't need to replay it? I don't remember if forceResart2 was available in 332.
If I want to replay an instance I would do it as follows:
The best way to do this is to use an InstanceMonitor, but I do not recall if that was available in V332 or not. Check your javaDoc and see if that object is available. IF it is, then you can
1. get the instance monitor for the Instance in the failed state
2. Iterate through all of the activities and capture their input and output containers.
3. Run the instance from the beginning to put it back to the point of the error.
4. I would probably use forceFinish2 as opposed to checkout/checkin, but that's just me... what you say will work also.
BTW... your English is 1000% better than my Spanish
good luck. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
kutulu2000 |
Posted: Thu Jan 04, 2007 7:45 am Post subject: |
|
|
 Acolyte
Joined: 08 Nov 2005 Posts: 63 Location: Mexico
|
As always, I appreciate so much your help Jmac.
Let me try to implement this tips you tell me.
Thanx _________________ #10 |
|
Back to top |
|
 |
|