Author |
Message
|
kathykea |
Posted: Fri Mar 08, 2002 2:05 pm Post subject: |
|
|
Newbie
Joined: 07 Mar 2002 Posts: 7
|
I am trying to query a WorkItem using the ExecutionService.queryWorkItems(String, String, Integer) method. Are there any good examples of filter strings anywhere? If I can, I would like to capture a specific WorkItem using the PersistentOid. |
|
Back to top |
|
 |
jmac |
Posted: Sat Mar 09, 2002 6:35 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
there is a method to get a workitem directly via PersistentOID, there is no query necessary.
_________________ John McDonald
RETIRED |
|
Back to top |
|
 |
JImmy |
Posted: Sun Mar 10, 2002 6:18 pm Post subject: |
|
|
Acolyte
Joined: 23 Feb 2002 Posts: 59 Location: Shanghai, China
|
Try:
Integer intNum = new Integer(10);
queryWorkItem("Name LIKE '*'", "NAME", intNum) |
|
Back to top |
|
 |
kathykea |
Posted: Mon Mar 11, 2002 7:22 am Post subject: |
|
|
Newbie
Joined: 07 Mar 2002 Posts: 7
|
Thanks John and Jimmy. John, I haven't actually tried PersistentOid(), but the documentation states that this method creates a representation of the WorkItem and is not able to access the Workflow Server. Once I have retrieved the WorkItem, I want to be able to apply the start() method. Maybe there is a better way to do this. Any suggestions? |
|
Back to top |
|
 |
jmac |
Posted: Mon Mar 11, 2002 9:20 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Kathy:
If you access the wi using PersistentOID from the Execution Server object you will most certainly be able to start the item.
GOOD LUCK
_________________ John McDonald
RETIRED |
|
Back to top |
|
 |
kathykea |
Posted: Tue Mar 12, 2002 7:01 am Post subject: |
|
|
Newbie
Joined: 07 Mar 2002 Posts: 7
|
Thanks John, it works just as you said. And thanks for your quick response, it was greatly appreciated. I'm sure you'll be hearing from me again as our project progresses. |
|
Back to top |
|
 |
cyl |
Posted: Tue Apr 02, 2002 4:02 am Post subject: |
|
|
Newbie
Joined: 01 Apr 2002 Posts: 1
|
Hello there,
Would you mind explaining in more detail how it can be achieved as I am new to MQWF?
Specifically, we are using the Web-client. I would like to allow a user to create a new process-instance and then automatically kick-start the work item (without going through the work item page again). Seems that this thread has somehow provided a solution. Could anyone explain which API should be called?
Thanks for your help in advance! |
|
Back to top |
|
 |
JImmy |
Posted: Tue Apr 02, 2002 5:29 pm Post subject: |
|
|
Acolyte
Joined: 23 Feb 2002 Posts: 59 Location: Shanghai, China
|
cyl:
Starting process instance and starting work items are different things.
You can using createAndStart API to create and then start the instance. And a work item can be automatically executed if you define the start condition to "automatic" in build time and you have a valid user logon to run time. |
|
Back to top |
|
 |
stubie |
Posted: Tue Apr 02, 2002 7:59 pm Post subject: |
|
|
Novice
Joined: 05 Nov 2001 Posts: 14 Location: Charlotte, NC
|
One way to do this is to override the createAndStartInstance command using your own custom handler. Once the instance is started, query workitems using a filter of "PROCESS_NAME = <the name of your instance>". From that list, checkout the item you want, and pass control to the Viewer to render the page for the workitem.
This assumes that the process starter will already be the owner of the workitem, but that can be arranged in the process template. |
|
Back to top |
|
 |
|