private Date getMaxDate(final ActivityInstance activity) { final Date endedDate = activity.getEndedDate(); if (endedDate == null) { return new Date(); } return endedDate; }
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()); } } } } }
lastUpdate = Misc.getTime(src.getLastUpdateDate()); startedDate = Misc.getTime(src.getStartedDate()); endedDate = Misc.getTime(src.getEndedDate()); expectedEndDate = Misc.getTime(src.getExpectedEndDate()); readyDate = Misc.getTime(src.getReadyDate());
lastUpdate = Misc.getTime(src.getLastUpdateDate()); startedDate = Misc.getTime(src.getStartedDate()); endedDate = Misc.getTime(src.getEndedDate()); expectedEndDate = Misc.getTime(src.getExpectedEndDate()); readyDate = Misc.getTime(src.getReadyDate());