protected CommandContext getCommandContext() { return Context.getCommandContext(); }
public static void setTransactionContext(TransactionContext transactionContext) { getStack(transactionContextThreadLocal).push(transactionContext); }
private static ClassLoader getCustomClassLoader() { ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration(); if (processEngineConfiguration != null) { final ClassLoader classLoader = processEngineConfiguration.getClassLoader(); if (classLoader != null) { return classLoader; } } return null; }
public DeploymentEntity getDeployment() { String deploymentId = getProcessDefinition().getDeploymentId(); DeploymentEntity deployment = Context.getCommandContext().getDeploymentEntityManager().findById(deploymentId); return deployment; } }
/** * To be used in an {@link ActivityBehavior} or {@link JavaDelegate}: leaves * according to the default BPMN 2.0 rules: all sequenceflow with a condition * that evaluates to true are followed. */ public static void leaveDelegate(DelegateExecution delegateExecution) { Context.getAgenda().planTakeOutgoingSequenceFlowsOperation((ExecutionEntity) delegateExecution, true); }
protected CommandContext getCommandContext() { return Context.getCommandContext(); }
protected VariableTypes getVariableTypes() { if (variableTypes == null) { variableTypes = Context.getProcessEngineConfiguration().getVariableTypes(); } return variableTypes; }
public static void setCommandContext(CommandContext commandContext) { getStack(commandContextThreadLocal).push(commandContext); }
/** * Actual implementation of leaving an activity. * @param execution The current execution context * @param checkConditions Whether or not to check conditions before determining whether or not to take a transition. * @param throwExceptionIfExecutionStuck If true, an {@link ActivitiException} will be thrown in case no transition could be found to leave the activity. */ protected void performOutgoingBehavior(ExecutionEntity execution, boolean checkConditions, boolean throwExceptionIfExecutionStuck) { Context.getAgenda().planTakeOutgoingSequenceFlowsOperation(execution, true); } }
public List<VariableInstanceEntity> getQueryVariables() { if (queryVariables == null && Context.getCommandContext() != null) { queryVariables = new VariableInitializingList(); } return queryVariables; }
public static void setProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration) { getStack(processEngineConfigurationStackThreadLocal).push(processEngineConfiguration); }
public void execute(DelegateExecution execution) { Context.getAgenda().planTakeOutgoingSequenceFlowsOperation((ExecutionEntity) execution, true); }
public List<VariableInstanceEntity> getQueryVariables() { if (queryVariables == null && Context.getCommandContext() != null) { queryVariables = new VariableInitializingList(); } return queryVariables; }
public static CommandContext getCommandContext() { Stack<CommandContext> stack = getStack(commandContextThreadLocal); if (stack.isEmpty()) { return null; } return stack.peek(); }
public void execute(JobEntity job, String configuration, ExecutionEntity execution, CommandContext commandContext) { Context.getAgenda().planContinueProcessSynchronousOperation(execution); }
public List<HistoricVariableInstanceEntity> getQueryVariables() { if (queryVariables == null && Context.getCommandContext() != null) { queryVariables = new HistoricVariableInitializingList(); } return queryVariables; }
public static ProcessEngineConfigurationImpl getProcessEngineConfiguration() { Stack<ProcessEngineConfigurationImpl> stack = getStack(processEngineConfigurationStackThreadLocal); if (stack.isEmpty()) { return null; } return stack.peek(); }
public List<HistoricVariableInstanceEntity> getQueryVariables() { if (queryVariables == null && Context.getCommandContext() != null) { queryVariables = new HistoricVariableInitializingList(); } return queryVariables; }
public static TransactionContext getTransactionContext() { Stack<TransactionContext> stack = getStack(transactionContextThreadLocal); if (stack.isEmpty()) { return null; } return stack.peek(); }
@Override public void trigger(DelegateExecution execution, String triggerName, Object triggerData) { ExecutionEntity executionEntity = (ExecutionEntity) execution; CommandContext commandContext = Context.getCommandContext(); if (interrupting) { executeInterruptingBehavior(executionEntity, commandContext); } else { executeNonInterruptingBehavior(executionEntity, commandContext); } }