[jBPM] New message: "Exception in ExecutionImpl.getActivity"
by ben d
User development,
A new message was posted in the thread "Exception in ExecutionImpl.getActivity":
http://community.jboss.org/message/522629#522629
Author : ben d
Profile : http://community.jboss.org/people/bdahon
Message:
--------------------------------------------------------------
Hi there,
I'm new to JBPM and there is something I must do wrong.
My process definition file is the following:
<?xml version="1.0" encoding="UTF-8"?>
<process name="TaskAssignmentHandler" xmlns="http://jbpm.org/4.3/jpdl">
<start g="20,20,48,48">
<transition to="review" />
</start>
<task name="review" g="96,16,127,52" form="/path_to_your_form/form.html" >
<transition to="wait" />
</task>
<state name="wait" g="255,16,88,52" />
</process>
My test case:
public class TestEngine {
public static void main(String[] args) {
ProcessEngine processEngine = new Configuration().buildProcessEngine();
ExecutionService executionService = processEngine.getExecutionService();
RepositoryService repoService = processEngine.getRepositoryService();
NewDeployment deployment = repoService.createDeployment().addResourceFromClasspath(
"workflows/task-process.jpdl.xml");
deployment.deploy();
ProcessInstance pi = executionService.startProcessInstanceByKey("TaskAssignmentHandler");
pi = executionService.findProcessInstanceById(pi.getId());
((ExecutionImpl) pi).getProcessDefinition();
}
}
I know I don't need to call the findProcessInstanceById since I already have a process instance, but this is to do exactly the same as in my application (ie get process instance from the database).
The deployment and the start process work just fine. But I get the following exception on the getProcessDefinition call:
Exception in thread "main" org.jbpm.api.JbpmException: no environment to get org.jbpm.pvm.internal.session.RepositorySession
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:197)
at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:190)
at org.jbpm.pvm.internal.model.ExecutionImpl.getProcessDefinition(ExecutionImpl.java:1121)
at TestEngine.main(TestEngine.java:36)
And my configuration file (jbpm.cfg.xml):
<?xml version="1.0" encoding="UTF-8"?>
<jbpm-configuration>
<import resource="jbpm.default.cfg.xml" />
<import resource="jbpm.tx.hibernate.cfg.xml" />
<import resource="jbpm.jpdl.cfg.xml" />
<!-- <import resource="jbpm.bpmn.cfg.xml" />-->
<import resource="jbpm.identity.cfg.xml" />
<import resource="jbpm.businesscalendar.cfg.xml" />
</jbpm-configuration>
I'm using JBPM 4.3.
Is there anything I do wrong?
Thanks in advance,
Benjamin
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522629#522629
16 years, 2 months
[jBPM] New message: "Re: Re-assigning tasks"
by Ronald van Kuijk
User development,
A new message was posted in the thread "Re-assigning tasks":
http://community.jboss.org/message/522627#522627
Author : Ronald van Kuijk
Profile : http://community.jboss.org/people/kukeltje
Message:
--------------------------------------------------------------
Oops, sorry, missed these last details. Was in a hurry to catch a bus, so did not read everything.
Well, then you could try to get access to the (Db)Session and do a manual query, or simply 'patch' the taskquery and submit an issue for it. The reason that I think this should be in jBPM (maybe even a method on the taskservice later) is that for managers this is also an interesting thing to be able to reassing task in case of sickness... Mention this when reporting the issue (real life sensible usecases always help in getting things prioritized)
Regarding the status, you have to iterate over tasks to indeed (ab)use the progres, or make sure it is indexed, or hope (expect) that if you do this for moderatly sized tasklists, your dbms optimizes the query and uses indexed fields first. I assume that this is not a method that will be used a lot...
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522627#522627
16 years, 2 months
[jBPM] New message: "Re: jbpm 4.3 - org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update"
by Ronald van Kuijk
User development,
A new message was posted in the thread "jbpm 4.3 - org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update":
http://community.jboss.org/message/522625#522625
Author : Ronald van Kuijk
Profile : http://community.jboss.org/people/kukeltje
Message:
--------------------------------------------------------------
Let me first clear some things up. This forum does not get silent when transactions are mentioned, it just does not get active. Keep in mind that this is a user forum. User forum in more sense then one. It is for users, by users. So it is a peer forum. If you run a less commonly used application server (WLS 11g), there is a bigger chance of not getting help. I myself used WLS up to 8.1SP4 (or was it 5) so have no options to even try to help out and suggesting things. So I keep quiet to. This is probably true for many other users as well. (using db2 is comparable as there are also less people using it, at least as WLS in combination with jBPM)
Secondly, as long as there is no *minimal* testcase where things can be reproduced on the (currently) supported configurations (supported in the sense that there is qa cycle for it, not that it will only run on these), it is even harder to start helping out.
What I further get from this topic is that I hear things like table locking... that is scary
Further more, if things seem related to 'async', (dead) locks etc, read http://docs.jboss.com/jbpm/v4/userguide/html_single/#asynchronouscontinua... again and pay special attention to the third possible value of the continue attribute, called exclusive.... Maybe it helps...
Cheers,
Ronald
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522625#522625
16 years, 2 months