[jboss-user] [JBoss jBPM] - Re: Invoking JBPM-3.2.2 Process from standalone java client
soumya_in
do-not-reply at jboss.com
Tue Jan 8 07:36:28 EST 2008
Hi All,
I was able to start a process from a standalone java client by following the given steps:-
1. Migrated JBPM Database schema to Oracle 10g using the given oracle script.
2.Redeployed the jbpm-console.war by making changes in the jbpm-console/web-inf/classes/hibernate-cfg.xml file to redirect the application to the oracle DB.
3. Executed the following piece of code-
| jbpmConfiguration = JbpmConfiguration.parseResource("default.jbpm.cfg.xml");
| JbpmContext jbpmContext=jbpmConfiguration.createJbpmContext();
| GraphSession gpsession=jbpmContext.getGraphSession();
| ProcessDefinition pdef=gpsession.findLatestProcessDefinition("<process-name>");
| System.out.println("PROCESS DEFINITION ID" + pdef.getId());
| ProcessInstance processInstance = new ProcessInstance(pdef);
| Token token = processInstance.getRootToken();
| token.signal();//starts a task
| jbpmContext.close();
|
Thanks,
Soumya.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117885#4117885
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117885
More information about the jboss-user
mailing list