[jBPM Users] - Jbpm 4.0 error prone code...
by jay9981
We are using Client API for building process definition from XML file and starting execution by using the process def:
Attach is code where we are getting some hibernate error.
protected void processJob(){
WorkflowProcessInstance wpi = (WorkflowProcessInstance) this.getJobDataObject();
ExecutionImpl pi = wpi.getJbpmProcessInstace();
if((pi.getState().equals(ProcessInstance.STATE_CREATED))) {
pi.start();
}
while (!pi.isEnded()) {
if (!terminateJob) {
ServerUtils.log(ServerUtils.DEBUG," Moving to next stage.");
String execName = null;
Iterator itr = pi.findActiveActivityNames().iterator();
while(itr.hasNext()) {
execName = (String)itr.next();
ExecutionImpl execution = pi.findActiveExecutionIn(execName);
if(execution.getState().equals(Execution.STATE_INACTIVE_CONCURRENT_ROOT) ||
execution.getState().equals(Execution.STATE_INACTIVE_JOIN) ||
execution.getState().equals(Execution.STATE_INACTIVE_SCOPE)) {
execution = execution.getExecutions().iterator().next();
}
if (execution.isActive() && !execution.isEnded()) {
execution.signal(); pi = execution.getProcessInstance();
}
}
} else {
pi.end();
}
}
}
The highlighted line gives error when it signals on end state (Means when the workflow ends). It state hibernate error as listed below.
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl#0]
at org.hibernate.impl.SessionFactoryImpl$2.handleEntityNotFound(SessionFactoryImpl.java:409)
at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:108)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:97)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:140)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
at org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl_$$_javassist_2.setEndTime(HistoryProcessInstanceImpl_$$_javassist_2.java)
at org.jbpm.pvm.internal.history.events.ProcessInstanceEnd.process(ProcessInstanceEnd.java:41)
at org.jbpm.pvm.internal.history.HistorySessionImpl.process(HistorySessionImpl.java:31)
at org.jbpm.pvm.internal.history.HistoryEvent.fire(HistoryEvent.java:61)
at org.jbpm.pvm.internal.model.ExecutionImpl.end(ExecutionImpl.java:353)
at org.jbpm.pvm.internal.model.ExecutionImpl.end(ExecutionImpl.java:311)
at org.jbpm.jpdl.internal.activity.EndActivity.execute(EndActivity.java:80)
at org.jbpm.jpdl.internal.activity.EndActivity.execute(EndActivity.java:45)
at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:637)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:597)
at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:398)
at org.jbpm.pvm.internal.model.ExecutionImpl.signal(ExecutionImpl.java:380)
at com.santafe.soa.server.engine.workflow.WorkflowJob.processJob(WorkflowJob.java:95)
at com.santafe.soa.server.engine.workflow.WorkflowJob.run(WorkflowJob.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254323#4254323
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254323
15 years, 4 months
[jBPM Users] - Re: Manager role in Tomcat demo setup
by sebastian.s
Good morning, Ronald and hello everyone else.
Thank you for your answer. Till now I have been using jBPM on top of JBoss AS. But I switched to Tomcat since the Tomcat support is one of the most interesting features for me in the new 4.1 release.
For user authentication the demo setup is set to a JDBCRealm (the users table of jBPM). I tried adding a new user with the role manager in tomcat-users.xml but the file seemed to be ignored. If I understood the Tomcat doc the right way I should add an user with the manager role in the database but this does not seem to be possible (database schema).
Can anyone give me a hint how to deal with this? Building up on the demo setup I would like to deploy some applications on the Tomcat among other things by using the manager application to deploy applications and to check.
Thank you for any hints about the Tomcat demo setup.
Sebastian
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254318#4254318
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254318
15 years, 4 months