[jBPM Users] - Re: JBPM Java Task return value
by jbpmjboss11
Thanks!
I do understand my execution is ending. But not able to find it ... Let me send you my jpdl file and code. My example code for Java task is working fine in the same project ...
jpdl file
---------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Java code to start process...
---------------------------------------------------------------------------------------------------------------------------------------
public void intiateProcess(ValueInObj inputObj) {
try {
initialize();
deploymentId = repositoryService.createDeployment().addResourceFromClasspath("us/nj/state/dhs/njkids/jbpm/casecreationtrial.jpdl.xml").deploy();
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("input", new Holder(inputObj));
processInstance = executionService.startProcessInstanceByKey("casecreationtrial",variables);
String pid = processInstance.getId();
String out = (String)executionService.getVariable(processInstance.getId(), "answer");
System.out.println("OUT Object ... "+out);
} catch(Exception e) {
System.out.println("Here I get exception ... "+e);
} finally {
try {
tearDown();
}catch (Exception e) {System.out.println("Exception in finally ...");}
}
}
---------------------------------------------------------------------------------------------------------------------------------------
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251824#4251824
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251824
16 years, 7 months
[jBPM Users] - jBPM 4.0 - History Service and Fork/Join
by shiva0
We're on the verge of starting a project using the jBPM 4.0 GA engine. I've been familiarizing myself with the engine and doing some basic test and proof of concept.
I've read multiple times both user and dev guide and got most of the understanding.
Beside the variable audit feature not being implemented yet, it seams like a very complete engine.
I've been checking the history service. One thing I'm having trouble understanding is the executionId for "forked" tasks.
Let say I have process name "foo" with a simple fork to 3 task (foo1, foo2, foo3) and then a join back.
The execution id of the main process would be something like foo.1 and I can easily fetch the history. But TaskHistory is bound to an execution Id. If I use the ProcessHistory execution Id it only return me the task that were not forked.
Looking at the database, the execution id for the forked task looks like : . so something like foo.1.to_foo1.
How am I supposed to figure out that execution Id and fetch the whole history for a process instance without hardcoding the transition name in my code?
Shouldn't there be a way to fetch the task history for the complete processInstance and not just an the execution of the process instance?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251801#4251801
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251801
16 years, 7 months