Class ChangeProcessInstanceVersionCommand

  extended by org.jbpm.command.ChangeProcessInstanceVersionCommand
All Implemented Interfaces:, Command

public class ChangeProcessInstanceVersionCommand
extends java.lang.Object
implements Command

THIS COMMAND IS NOT YET STABLE, BUT FEEL FREE TO TEST :-) change the version of a running process instance. This works only, if the current node is also available in the new version of the process definition (identified by name, so the name has to be exactly the same). One problem with this approach ist also, that if a task with the same name is moved to another node (but this is a rare case) make trouble, if there are 2 tokens in the process, because only one actual node is used... Possible workaround: use process id instead of node id. TODO: new hibernate query for that: [16:23] Fluffi: "select distinct task " + "from " + Task.class.getName() + " task " + "where = :taskName " + " and = :processDefinitionId ";

Bernd Ruecker (
See Also:
Serialized Form

Constructor Summary
ChangeProcessInstanceVersionCommand(long processId, int newVersion)
Method Summary
 java.lang.Object execute(JbpmContext jbpmContext)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ChangeProcessInstanceVersionCommand()


public ChangeProcessInstanceVersionCommand(long processId,
                                           int newVersion)
Method Detail


public java.lang.Object execute(JbpmContext jbpmContext)
                         throws java.lang.Exception
Specified by:
execute in interface Command