public boolean isInstanceState(final InstanceState state) { return this.instanceState.equals(state); }
public boolean isInstanceState(final InstanceState state) { return this.instanceState.equals(state); }
public boolean isInstanceState(final InstanceState state) { return getInstanceState().equals(state); }
public void setInstanceState(final InstanceState newState, final String userId) { updateLastUpdateDate(); final InstanceState oldState = getInstanceState(); state = newState; if (getInstanceStateUpdates() == null) { instanceStateUpdates = new ArrayList<InstanceStateUpdate>(); } // add a state update final Date newDate = new Date(); getInstanceStateUpdates().add(new InstanceStateUpdateImpl(newDate, userId, oldState, newState)); if (newState.equals(InstanceState.STARTED)) { startedDate = newDate.getTime(); startedBy = userId; } else { endedDate = newDate.getTime(); endedBy = userId; if (activities != null) { for (final ActivityInstance activity : activities) { if (activity.getEndedDate() == null) { EnvTool.getRecorder().recordBodyAborted(activity); TransientData.removeTransientData(activity.getUUID()); } } } } }
@Override public void cancelProcessInstance(final ProcessInstanceUUID instanceUUID) throws InstanceNotFoundException, UncancellableInstanceException { // if this instance is a child execution, throw an exception FacadeUtil.checkArgsNotNull(instanceUUID); final InternalProcessInstance instance = FacadeUtil.getInstance(instanceUUID, null); if (instance == null) { throw new InstanceNotFoundException("bai_RAPII_1", instanceUUID); } // if this instance is a child execution, throw an exception if (instance.getParentInstanceUUID() != null || !instance.getInstanceState().equals(InstanceState.STARTED)) { throw new UncancellableInstanceException("bai_RAPII_2", instanceUUID, instance.getParentInstanceUUID(), instance.getInstanceState()); } instance.cancel(); }
public void execute(ActivityExecution execution) { XpdlExecution xpdlExecution = (XpdlExecution) execution; if (xpdlExecution.getXpdlInstance().getInstanceState().equals(InstanceState.FINISHED)) { if (LOG.isLoggable(Level.FINE)) { LOG.fine("XPDLInstance ended : " + xpdlExecution.getXpdlInstance());
if (xpdlExecution.getXpdlInstance().getInstanceState().equals(InstanceState.FINISHED)) { if (AbstractActivity.LOG.isLoggable(Level.FINE)) { AbstractActivity.LOG.fine("XPDLInstance ended : " + xpdlExecution.getXpdlInstance());
if (execution.getInstance().getInstanceState().equals(InstanceState.FINISHED)) { if (AbstractActivity.LOG.isLoggable(Level.FINE)) { AbstractActivity.LOG.fine("Instance ended : " + execution.getInstance());