Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.command
Class ChangeProcessInstanceVersionCommand

    java.lang.Object
      org.jbpm.command.ChangeProcessInstanceVersionCommand

All Implemented Interfaces:
  java.io.Serializable, 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? Proposal Fluffi "select distinct task " + "from " + Task.class.getName() + " task " + "where task.name = :taskName " + " and task.processDefinition.id = :processDefinitionId ";

Author:
  Bernd Ruecker (bernd.ruecker@camunda.com)
See Also:
  Serialized Form

Constructor Summary
`ChangeProcessInstanceVersionCommand()`
`ChangeProcessInstanceVersionCommand(long processId, int newVersion)`

Method Summary
`java.lang.Object` | `execute(JbpmContext jbpmContext)`
`java.util.Map` | `getNameMapping()`
`int` | `getNewVersion()`
`long` | `getProcessId()`
`java.lang.String` | `getProcessName()`
`void` | `setNameMapping(java.util.Map nameMapping)`
`void` | `setNewVersion(int newVersion)`
`void` | `setProcessId(long processId)`
`void` | `setProcessName(java.lang.String processName)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ChangeProcessInstanceVersionCommand

    public ChangeProcessInstanceVersionCommand()

### ChangeProcessInstanceVersionCommand

    public ChangeProcessInstanceVersionCommand(long processId,
                                               int newVersion)

Method Detail

### execute

    public java.lang.Object execute(JbpmContext jbpmContext)
                             throws java.lang.Exception

  Specified by:
    `execute` in interface `Command`
  Returns:
    always null
  Throws:
    `java.lang.Exception`
  See Also:
    `Command.execute(org.jbpm.JbpmContext)`

### getNameMapping

    public java.util.Map getNameMapping()

### setNameMapping

    public void setNameMapping(java.util.Map nameMapping)

### getNewVersion

    public int getNewVersion()

### setNewVersion

    public void setNewVersion(int newVersion)

### getProcessId

    public long getProcessId()

### setProcessId

    public void setProcessId(long processId)

### getProcessName

    public java.lang.String getProcessName()

### setProcessName

    public void setProcessName(java.lang.String processName)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD