Sunday 15 July 2012

java - jBPM6 trying to use previously completed Process Instance Id -



java - jBPM6 trying to use previously completed Process Instance Id -

environment : jbpm 6.0.1.final, jboss eap 6.2.0, jdk 7 i'm using runtimemanager of per process instance follows

runtimemanagerfactory.factory.get().newperprocessinstanceruntimemanager(runtimeenvironment, identifier);

and starting process instance next piece of code

public long startprocesswithinitialparametersandfirebusinessrules(string processname, map<string, object> parametermap) { runtimeengine runtimeengine = manager.getruntimeengine(processinstanceidcontext.get()); kiesession ksession = runtimeengine.getkiesession(); processinstance processinstance = ksession.startprocess(processname, parametermap); long processinstanceid = processinstance.getid(); ksession.fireallrules(); homecoming processinstanceid; }

this configuration works day configured. next day tried create new instance of process using application. application throws exception , process not instantiated. next stacktrace of it.

(http-/127.0.0.1:8080-1) error handled leave approver :: org.jbpm.services.task.exception.permissiondeniedexception: user '[userimpl:'tester']' unable execution operation 'start' on task id 142 due no 'current status' match @ org.jbpm.services.task.internals.lifecycle.mvellifecyclemanager.evalcommand(mvellifecyclemanager.java:128) [jbpm-human-task-core-6.0.1.final.jar:6.0.1.final] @ org.jbpm.services.task.internals.lifecycle.mvellifecyclemanager.taskoperation(mvellifecyclemanager.java:318) [jbpm-human-task-core-6.0.1.final.jar:6.0.1.final] @ org.jbpm.services.task.identity.usergrouplifecyclemanagerdecorator.taskoperation(usergrouplifecyclemanagerdecorator.java:46) [jbpm-human-task-core-6.0.1.final.jar:6.0.1.final] @ or

with same process instance id, yesterday created process , completed. same process instance id trying utilize jbpm6 today when trying instantiate new process , due it's status completed not matching, throwed exception.

why trying utilize completed task's process instance id or created process instance id , how can alter it's behaviour ?

as per observation, happening due new process creation time, picking old process instance id , returning task record.

please help solve problem. tried googling, couldn't find proper documentation of it.

update: click here

java file start process, submit task, , terminate task done in above file. please check more clarity.

unfortunately it's hard figure out what's going on based on details provided. error states task id 142 cannot started user 'tester'. why believe using old process instance or task id? how trying start task, share code?

java jboss jbpm

No comments:

Post a Comment