public void repeat(CmmnActivityExecution execution, String standardEvent) { CmmnActivity activity = execution.getActivity(); boolean repeat = false; if (activity.getEntryCriteria().isEmpty()) { List<String> events = activity.getProperties().get(CmmnProperties.REPEAT_ON_STANDARD_EVENTS); if (events != null && events.contains(standardEvent)) { repeat = evaluateRepetitionRule(execution); } } else { if (ENABLE.equals(standardEvent) || START.equals(standardEvent) || OCCUR.equals(standardEvent)) { repeat = evaluateRepetitionRule(execution); } } if (repeat) { CmmnActivityExecution parent = execution.getParent(); // instantiate a new instance of given activity List<CmmnExecution> children = parent.createChildExecutions(Arrays.asList(activity)); // start the lifecycle of the new instance parent.triggerChildExecutionsLifecycle(children); } }
public void repeat(CmmnActivityExecution execution, String standardEvent) { CmmnActivity activity = execution.getActivity(); boolean repeat = false; if (activity.getEntryCriteria().isEmpty()) { List<String> events = activity.getProperties().get(CmmnProperties.REPEAT_ON_STANDARD_EVENTS); if (events != null && events.contains(standardEvent)) { repeat = evaluateRepetitionRule(execution); } } else { if (ENABLE.equals(standardEvent) || START.equals(standardEvent) || OCCUR.equals(standardEvent)) { repeat = evaluateRepetitionRule(execution); } } if (repeat) { CmmnActivityExecution parent = execution.getParent(); // instantiate a new instance of given activity List<CmmnExecution> children = parent.createChildExecutions(Arrays.asList(activity)); // start the lifecycle of the new instance parent.triggerChildExecutionsLifecycle(children); } }
public void repeat(CmmnActivityExecution execution, String standardEvent) { CmmnActivity activity = execution.getActivity(); boolean repeat = false; if (activity.getEntryCriteria().isEmpty()) { List<String> events = activity.getProperties().get(CmmnProperties.REPEAT_ON_STANDARD_EVENTS); if (events != null && events.contains(standardEvent)) { repeat = evaluateRepetitionRule(execution); } } else { if (ENABLE.equals(standardEvent) || START.equals(standardEvent) || OCCUR.equals(standardEvent)) { repeat = evaluateRepetitionRule(execution); } } if (repeat) { CmmnActivityExecution parent = execution.getParent(); // instantiate a new instance of given activity List<CmmnExecution> children = parent.createChildExecutions(Arrays.asList(activity)); // start the lifecycle of the new instance parent.triggerChildExecutionsLifecycle(children); } }