/** * Sets the message attribute. * * @param message the message for the message event definition * @return the builder object */ public B message(String message) { element.setMessage(findMessageForName(message)); return myself; }
/** * 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(); } }
/** * Sets the camunda task priority attribute. This is only meaningful when * the {@link #camundaType(String)} attribute has the value <code>external</code>. * * * @param taskPriority the priority for the external task * @return the builder object */ public B camundaTaskPriority(String taskPriority) { element.setCamundaTaskPriority(taskPriority); return myself; }
/** * check versioning for message event * * @param element * @return */ private Collection<CheckerIssue> checkMessageEventDefinition(final BpmnElement element) { final Collection<CheckerIssue> issues = new ArrayList<CheckerIssue>(); final BaseElement baseElement = element.getBaseElement(); if (baseElement instanceof MessageEventDefinition) { // Class, Expression, Delegate Expression final MessageEventDefinition eventDef = (MessageEventDefinition) baseElement; final String javaReference = getClassReference(eventDef.getCamundaClass()); if (javaReference != null) { prepareClassWarning(javaReference, element, issues); } final String e_expression = eventDef.getCamundaExpression(); if (e_expression != null) { prepareBeanWarning(e_expression, element, issues); } final String e_delegateExpression = eventDef.getCamundaDelegateExpression(); if (e_delegateExpression != null) { prepareBeanWarning(e_delegateExpression, element, issues); } } return issues; }
/** * Sets the camunda topic attribute. This is only meaningful when * the {@link #camundaType(String)} attribute has the value <code>external</code>. * * @param camundaTopic the topic to set * @return the builder object */ public B camundaTopic(String camundaTopic) { element.setCamundaTopic(camundaTopic); return myself; }
/** * Sets the camunda type attribute. * * @param camundaType the type of the service task * @return the builder object */ public B camundaType(String camundaType) { element.setCamundaType(camundaType); return myself; }
/** * Creates an empty message event definition with the given id * and returns a builder for the message event definition. * * @param id the id of the message event definition * @return the message event definition builder object */ public MessageEventDefinitionBuilder messageEventDefinition(String id) { MessageEventDefinition messageEventDefinition = createEmptyMessageEventDefinition(); if (id != null) { messageEventDefinition.setId(id); } element.getEventDefinitions().add(messageEventDefinition); return new MessageEventDefinitionBuilder(modelInstance, messageEventDefinition); }
/** * Sets the camunda topic attribute. This is only meaningful when * the {@link #camundaType(String)} attribute has the value <code>external</code>. * * @param camundaTopic the topic to set * @return the builder object */ public B camundaTopic(String camundaTopic) { element.setCamundaTopic(camundaTopic); return myself; }
/** * Sets the camunda type attribute. * * @param camundaType the type of the service task * @return the builder object */ public B camundaType(String camundaType) { element.setCamundaType(camundaType); return myself; }
/** * Creates an empty message event definition with the given id * and returns a builder for the message event definition. * * @param id the id of the message event definition * @return the message event definition builder object */ public MessageEventDefinitionBuilder messageEventDefinition(String id) { MessageEventDefinition messageEventDefinition = createEmptyMessageEventDefinition(); if (id != null) { messageEventDefinition.setId(id); } element.getEventDefinitions().add(messageEventDefinition); return new MessageEventDefinitionBuilder(modelInstance, messageEventDefinition); }
protected MessageEventDefinition createMessageEventDefinition(String messageName) { Message message = findMessageForName(messageName); MessageEventDefinition messageEventDefinition = createInstance(MessageEventDefinition.class); messageEventDefinition.setMessage(message); return messageEventDefinition; }
/** * Sets the camunda topic attribute. This is only meaningful when * the {@link #camundaType(String)} attribute has the value <code>external</code>. * * @param camundaTopic the topic to set * @return the builder object */ public B camundaTopic(String camundaTopic) { element.setCamundaTopic(camundaTopic); return myself; }
/** * 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(); } }
/** * Sets the camunda type attribute. * * @param camundaType the type of the service task * @return the builder object */ public B camundaType(String camundaType) { element.setCamundaType(camundaType); return myself; }
/** * Sets the camunda task priority attribute. This is only meaningful when * the {@link #camundaType(String)} attribute has the value <code>external</code>. * * * @param taskPriority the priority for the external task * @return the builder object */ public B camundaTaskPriority(String taskPriority) { element.setCamundaTaskPriority(taskPriority); return myself; }
/** * Creates an empty message event definition with the given id * and returns a builder for the message event definition. * * @param id the id of the message event definition * @return the message event definition builder object */ public MessageEventDefinitionBuilder messageEventDefinition(String id) { MessageEventDefinition messageEventDefinition = createEmptyMessageEventDefinition(); if (id != null) { messageEventDefinition.setId(id); } element.getEventDefinitions().add(messageEventDefinition); return new MessageEventDefinitionBuilder(modelInstance, messageEventDefinition); }
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); }
/** * 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(); } }
/** * Sets the camunda task priority attribute. This is only meaningful when * the {@link #camundaType(String)} attribute has the value <code>external</code>. * * * @param taskPriority the priority for the external task * @return the builder object */ public B camundaTaskPriority(String taskPriority) { element.setCamundaTaskPriority(taskPriority); return myself; }
/** * Sets the message attribute. * * @param message the message for the message event definition * @return the builder object */ public B message(String message) { element.setMessage(findMessageForName(message)); return myself; }