@Override public boolean isSendEvents() { return Type.SendEvents.equals(getType()); }
@Override public boolean isSignalEvent() { return Type.SignalEvent.equals(getType()); }
@Override public boolean isTask() { return Type.Human.equals(getType()); }
@Override public boolean isTimer() { return Type.Timer.equals(getType()); }
@Override public boolean isAutomatic() { return Type.Automatic.equals(getType()); }
@Override public boolean isSubflow() { return Type.Subflow.equals(getType()); }
@Override public boolean isSubflow() { return Type.Subflow.equals(getType()); }
@Override public boolean isReceiveEvent() { return Type.ReceiveEvent.equals(getType()); }
@Override public boolean isSignalEvent() { return Type.SignalEvent.equals(getType()); }
@Override public boolean isTask() { return Type.Human.equals(getType()); }
@Override public boolean isAutomatic() { return Type.Automatic.equals(getType()); }
@Override public boolean isSendEvents() { return Type.SendEvents.equals(getType()); }
@Override public boolean isTimer() { return Type.Timer.equals(getType()); }
@Override public boolean isReceiveEvent() { return Type.ReceiveEvent.equals(getType()); }
@Override public boolean isCatchingErrorEvent() { return Type.ErrorEvent.equals(getType()) && this.getIncomingTransitions().isEmpty(); }
@Override public boolean isThrowingErrorEvent() { return Type.ErrorEvent.equals(getType()) && getOutgoingTransitions().isEmpty(); }
@Override public boolean isCatchingErrorEvent() { return Type.ErrorEvent.equals(getType()) && this.getIncomingTransitions().isEmpty(); }
@Override public boolean isThrowingErrorEvent() { return Type.ErrorEvent.equals(getType()) && getOutgoingTransitions().isEmpty(); }
/** * Add a timer boundary event onto an activity. * * @param eventName * the name of the event. * @param condition * the condition of the timer event. * @return the ProcessBuilder in order to add BPM elements. */ public ProcessBuilder addTimerBoundaryEvent(final String eventName, final String condition) { Misc.checkArgsNotNull(eventName, condition); final Object obj = peek(ActivityDefinitionImpl.class); if (isActivity(obj)) { final ActivityDefinitionImpl activity = (ActivityDefinitionImpl) obj; if (canAddBoundaryEvent(activity, "timer")) { final TimerBoundaryEventImpl timer = new TimerBoundaryEventImpl(eventName, activity.getProcessDefinitionUUID(), activity.getUUID(), null, condition); activity.addBoundaryEvent(timer); push(timer); } else { problems.add(new Problem("Unable to add a boundary timer event on an activity of type: " + activity.getType(), Problem.SEVERITY_ERROR)); } } else { problems.add(new Problem("Unable to add a boundary timer event on an object of type: " + getClass(obj), Problem.SEVERITY_ERROR)); } return this; }
/** * Add a timer boundary event onto an activity. * * @param eventName * the name of the event. * @param condition * the condition of the timer event. * @return the ProcessBuilder in order to add BPM elements. */ public ProcessBuilder addTimerBoundaryEvent(final String eventName, final String condition) { Misc.checkArgsNotNull(eventName, condition); final Object obj = peek(ActivityDefinitionImpl.class); if (isActivity(obj)) { final ActivityDefinitionImpl activity = (ActivityDefinitionImpl) obj; if (canAddBoundaryEvent(activity, "timer")) { final TimerBoundaryEventImpl timer = new TimerBoundaryEventImpl(eventName, activity.getProcessDefinitionUUID(), activity.getUUID(), null, condition); activity.addBoundaryEvent(timer); push(timer); } else { problems.add(new Problem("Unable to add a boundary timer event on an activity of type: " + activity.getType(), Problem.SEVERITY_ERROR)); } } else { problems.add(new Problem("Unable to add a boundary timer event on an object of type: " + getClass(obj), Problem.SEVERITY_ERROR)); } return this; }