org.activiti.engine.impl.cmd
类 SetProcessDefinitionVersionCmd
java.lang.Object
org.activiti.engine.impl.cmd.SetProcessDefinitionVersionCmd
- 所有已实现的接口:
- Serializable, Command<Void>
public class SetProcessDefinitionVersionCmd
- extends Object
- implements Command<Void>, Serializable
Command
that changes the process definition version of an existing
process instance.
Warning: This command will NOT perform any migration magic and simply set the
process definition version in the database, assuming that the user knows,
what he or she is doing.
This is only useful for simple migrations. The new process definition MUST
have the exact same activity id to make it still run.
Furthermore, activities referenced by sub-executions and jobs that belong to
the process instance MUST exist in the new process definition version.
The command will fail, if there is already a ProcessInstance
or
HistoricProcessInstance
using the new process definition version and
the same business key as the ProcessInstance
that is to be migrated.
If the process instance is not currently waiting but actively running, then
this would be a case for optimistic locking, meaning either the version
update or the "real work" wins, i.e., this is a race condition.
- 作者:
- Falko Menge
- 另请参见:
http://forums.activiti.org/en/viewtopic.php?t=2918
,
序列化表格
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SetProcessDefinitionVersionCmd
public SetProcessDefinitionVersionCmd(String processInstanceId,
Integer processDefinitionVersion)
execute
public Void execute(CommandContext commandContext)
- 指定者:
- 接口
Command<Void>
中的 execute
validateAndSwitchVersionOfExecution
protected void validateAndSwitchVersionOfExecution(CommandContext commandContext,
ExecutionEntity execution,
ProcessDefinitionEntity newProcessDefinition)
Copyright © 2013 Alfresco. All rights reserved.