use of org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity in project camunda-bpm-platform by camunda.
the class GetCaseExecutionVariableCmd method execute.
public Object execute(CommandContext commandContext) {
ensureNotNull("caseExecutionId", caseExecutionId);
ensureNotNull("variableName", variableName);
CaseExecutionEntity caseExecution = commandContext.getCaseExecutionManager().findCaseExecutionById(caseExecutionId);
ensureNotNull(CaseExecutionNotFoundException.class, "case execution " + caseExecutionId + " doesn't exist", "caseExecution", caseExecution);
for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) {
checker.checkReadCaseInstance(caseExecution);
}
Object value;
if (isLocal) {
value = caseExecution.getVariableLocal(variableName);
} else {
value = caseExecution.getVariable(variableName);
}
return value;
}
use of org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity in project camunda-bpm-platform by camunda.
the class StageActivityBehavior method fireForceUpdate.
protected void fireForceUpdate(CmmnActivityExecution execution) {
if (execution instanceof CaseExecutionEntity) {
CaseExecutionEntity entity = (CaseExecutionEntity) execution;
entity.forceUpdate();
}
}
use of org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity in project camunda-bpm-platform by camunda.
the class GetCaseExecutionVariableTypedCmd method execute.
public TypedValue execute(CommandContext commandContext) {
ensureNotNull("caseExecutionId", caseExecutionId);
ensureNotNull("variableName", variableName);
CaseExecutionEntity caseExecution = commandContext.getCaseExecutionManager().findCaseExecutionById(caseExecutionId);
ensureNotNull(CaseExecutionNotFoundException.class, "case execution " + caseExecutionId + " doesn't exist", "caseExecution", caseExecution);
for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) {
checker.checkReadCaseInstance(caseExecution);
}
TypedValue value;
if (isLocal) {
value = caseExecution.getVariableLocalTyped(variableName, deserializeValue);
} else {
value = caseExecution.getVariableTyped(variableName, deserializeValue);
}
return value;
}
use of org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity in project camunda-bpm-platform by camunda.
the class StateTransitionCaseExecutionCmd method execute.
public Void execute(CommandContext commandContext) {
super.execute(commandContext);
CaseExecutionEntity caseExecution = getCaseExecution();
performStateTransition(commandContext, caseExecution);
return null;
}
use of org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity in project camunda-bpm-platform by camunda.
the class DefaultCmmnHistoryEventProducer method createCaseActivityInstanceCreateEvt.
public HistoryEvent createCaseActivityInstanceCreateEvt(DelegateCaseExecution caseExecution) {
final CaseExecutionEntity caseExecutionEntity = (CaseExecutionEntity) caseExecution;
// create event instance
HistoricCaseActivityInstanceEventEntity evt = newCaseActivityInstanceEventEntity(caseExecutionEntity);
// initialize event
initCaseActivityInstanceEvent(evt, caseExecutionEntity, HistoryEventTypes.CASE_ACTIVITY_INSTANCE_CREATE);
// set start time
evt.setCreateTime(ClockUtil.getCurrentTime());
return evt;
}
Aggregations