« Return to Thread: Instantiate process from application
Thank you very much Geeta! I'll give this a shot and let you know how it works for us.Luke R.
Marshfield Clinic
On Wed, Dec 17, 2008 at 12:59 PM, <gramani@...> wrote:
Hi Luke,
Here's some code sample from our application, which may help you:
ut = SharkInterfaceWrapper.getUserTransaction();
ut.begin();
/*"xpdl" below is a domain object for us which has info about package
defintion, verison etc. and getProcessManager() is * a method I will
reproduce below.
*/
WfProcessMgr processMgr = getProcessManager(sharkConnection, xpdl);
process= processMgr.create_process(null);
/*if you want to set process variables now, then you can do so now as
follows:*/
process.set_process_context(myContextMap);
process.start();
ut.commit();
Here's the getProcessManager method using our xpdl domain object:
private WfProcessMgr getProcessManager(SharkConnection sharkConnection,
Xpdl xpdl) throws Exception {
XPDLBrowser xpdlb = Shark.getInstance().getXPDLBrowser();
String procDefName =
xpdlb.getUniqueProcessDefinitionName(
sharkConnection.getSessionHandle(),
xpdl.getPackageId(),
(new Integer(xpdl.getVersion())).toString(),
xpdl.getProcessDefinitionId());
WfProcessMgr mgr = sharkConnection.getProcessMgr(procDefName);
return mgr;
}
Hope this helps,
regards,
Geeta
"Luke Rasmussen"
<lrasm274@...
om> To
shark@...
12/17/2008 05:09 cc
PM
Subject
[shark] Instantiate process from
Please respond to application
shark@...
--
We are trying to use the Shark API to instantiate (and interact with) a
process from an external Java application.
We looked in the Shark code (latest from CVS) and found the SharkTest area,
however it appeared to have a lot of extra calls. Our engine is running
and the process is loaded, so what is the minimum amount of code needed to
obtain a link to the server instance and instantiate it. Is this already
documented somewhere? Has anyone done this, and would you be willing to
post a simple example to the list?
Thanks in advance for your help.
Luke R.
Marshfield Clinic
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
You receive this message as a subscriber of the shark@... mailing list.
To unsubscribe: mailto:shark-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
You receive this message as a subscriber of the shark@... mailing list.
To unsubscribe: mailto:shark-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
« Return to Thread: Instantiate process from application
| Free embeddable forum powered by Nabble | Forum Help |