Re: Get the first activity after starting a process
Manfred Hagenauer <[email protected]> Mon, 12 Sep 2005 09:40:32 +0200 (CEST)
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Organization | Softwarehaus Hartter |
| Message-ID | <[email protected]> |
Am So 11.09.2005 18:07, Ralf Schwarz <[email protected]> schrieb: > Hello, > > i try to figure out how to get the first activity after starting a process. > I start a process like that: > > WfProcess aProcess = > SharkConnection().createProcess(packageId(),processDefinitionId); > ... > aProcess.set_process_context(nv); > ... > aProcess.start(); > > So now i wonder if there is a way to get the first activity, the > process stops and f.e. a performer has to do some entries. > > Is that possible in any way? > Thanks in advance Of course, this is possible, when you have declared at least one activity of type "manual start" in your XPDL. In that case the Engine stops at this activity and waits for continueing the Workflow by the user. You can get the activity in a similiar way than this: WfActivity activity = null; WfAssignment[] ar = sc.getResourceObject().get_sequence_work_item(0); if ( ar.length > 1 ) { activity = ar[i].activity(); /* "Finish Aktivity: " + activity.getActivityKey() + " Name: " + activity.getActivityName() */ try { activity.complete(); } catch ( CannotComplete e ) { } } > > Best regards > Ralf Schwarz > Hope this helps LG M@nfred
message-footer.txt
(text/plain, 271 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws