@Override public Comment execute(CommandContext commandContext) { for (TaskEntity taskEntity : commandContext.getTaskEntityManager().findTasksByExecutionId(executionId)) { commandContext.getTaskEntityManager().deleteTask(taskEntity, "jump", false); } ExecutionEntity executionEntity = Context.getCommandContext().getExecutionEntityManager().findExecutionById(executionId); ProcessDefinitionImpl processDefinition = executionEntity.getProcessDefinition(); ActivityImpl activity = processDefinition.findActivity(activityId); executionEntity.executeActivity(activity); return null; } }
@Override public Void execute(CommandContext commandContext) { //创建新任务 Logger.getLogger(DefaultTaskFlowControlService.class).debug( String.format("executing activity: %s", _activity.getId())); ExecutionEntity execution = commandContext.getExecutionEntityManager().findExecutionById(_executionId); execution.setActivity(_activity); execution.performOperation(AtomicOperation.ACTIVITY_START); return null; } }
@Override public Void execute(CommandContext commandContext) { //创建新任务 Logger.getLogger(DefaultTaskFlowControlService.class).debug( String.format("executing activity: %s", _activity.getId())); ExecutionEntity execution = commandContext.getExecutionEntityManager().findExecutionById(_executionId); execution.setActivity(_activity); execution.performOperation(AtomicOperation.TRANSITION_CREATE_SCOPE); return null; } }
public ExecutionEntity getExecution() { if(execution == null && executionId != null) { execution = Context.getCommandContext() .getExecutionEntityManager() .findExecutionById(executionId); } return execution; }
protected void ensureParentInitialized() { if (parent == null && parentId != null) { parent = Context .getCommandContext() .getExecutionEntityManager() .findExecutionById(parentId); } }
public ExecutionEntity getExecution() { if (execution == null && executionId != null) { execution = Context.getCommandContext() .getExecutionEntityManager() .findExecutionById(executionId); } return execution; }
protected void ensureSuperExecutionInitialized() { if (superExecution == null && superExecutionId != null) { superExecution = Context .getCommandContext() .getExecutionEntityManager() .findExecutionById(superExecutionId); } }
protected void ensureProcessInstanceInitialized() { if ((processInstance == null) && (processInstanceId != null)) { processInstance = Context .getCommandContext() .getExecutionEntityManager() .findExecutionById(processInstanceId); } }
public ExecutionEntity getProcessInstance() { if (processInstance == null && processInstanceId != null) { processInstance = Context .getCommandContext() .getExecutionEntityManager() .findExecutionById(processInstanceId); } return processInstance; } public void setProcessInstance(ExecutionEntity processInstance) {
public void deleteProcessInstance(String processInstanceId, String deleteReason, boolean cascade) { ExecutionEntity execution = findExecutionById(processInstanceId); if (execution == null) { throw new ActivitiObjectNotFoundException("No process instance found for id '" + processInstanceId + "'", ProcessInstance.class); } deleteProcessInstanceCascade(execution, deleteReason, cascade); }
protected void ensureParentInitialized() { if (parent == null && parentId != null) { parent = Context .getCommandContext() .getExecutionEntityManager() .findExecutionById(parentId); } }
public ExecutionEntity getExecution() { if ( (execution==null) && (executionId!=null) ) { this.execution = Context .getCommandContext() .getExecutionEntityManager() .findExecutionById(executionId); } return execution; }
public ExecutionEntity getExecution() { if ((execution == null) && (executionId != null)) { this.execution = Context .getCommandContext() .getExecutionEntityManager() .findExecutionById(executionId); } return execution; }
public ExecutionEntity getProcessInstance() { if (processInstance == null && processInstanceId != null) { processInstance = Context .getCommandContext() .getExecutionEntityManager() .findExecutionById(processInstanceId); } return processInstance; }
protected void ensureProcessInstanceInitialized() { if ((processInstance == null) && (processInstanceId != null)) { processInstance = Context .getCommandContext() .getExecutionEntityManager() .findExecutionById(processInstanceId); } }
@Override @SuppressWarnings({ "unchecked", "rawtypes" }) public List<IdentityLink> execute(CommandContext commandContext) { ExecutionEntity processInstance = commandContext .getExecutionEntityManager() .findExecutionById(processInstanceId); if (processInstance == null) { throw new ActivitiObjectNotFoundException("Cannot find process definition with id " + processInstanceId, ExecutionEntity.class); } return (List) processInstance.getIdentityLinks(); }
protected String getBusinessCalendarName(String calendarName) { String businessCalendarName = CycleBusinessCalendar.NAME; if (StringUtils.isNotEmpty(calendarName)) { VariableScope execution = NoExecutionVariableScope.getSharedInstance(); if (StringUtils.isNotEmpty(this.executionId)) { execution = Context.getCommandContext().getExecutionEntityManager().findExecutionById(this.executionId); } businessCalendarName = (String) Context.getProcessEngineConfiguration().getExpressionManager().createExpression(calendarName).getValue(execution); } return businessCalendarName; } }
@SuppressWarnings({"unchecked", "rawtypes"}) public List<IdentityLink> execute(CommandContext commandContext) { ExecutionEntity processInstance = Context .getCommandContext() .getExecutionEntityManager() .findExecutionById(processInstanceId); if (processInstance == null) { throw new ActivitiObjectNotFoundException("Cannot find process definition with id " + processInstanceId, ExecutionEntity.class); } return (List) processInstance.getIdentityLinks(); }
public Void execute(CommandContext commandContext) { ExecutionEntity processInstance = Context .getCommandContext() .getExecutionEntityManager() .findExecutionById(processInstanceId); if (processInstance == null) { throw new ActivitiObjectNotFoundException("Cannot find process instance with id " + processInstanceId, ExecutionEntity.class); } processInstance.addIdentityLink(userId, type); return null; }
@Override public Void execute(CommandContext commandContext) { ExecutionEntity processInstance = commandContext.getExecutionEntityManager().findExecutionById(processInstanceId); if (processInstance == null) { throw new ActivitiObjectNotFoundException("Cannot find process instance with id " + processInstanceId, ExecutionEntity.class); } processInstance.addIdentityLink(userId, groupId, type); commandContext.getHistoryManager().createProcessInstanceIdentityLinkComment(processInstanceId, userId, groupId, type, true); return null; }