public void extendLock(long newLockExpirationTime) { ensureActive(); long newTime = ClockUtil.getCurrentTime().getTime() + newLockExpirationTime; this.lockExpirationTime = new Date(newTime); }
public void extendLock(long newLockExpirationTime) { ensureActive(); long newTime = ClockUtil.getCurrentTime().getTime() + newLockExpirationTime; this.lockExpirationTime = new Date(newTime); }
/** * process failed state, make sure that binary entity is created for the errorMessage, shortError * message does not exceed limit, handle properly retry counts and incidents * * @param errorMessage - short error message text * @param errorDetails - full error details * @param retries - updated value of retries left * @param retryDuration - used for lockExpirationTime calculation */ public void failed(String errorMessage, String errorDetails, int retries, long retryDuration) { ensureActive(); this.setErrorMessage(errorMessage); if (errorDetails != null) { setErrorDetails(errorDetails); } this.lockExpirationTime = new Date(ClockUtil.getCurrentTime().getTime() + retryDuration); setRetriesAndManageIncidents(retries); produceHistoricExternalTaskFailedEvent(); }
/** * process failed state, make sure that binary entity is created for the errorMessage, shortError * message does not exceed limit, handle properly retry counts and incidents * * @param errorMessage - short error message text * @param errorDetails - full error details * @param retries - updated value of retries left * @param retryDuration - used for lockExpirationTime calculation */ public void failed(String errorMessage, String errorDetails, int retries, long retryDuration) { ensureActive(); this.setErrorMessage(errorMessage); if (errorDetails != null) { setErrorDetails(errorDetails); } this.lockExpirationTime = new Date(ClockUtil.getCurrentTime().getTime() + retryDuration); setRetriesAndManageIncidents(retries); produceHistoricExternalTaskFailedEvent(); }
public void complete(Map<String, Object> variables, Map<String, Object> localVariables) { ensureActive(); ExecutionEntity associatedExecution = getExecution(); if (variables != null) { associatedExecution.setVariables(variables); } if (localVariables != null) { associatedExecution.setVariablesLocal(localVariables); } deleteFromExecutionAndRuntimeTable(); produceHistoricExternalTaskSuccessfulEvent(); associatedExecution.signal(null, null); }
public void complete(Map<String, Object> variables, Map<String, Object> localVariables) { ensureActive(); ExecutionEntity associatedExecution = getExecution(); if (variables != null) { associatedExecution.setVariables(variables); } if (localVariables != null) { associatedExecution.setVariablesLocal(localVariables); } deleteFromExecutionAndRuntimeTable(); produceHistoricExternalTaskSuccessfulEvent(); associatedExecution.signal(null, null); }
public void bpmnError(String errorCode, String errorMessage, Map<String, Object> variables) { ensureActive(); ActivityExecution activityExecution = getExecution(); BpmnError bpmnError = null; if (errorMessage != null) { bpmnError = new BpmnError(errorCode, errorMessage); } else { bpmnError = new BpmnError(errorCode); } try { ExternalTaskActivityBehavior behavior = ((ExternalTaskActivityBehavior) activityExecution.getActivity().getActivityBehavior()); if (variables != null && !variables.isEmpty()) { activityExecution.setVariables(variables); } behavior.propagateBpmnError(bpmnError, activityExecution); } catch (Exception ex) { throw ProcessEngineLogger.CMD_LOGGER.exceptionBpmnErrorPropagationFailed(errorCode, ex); } }
public void bpmnError(String errorCode, String errorMessage, Map<String, Object> variables) { ensureActive(); ActivityExecution activityExecution = getExecution(); BpmnError bpmnError = null; if (errorMessage != null) { bpmnError = new BpmnError(errorCode, errorMessage); } else { bpmnError = new BpmnError(errorCode); } try { ExternalTaskActivityBehavior behavior = ((ExternalTaskActivityBehavior) activityExecution.getActivity().getActivityBehavior()); if (variables != null && !variables.isEmpty()) { activityExecution.setVariables(variables); } behavior.propagateBpmnError(bpmnError, activityExecution); } catch (Exception ex) { throw ProcessEngineLogger.CMD_LOGGER.exceptionBpmnErrorPropagationFailed(errorCode, ex); } }
public void extendLock(long newLockExpirationTime) { ensureActive(); long newTime = ClockUtil.getCurrentTime().getTime() + newLockExpirationTime; this.lockExpirationTime = new Date(newTime); }
/** * process failed state, make sure that binary entity is created for the errorMessage, shortError * message does not exceed limit, handle properly retry counts and incidents * * @param errorMessage - short error message text * @param errorDetails - full error details * @param retries - updated value of retries left * @param retryDuration - used for lockExpirationTime calculation */ public void failed(String errorMessage, String errorDetails, int retries, long retryDuration) { ensureActive(); this.setErrorMessage(errorMessage); if (errorDetails != null) { setErrorDetails(errorDetails); } this.lockExpirationTime = new Date(ClockUtil.getCurrentTime().getTime() + retryDuration); setRetriesAndManageIncidents(retries); produceHistoricExternalTaskFailedEvent(); }
public void complete(Map<String, Object> variables, Map<String, Object> localVariables) { ensureActive(); ExecutionEntity associatedExecution = getExecution(); if (variables != null) { associatedExecution.setVariables(variables); } if (localVariables != null) { associatedExecution.setVariablesLocal(localVariables); } deleteFromExecutionAndRuntimeTable(); produceHistoricExternalTaskSuccessfulEvent(); associatedExecution.signal(null, null); }
public void bpmnError(String errorCode, String errorMessage, Map<String, Object> variables) { ensureActive(); ActivityExecution activityExecution = getExecution(); BpmnError bpmnError = null; if (errorMessage != null) { bpmnError = new BpmnError(errorCode, errorMessage); } else { bpmnError = new BpmnError(errorCode); } try { ExternalTaskActivityBehavior behavior = ((ExternalTaskActivityBehavior) activityExecution.getActivity().getActivityBehavior()); if (variables != null && !variables.isEmpty()) { activityExecution.setVariables(variables); } behavior.propagateBpmnError(bpmnError, activityExecution); } catch (Exception ex) { throw ProcessEngineLogger.CMD_LOGGER.exceptionBpmnErrorPropagationFailed(errorCode, ex); } }