本文整理汇总了Java中org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.getProcessDefinition方法的典型用法代码示例。如果您正苦于以下问题:Java ExecutionEntity.getProcessDefinition方法的具体用法?Java ExecutionEntity.getProcessDefinition怎么用?Java ExecutionEntity.getProcessDefinition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
的用法示例。
在下文中一共展示了ExecutionEntity.getProcessDefinition方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: inContextOf
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
public UserOperationLogContextEntryBuilder inContextOf(ExecutionEntity processInstance, List<PropertyChange> propertyChanges) {
if (propertyChanges == null || propertyChanges.isEmpty()) {
if (OPERATION_TYPE_CREATE.equals(entry.getOperationType())) {
propertyChanges = Arrays.asList(PropertyChange.EMPTY_CHANGE);
}
}
entry.setPropertyChanges(propertyChanges);
entry.setProcessInstanceId(processInstance.getProcessInstanceId());
entry.setProcessDefinitionId(processInstance.getProcessDefinitionId());
entry.setExecutionId(processInstance.getId());
entry.setCaseInstanceId(processInstance.getCaseInstanceId());
ResourceDefinitionEntity definition = processInstance.getProcessDefinition();
if (definition != null) {
entry.setProcessDefinitionKey(definition.getKey());
entry.setDeploymentId(definition.getDeploymentId());
}
return this;
}
示例2: MigratingInstanceParseContext
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
public MigratingInstanceParseContext(
MigratingInstanceParser parser,
MigrationPlan migrationPlan,
ExecutionEntity processInstance,
ProcessDefinitionEntity targetProcessDefinition) {
this.parser = parser;
this.sourceProcessDefinition = processInstance.getProcessDefinition();
this.targetProcessDefinition = targetProcessDefinition;
this.migratingProcessInstance = new MigratingProcessInstance(processInstance.getId(), sourceProcessDefinition, targetProcessDefinition);
this.mapping = new ActivityExecutionTreeMapping(Context.getCommandContext(), processInstance.getId());
this.instructionsBySourceScope = organizeInstructionsBySourceScope(migrationPlan);
}
示例3: initialize
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected void initialize() {
ExecutionEntity processInstance = commandContext.getExecutionManager().findExecutionById(processInstanceId);
this.processDefinition = processInstance.getProcessDefinition();
List<ExecutionEntity> executions = fetchExecutionsForProcessInstance(processInstance);
executions.add(processInstance);
List<ExecutionEntity> leaves = findLeaves(executions);
assignExecutionsToActivities(leaves);
}
示例4: execute
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
@Override
public Void execute(CommandContext commandContext) {
ExecutionEntity processInstance = commandContext.getExecutionManager().findExecutionById(processInstanceId);
ProcessDefinitionImpl processDefinition = processInstance.getProcessDefinition();
PvmActivity activity = processDefinition.findActivity(activityId);
// forbid instantiation of compensation boundary events
if (activity != null && "compensationBoundaryCatch".equals(activity.getProperty("type"))) {
throw new ProcessEngineException("Cannot start before activity " + activityId + "; activity " +
"is a compensation boundary event.");
}
return super.execute(commandContext);
}
示例5: getProcessDefinitionKey
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected String getProcessDefinitionKey(ExecutionEntity execution) {
ProcessDefinitionEntity definition = execution.getProcessDefinition();
if (definition != null) {
return definition.getKey();
} else {
return null;
}
}
示例6: initActivityInstanceEvent
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected void initActivityInstanceEvent(HistoricActivityInstanceEventEntity evt,
ExecutionEntity execution,
PvmScope eventSource,
String activityInstanceId,
String parentActivityInstanceId,
HistoryEventType eventType) {
evt.setId(activityInstanceId);
evt.setEventType(eventType.getEventName());
evt.setActivityInstanceId(activityInstanceId);
evt.setParentActivityInstanceId(parentActivityInstanceId);
evt.setProcessDefinitionId(execution.getProcessDefinitionId());
evt.setProcessInstanceId(execution.getProcessInstanceId());
evt.setExecutionId(execution.getId());
evt.setTenantId(execution.getTenantId());
ProcessDefinitionEntity definition = execution.getProcessDefinition();
if (definition != null) {
evt.setProcessDefinitionKey(definition.getKey());
}
evt.setActivityId(eventSource.getId());
evt.setActivityName((String) eventSource.getProperty("name"));
evt.setActivityType((String) eventSource.getProperty("type"));
// update sub process reference
ExecutionEntity subProcessInstance = execution.getSubProcessInstance();
if (subProcessInstance != null) {
evt.setCalledProcessInstanceId(subProcessInstance.getId());
}
// update sub case reference
CaseExecutionEntity subCaseInstance = execution.getSubCaseInstance();
if (subCaseInstance != null) {
evt.setCalledCaseInstanceId(subCaseInstance.getId());
}
}
示例7: initProcessInstanceEvent
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected void initProcessInstanceEvent(HistoricProcessInstanceEventEntity evt, ExecutionEntity execution, HistoryEventType eventType) {
String processDefinitionId = execution.getProcessDefinitionId();
String processInstanceId = execution.getProcessInstanceId();
String executionId = execution.getId();
// the given execution is the process instance!
String caseInstanceId = execution.getCaseInstanceId();
String tenantId = execution.getTenantId();
ProcessDefinitionEntity definition = execution.getProcessDefinition();
String processDefinitionKey = null;
if (definition != null) {
processDefinitionKey = definition.getKey();
}
evt.setId(processInstanceId);
evt.setEventType(eventType.getEventName());
evt.setProcessDefinitionKey(processDefinitionKey);
evt.setProcessDefinitionId(processDefinitionId);
evt.setProcessInstanceId(processInstanceId);
evt.setExecutionId(executionId);
evt.setBusinessKey(execution.getProcessBusinessKey());
evt.setCaseInstanceId(caseInstanceId);
evt.setTenantId(tenantId);
if (execution.getSuperCaseExecution() != null) {
evt.setSuperCaseInstanceId(execution.getSuperCaseExecution().getCaseInstanceId());
}
if (execution.getSuperExecution() != null) {
evt.setSuperProcessInstanceId(execution.getSuperExecution().getProcessInstanceId());
}
}
示例8: createFormPropertyUpdateEvt
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
public HistoryEvent createFormPropertyUpdateEvt(ExecutionEntity execution, String propertyId, String propertyValue, String taskId) {
final IdGenerator idGenerator = Context.getProcessEngineConfiguration().getIdGenerator();
HistoricFormPropertyEventEntity historicFormPropertyEntity = newHistoricFormPropertyEvent();
historicFormPropertyEntity.setId(idGenerator.getNextId());
historicFormPropertyEntity.setEventType(HistoryEventTypes.FORM_PROPERTY_UPDATE.getEventName());
historicFormPropertyEntity.setTimestamp(ClockUtil.getCurrentTime());
historicFormPropertyEntity.setActivityInstanceId(execution.getActivityInstanceId());
historicFormPropertyEntity.setExecutionId(execution.getId());
historicFormPropertyEntity.setProcessDefinitionId(execution.getProcessDefinitionId());
historicFormPropertyEntity.setProcessInstanceId(execution.getProcessInstanceId());
historicFormPropertyEntity.setPropertyId(propertyId);
historicFormPropertyEntity.setPropertyValue(propertyValue);
historicFormPropertyEntity.setTaskId(taskId);
historicFormPropertyEntity.setTenantId(execution.getTenantId());
historicFormPropertyEntity.setUserOperationId(Context.getCommandContext().getOperationId());
ProcessDefinitionEntity definition = execution.getProcessDefinition();
if (definition != null) {
historicFormPropertyEntity.setProcessDefinitionKey(definition.getKey());
}
// initialize sequence counter
initSequenceCounter(execution, historicFormPropertyEntity);
return historicFormPropertyEntity;
}
示例9: getProcessDefinitionTenantId
import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; //导入方法依赖的package包/类
protected String getProcessDefinitionTenantId(ExecutionEntity execution) {
ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) execution.getProcessDefinition();
return processDefinition.getTenantId();
}