/** * Finishes the building of a conditional event definition. * * @param <T> * @return the parent event builder */ @SuppressWarnings({ "rawtypes", "unchecked" }) public <T extends AbstractFlowNodeBuilder> T conditionalEventDefinitionDone() { return (T) ((Event) element.getParentElement()).builder(); }
/** * Finishes the building of a error event definition. * * @param <T> * @return the parent event builder */ @SuppressWarnings({ "rawtypes", "unchecked" }) public <T extends AbstractFlowNodeBuilder> T errorEventDefinitionDone() { return (T) ((Event) element.getParentElement()).builder(); } }
/** * Finishes the building of a message event definition. * * @param <T> * @return the parent event builder */ @SuppressWarnings({ "rawtypes", "unchecked" }) public <T extends AbstractFlowNodeBuilder> T messageEventDefinitionDone() { return (T) ((Event) element.getParentElement()).builder(); } }
private void addMessageEventDefinition(CatchEvent catchEvent) { BpmnModelInstance modelInstance = (BpmnModelInstance) catchEvent.getModelInstance(); Message message = modelInstance.newInstance(Message.class); message.setId(MESSAGE_ID); message.setName(MESSAGE_NAME); modelInstance.getDefinitions().addChildElement(message); MessageEventDefinition messageEventDefinition = modelInstance.newInstance(MessageEventDefinition.class); messageEventDefinition.setMessage(message); catchEvent.getEventDefinitions().add(messageEventDefinition); }
public static void addUserTaskCompensationHandler(BpmnModelInstance modelInstance, String boundaryEventId, String compensationHandlerId) { BoundaryEvent boundaryEvent = modelInstance.getModelElementById(boundaryEventId); BaseElement scope = (BaseElement) boundaryEvent.getParentElement(); UserTask compensationHandler = modelInstance.newInstance(UserTask.class); compensationHandler.setId(compensationHandlerId); compensationHandler.setForCompensation(true); scope.addChildElement(compensationHandler); Association association = modelInstance.newInstance(Association.class); association.setAssociationDirection(AssociationDirection.One); association.setSource(boundaryEvent); association.setTarget(compensationHandler); scope.addChildElement(association); }
/** * Finishes the building of a multi instance loop characteristics. * * @return the parent activity builder */ @SuppressWarnings({ "rawtypes", "unchecked" }) public <T extends AbstractActivityBuilder> T multiInstanceDone() { return (T) ((Activity) element.getParentElement()).builder(); }
@SuppressWarnings({ "rawtypes", "unchecked" }) public <T extends AbstractFlowNodeBuilder> T compensateEventDefinitionDone() { return (T) ((Event) element.getParentElement()).builder(); } }
/** * Sets the identifier of the element. * * @param identifier the identifier to set * @return the builder object */ public B id(String identifier) { element.setId(identifier); return myself; }
/** * Sets the camunda delegateExpression attribute. * * @param camundaExpression the delegateExpression to set * @return the builder object */ public B camundaDelegateExpression(String camundaExpression) { element.setCamundaDelegateExpression(camundaExpression); return myself; }
/** * Sets the Camunda asyncBefore attribute to true. * * @return the builder object */ public B camundaAsyncBefore() { element.setCamundaAsyncBefore(true); return myself; }
/** * Sets the camunda candidate groups attribute. * * @param camundaCandidateGroups the candidate groups to set * @return the builder object */ public B camundaCandidateGroups(List<String> camundaCandidateGroups) { element.setCamundaCandidateGroupsList(camundaCandidateGroups); return myself; }
/** * Sets the camunda candidate users attribute. * * @param camundaCandidateUsers the candidate users to set * @return the builder object */ public B camundaCandidateUsers(List<String> camundaCandidateUsers) { element.setCamundaCandidateUsersList(camundaCandidateUsers); return myself; }
/** * Sets the default sequence flow for the build inclusive gateway. * * @param sequenceFlow the default sequence flow to set * @return the builder object */ public B defaultFlow(SequenceFlow sequenceFlow) { element.setDefault(sequenceFlow); return myself; }
/** * Sets the camunda resultVariable attribute. * * @param camundaResultVariable the name of the process variable * @return the builder object */ public B camundaResultVariable(String camundaResultVariable) { element.setCamundaResultVariable(camundaResultVariable); return myself; }
/** * Sets the camunda decisionRefVersion attribute. * * @param camundaDecisionRefVersion the decisionRefVersion to set * @return the builder object */ public B camundaDecisionRefVersion(String camundaDecisionRefVersion) { element.setCamundaDecisionRefVersion(camundaDecisionRefVersion); return myself; }
/** * Sets the camunda decisionRefTenantId attribute. * * @param decisionRefTenantId the decisionRefTenantId to set * @return the builder object */ public B camundaDecisionRefTenantId(String decisionRefTenantId) { element.setCamundaDecisionRefTenantId(decisionRefTenantId); return myself; }
/** * Set the camunda variable events attribute, that defines the variable * event on which the condition should be evaluated. * * @param variableEvents the events on which the condition should be evaluated * @return the builder object */ public B camundaVariableEvents(List<String> variableEvents) { element.setCamundaVariableEventsList(variableEvents); return myself; }
/** * Sets the camunda resultVariable attribute. * * @param camundaResultVariable the name of the process variable * @return the builder object */ public B camundaResultVariable(String camundaResultVariable) { element.setCamundaResultVariable(camundaResultVariable); return myself; }
/** * Sets the camunda form handler class attribute. * * @param camundaFormHandlerClass the class name of the form handler * @return the builder object */ public B camundaFormHandlerClass(String camundaFormHandlerClass) { element.setCamundaFormHandlerClass(camundaFormHandlerClass); return myself; }
/** * Sets the camunda form key attribute. * * @param camundaFormKey the form key to set * @return the builder object */ public B camundaFormKey(String camundaFormKey) { element.setCamundaFormKey(camundaFormKey); return myself; }