public TransitionDefinition getTransition(String eventId) { for (Transition transition : transitions) { if (transition.getId().equals(eventId)) { return transition; } } return null; }
/** * Returns the transition that matches the event with the provided id. * @param eventId the event id * @return the transition that matches, or null if no match is found. */ public TransitionDefinition getGlobalTransition(String eventId) { for (Transition transition : globalTransitionSet) { if (transition.getId().equals(eventId)) { return transition; } } return null; }
public TransitionDefinition getTransition(String eventId) { for (Transition transition : transitions) { if (transition.getId().equals(eventId)) { return transition; } } return null; }
/** * Returns the transition that matches the event with the provided id. * @param eventId the event id * @return the transition that matches, or null if no match is found. */ public TransitionDefinition getGlobalTransition(String eventId) { for (Transition transition : globalTransitionSet) { if (transition.getId().equals(eventId)) { return transition; } } return null; }
public TransitionDefinition getTransition(String eventId) { for (Iterator it = transitions.iterator(); it.hasNext();) { Transition transition = (Transition) it.next(); if (transition.getId().equals(eventId)) { return transition; } } return null; }
/** * Returns the transition that matches the event with the provided id. * @param eventId the event id * @return the transition that matches, or null if no match is found. */ public TransitionDefinition getGlobalTransition(String eventId) { for (Iterator it = globalTransitionSet.iterator(); it.hasNext();) { Transition transition = (Transition) it.next(); if (transition.getId().equals(eventId)) { return transition; } } return null; }
/** * Add transition to action state. * * @param actionState the action state * @param criteriaOutcome the criteria outcome * @param targetState the target state */ protected static void addTransitionToActionState(final ActionState actionState, final String criteriaOutcome, final String targetState) { try { final Transition transition = createTransition(criteriaOutcome, targetState); actionState.getTransitionSet().add(transition); LOGGER.debug("Added transition {} to the action state {}", transition.getId(), actionState.getId()); } catch (final Exception e) { LOGGER.error(e.getMessage(), e); } }
/** * Add transition to action state. * * @param state the action state * @param criteriaOutcome the criteria outcome * @param targetState the target state */ protected void createTransitionForState(final TransitionableState state, final String criteriaOutcome, final String targetState) { try { final Transition transition = createTransition(criteriaOutcome, targetState); state.getTransitionSet().add(transition); logger.debug("Added transition {} to the state {}", transition.getId(), state.getId()); } catch (final Exception e) { logger.error(e.getMessage(), e); } }
/** * Add transition to action state. * * @param state the action state * @param criteriaOutcome the criteria outcome * @param targetState the target state * @param removeExisting the remove existing * @return the transition */ public Transition createTransitionForState(final TransitionableState state, final String criteriaOutcome, final String targetState, final boolean removeExisting) { try { if (removeExisting) { val success = (Transition) state.getTransition(criteriaOutcome); if (success != null) { state.getTransitionSet().remove(success); } } val transition = createTransition(criteriaOutcome, targetState); state.getTransitionSet().add(transition); LOGGER.trace("Added transition [{}] to the state [{}]", transition.getId(), state.getId()); return transition; } catch (final Exception e) { LOGGER.error(e.getMessage(), e); } return null; }
.map(tr -> tr.getId() + " -> " + tr.getTargetStateId() + " @ " + tr.getExecutionCriteria().toString()) .collect(Collectors.toList()); if (!acts.isEmpty()) {