[jBPM Users] - [jbpm4] Move execution to arbitrary activity
by luca.tagliani
Hi all,
I'm trying to move the execution of a processInstance to an arbitrary activity.
I'm using the following code:
org.jbpm.api.ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionName("processTest").uniqueResult();
| ExecutionService executionService = processEngine.getExecutionService();
| ProcessInstance instance = executionService.startProcessInstanceByKey("processTest");
| String newName = "Verified";
| Activity newActivity = ((ProcessDefinitionImpl) processDefinition).getActivity(newName);
| ExecutionImpl execution = (ExecutionImpl) instance;
| if (newActivity != null) {
| ((ExecutionImpl) execution).setActivity(newActivity);
| }
but when I then signal the execution, the activity ran is not the one I've yet set, but the old one.
I've also tried to use
execution.moveTo(activity);
but with the same result.
It seems that the change is not persisted on the DB....
Is it a bug or am I making any mistake?
BR
Luca Tagliani
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259417#4259417
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259417
16 years, 6 months
[jBPM Users] - jPDL decision or fork?
by cash1981
Hi.
I am quite new to jBPM and wondering what I should in the following example.
This is the snippet of the jpdl file:
| <task-node name="review">
| <event type="node-enter">
| <action expression="#{attachmentHandler.setupAttachments}"></action>
| <action expression="#{templateAttachmentHandler.setupTemplateAttachments}"></action>
| </event>
|
| <task name="10-reviewInput" swimlane="handlingOfficer"></task>
| <task name="20-reviewAttachment" swimlane="handlingOfficer"></task>
| <task name="30-rulingAssessment" swimlane="handlingOfficer"></task>
|
| <transition name="next" to="permit"></transition>
| </task-node>
|
| <task-node name="permit">
| <task name="40-ruling" swimlane="handlingOfficer"></task>
| <task name="50-sendPermit" swimlane="handlingOfficer"></task>
| <transition name="denied" to="denied"></transition>
| <transition name="next" to="end"></transition>
| </task-node>
|
In the task <task name="30-rulingAssessment" swimlane="handlingOfficer"></task>
The user handlingOfficer has the option to do something. If he does A, I would like to design in JBPM "skip 40-ruling and go straight to 50-sendPermit", and if he choose option B in 30-rulingAssessment, I want to have the same behaviour as modeled.
So my question is, how can I do this? Should I create a fork somehow from rulingAssessment or maybe just a decision node?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259328#4259328
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259328
16 years, 6 months