public DelegateExecution getExecution() { if(variableScope instanceof DelegateExecution) { return (DelegateExecution) variableScope; } else if(variableScope instanceof TaskEntity){ return ((TaskEntity) variableScope).getExecution(); } else { return null; } }
public DelegateExecution getExecution() { if(variableScope instanceof DelegateExecution) { return (DelegateExecution) variableScope; } else if(variableScope instanceof TaskEntity){ return ((TaskEntity) variableScope).getExecution(); } else { return null; } }
@Override protected ExecutionEntity getContextExecution() { return getEntity().getExecution(); }
@Override protected ExecutionEntity getContextExecution() { return getEntity().getExecution(); }
@Override protected ExecutionEntity getContextExecution() { return getEntity().getExecution(); }
@Override protected ExecutionEntity getContextExecution() { return getEntity().getExecution(); }
@Override public void detachState() { userTask.getExecution().removeTask(userTask); userTask.setExecution(null); }
@Override public AbstractVariableScope getParentVariableScope() { if (getExecution()!=null) { return execution; } if (getCaseExecution()!=null) { return caseExecution; } if (getParentTask() != null) { return parentTask; } return null; }
@Override public void detachState() { userTask.getExecution().removeTask(userTask); userTask.setExecution(null); }
@Override public AbstractVariableScope getParentVariableScope() { if (getExecution()!=null) { return execution; } if (getCaseExecution()!=null) { return caseExecution; } if (getParentTask() != null) { return parentTask; } return null; }
public TaskFormData createTaskForm(TaskEntity task) { TaskFormDataImpl taskFormData = new TaskFormDataImpl(); Expression formKey = task.getTaskDefinition().getFormKey(); if (formKey != null) { Object formValue = formKey.getValue(task); if (formValue != null) { taskFormData.setFormKey(formValue.toString()); } } taskFormData.setDeploymentId(deploymentId); taskFormData.setTask(task); initializeFormProperties(taskFormData, task.getExecution()); initializeFormFields(taskFormData, task.getExecution()); return taskFormData; }
public TaskFormData createTaskForm(TaskEntity task) { TaskFormDataImpl taskFormData = new TaskFormDataImpl(); Expression formKey = task.getTaskDefinition().getFormKey(); if (formKey != null) { Object formValue = formKey.getValue(task); if (formValue != null) { taskFormData.setFormKey(formValue.toString()); } } taskFormData.setDeploymentId(deploymentId); taskFormData.setTask(task); initializeFormProperties(taskFormData, task.getExecution()); initializeFormFields(taskFormData, task.getExecution()); return taskFormData; }
public void notify(DelegateTask task) { // get the event handler final HistoryEventHandler historyEventHandler = Context.getProcessEngineConfiguration() .getHistoryEventHandler(); ExecutionEntity execution = ((TaskEntity) task).getExecution(); if (execution != null) { // delegate creation of the history event to the producer HistoryEvent historyEvent = createHistoryEvent(task, execution); if(historyEvent != null) { // pass the event to the handler historyEventHandler.handleEvent(historyEvent); } } }
protected ExecutionEntity getExecution(CommandContext commandContext, String taskId, String processInstanceId) { ExecutionEntity execution = null; if (taskId != null) { TaskEntity task = commandContext.getTaskManager() .findTaskById(taskId); if (task != null) { execution = task.getExecution(); } } else if (processInstanceId != null) { execution = commandContext.getExecutionManager() .findExecutionById(processInstanceId); } return execution; }
protected ExecutionEntity getExecution(CommandContext commandContext, String taskId, String processInstanceId) { ExecutionEntity execution = null; if (taskId != null) { TaskEntity task = commandContext.getTaskManager() .findTaskById(taskId); if (task != null) { execution = task.getExecution(); } } else if (processInstanceId != null) { execution = commandContext.getExecutionManager() .findExecutionById(processInstanceId); } return execution; }
public void delete(String deleteReason, boolean cascade) { this.deleteReason = deleteReason; fireEvent(EVENTNAME_DELETE); Context .getCommandContext() .getTaskManager() .deleteTask(this, deleteReason, cascade, skipCustomListeners); if (executionId != null) { ExecutionEntity execution = getExecution(); execution.removeTask(this); } }
public Object renderTaskForm(TaskFormData taskForm) { if (taskForm.getFormKey()==null) { return null; } String formTemplateString = getFormTemplateString(taskForm, taskForm.getFormKey()); TaskEntity task = (TaskEntity) taskForm.getTask(); return executeScript(formTemplateString, task.getExecution()); }
public Object renderTaskForm(TaskFormData taskForm) { if (taskForm.getFormKey()==null) { return null; } String formTemplateString = getFormTemplateString(taskForm, taskForm.getFormKey()); TaskEntity task = (TaskEntity) taskForm.getTask(); return executeScript(formTemplateString, task.getExecution()); }
public void delete(String deleteReason, boolean cascade) { this.deleteReason = deleteReason; fireEvent(EVENTNAME_DELETE); Context .getCommandContext() .getTaskManager() .deleteTask(this, deleteReason, cascade, skipCustomListeners); if (executionId != null) { ExecutionEntity execution = getExecution(); execution.removeTask(this); } }
@Override public void execute(DelegateExecution execution) throws Exception { Task task = execution.getProcessEngineServices().getTaskService().createTaskQuery().taskName(TASK_WITH_CONDITION).singleResult(); ((TaskEntity) task).getExecution().setVariableLocal(VARIABLE_NAME, 1); execution.setVariableLocal(VARIABLE_NAME+1, 1); } }