本文整理汇总了Java中org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.isEnded方法的典型用法代码示例。如果您正苦于以下问题:Java ExecutionEntity.isEnded方法的具体用法?Java ExecutionEntity.isEnded怎么用?Java ExecutionEntity.isEnded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
的用法示例。
在下文中一共展示了ExecutionEntity.isEnded方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Override
public Void execute(CommandContext commandContext) {
String processInstanceId = builder.getProcessInstanceId();
ExecutionManager executionManager = commandContext.getExecutionManager();
ExecutionEntity processInstance = executionManager.findExecutionById(processInstanceId);
ensureProcessInstanceExist(processInstanceId, processInstance);
checkUpdateProcessInstance(processInstance, commandContext);
processInstance.setPreserveScope(true);
List<AbstractProcessInstanceModificationCommand> instructions = builder.getModificationOperations();
checkCancellation(commandContext);
for (int i = 0; i < instructions.size(); i++) {
AbstractProcessInstanceModificationCommand instruction = instructions.get(i);
LOG.debugModificationInstruction(processInstanceId, i + 1, instruction.describe());
instruction.setSkipCustomListeners(builder.isSkipCustomListeners());
instruction.setSkipIoMappings(builder.isSkipIoMappings());
instruction.execute(commandContext);
}
processInstance = executionManager.findExecutionById(processInstanceId);
if (!processInstance.hasChildren()) {
if (!(processInstance.getActivity() != null && !processInstance.getId().equals(processInstance.getActivityInstanceId()))) {
// process instance was cancelled
checkDeleteProcessInstance(processInstance, commandContext);
deletePropagate(processInstance, builder.getModificationReason(), builder.isSkipCustomListeners(), builder.isSkipIoMappings());
}
else if (processInstance.isEnded()) {
// process instance has ended regularly
processInstance.propagateEnd();
}
}
if (writeOperationLog) {
commandContext.getOperationLogManager().logProcessInstanceOperation(getLogEntryOperation(),
processInstanceId,
null,
null,
Collections.singletonList(PropertyChange.EMPTY_CHANGE));
}
return null;
}
示例2: execute
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
public ProcessInstanceWithVariables execute(CommandContext commandContext) {
ProcessDefinitionEntity processDefinition = new GetDeployedProcessDefinitionCmd(instantiationBuilder, false).execute(commandContext);
for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) {
checker.checkCreateProcessInstance(processDefinition);
}
ProcessInstanceModificationBuilderImpl modificationBuilder = instantiationBuilder.getModificationBuilder();
ensureNotEmpty("At least one instantiation instruction required (e.g. by invoking startBefore(..), startAfter(..) or startTransition(..))",
"instructions", modificationBuilder.getModificationOperations());
// instantiate the process
ActivityImpl initialActivity = determineFirstActivity(processDefinition, modificationBuilder);
ExecutionEntity processInstance = processDefinition
.createProcessInstance(instantiationBuilder.getBusinessKey(), instantiationBuilder.getCaseInstanceId(), initialActivity);
if (instantiationBuilder.getTenantId() != null) {
processInstance.setTenantId(instantiationBuilder.getTenantId());
}
processInstance.setSkipCustomListeners(modificationBuilder.isSkipCustomListeners());
VariableMap variables = modificationBuilder.getProcessVariables();
final ExecutionVariableSnapshotObserver variablesListener = new ExecutionVariableSnapshotObserver(processInstance);
processInstance.startWithoutExecuting(variables);
// prevent ending of the process instance between instructions
processInstance.setPreserveScope(true);
// apply modifications
List<AbstractProcessInstanceModificationCommand> instructions = modificationBuilder.getModificationOperations();
for (int i = 0; i < instructions.size(); i++) {
AbstractProcessInstanceModificationCommand instruction = instructions.get(i);
LOG.debugStartingInstruction(processInstance.getId(), i, instruction.describe());
instruction.setProcessInstanceId(processInstance.getId());
instruction.setSkipCustomListeners(modificationBuilder.isSkipCustomListeners());
instruction.setSkipIoMappings(modificationBuilder.isSkipIoMappings());
instruction.execute(commandContext);
}
if (!processInstance.hasChildren() && processInstance.isEnded()) {
// process instance has ended regularly but this has not been propagated yet
// due to preserveScope setting
processInstance.propagateEnd();
}
return new ProcessInstanceWithVariablesImpl(processInstance, variablesListener.getVariables());
}
示例3: isActiveEventSubscription
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
private boolean isActiveEventSubscription(EventSubscriptionEntity signalEventSubscriptionEntity) {
ExecutionEntity execution = signalEventSubscriptionEntity.getExecution();
return !execution.isEnded() && !execution.isCanceled();
}
示例4: isActiveIntermediateEventSubscription
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected boolean isActiveIntermediateEventSubscription(EventSubscriptionEntity signalEventSubscriptionEntity) {
ExecutionEntity execution = signalEventSubscriptionEntity.getExecution();
return execution != null && !execution.isEnded() && !execution.isCanceled();
}