JBoss Community

Rejection from task to previous tasks

reply from HuiSheng Xu in jBPM - View the full discussion

Hi Jim,

 

The rollback feature is very hard to implement in process engine,  because there would be too many situations to consider about.  If it is necessary in your project, you could achieve this feature by yourself.

 

First get related task.  cast it from Task to TaskImpl.  invoke taskImpl.setSignalling(false); and completeTask(taskImpl.getId())

 

Second find the target activity.  you could use processDefinition.getActivity(activityName).

 

Third move execution to target activity. execution.moveTo(activity);

 

At last create new task, by invoking activity.getActivityBehaviour().execute(execute);

Reply to this message by going to Community

Start a new discussion in jBPM at Community