public SSendTaskDefinitionImpl(final SendTaskDefinitionImpl activityDefinition, final Map<String, STransitionDefinition> transitionsMap) { super(activityDefinition, transitionsMap); trigger = new SThrowMessageEventTriggerDefinitionImpl(activityDefinition.getMessageTrigger()); }
public SendTaskDefinitionBuilder(final ProcessDefinitionBuilder processDefinitionBuilder, final FlowElementContainerDefinitionImpl process, final String taskName, final String messageName, final Expression targetProcess) { super(process, processDefinitionBuilder, new SendTaskDefinitionImpl(taskName, messageName, targetProcess)); if (messageName == null || messageName.isEmpty()) { processDefinitionBuilder.addError("Message is not set on the send task " + taskName); } }
/** * Sets the target flow node. * @param targetFlowNode expression representing the flow node that will receive the message. * @return */ public SendTaskDefinitionBuilder setTargetFlowNode(final Expression targetFlowNode) { getActivity().setTargetFlowNode(targetFlowNode); return this; }
/** * Adds a correlation on this send task. * <p> * It's possible to define up to five correlations. If more then five correlations are defined, the process becomes invalid. * <p> * The expressions representing correlation key and correlation value are evaluated once during the flow node initialization. * * @param correlationKey expression representing the correlation key. * @param value expression representing the correlation value. * @return */ public SendTaskDefinitionBuilder addCorrelation(final Expression correlationKey, final Expression value) { final SendTaskDefinitionImpl sendTask = getActivity(); sendTask.addCorrelation(correlationKey, value); if (sendTask.getMessageTrigger().getCorrelations().size() > 5) { getProcessBuilder().addError("The limit of correlation keys are 5 on send task: " + sendTask.getName()); } return this; }
/** * Adds a correlation on this send task. * <p> * It's possible to define up to five correlations. If more then five correlations are defined, the process becomes invalid. * <p> * The expressions representing correlation key and correlation value are evaluated once during the flow node initialization. * * @param correlationKey expression representing the correlation key. * @param value expression representing the correlation value. * @return */ public SendTaskDefinitionBuilder addCorrelation(final Expression correlationKey, final Expression value) { final SendTaskDefinitionImpl sendTask = getActivity(); sendTask.addCorrelation(correlationKey, value); if (sendTask.getMessageTrigger().getCorrelations().size() > 5) { getProcessBuilder().addError("The limit of correlation keys are 5 on send task: " + sendTask.getName()); } return this; }
public SSendTaskDefinitionImpl(final SendTaskDefinitionImpl activityDefinition, final Map<String, STransitionDefinition> transitionsMap) { super(activityDefinition, transitionsMap); trigger = new SThrowMessageEventTriggerDefinitionImpl(activityDefinition.getMessageTrigger()); }
/** * Sets the target flow node. * @param targetFlowNode expression representing the flow node that will receive the message. * @return */ public SendTaskDefinitionBuilder setTargetFlowNode(final Expression targetFlowNode) { getActivity().setTargetFlowNode(targetFlowNode); return this; }
public SendTaskDefinitionBuilder(final ProcessDefinitionBuilder processDefinitionBuilder, final FlowElementContainerDefinitionImpl process, final String taskName, final String messageName, final Expression targetProcess) { super(process, processDefinitionBuilder, new SendTaskDefinitionImpl(taskName, messageName, targetProcess)); if (messageName == null || messageName.isEmpty()) { processDefinitionBuilder.addError("Message is not set on the send task " + taskName); } }
/** * Adds a content to this message. * @param displayName expression representing the content display name. * @param messageContent expression representing the content value. * @return */ public DataDefinitionBuilder addMessageContentExpression(final Expression displayName, final Expression messageContent) { final String dataName = displayName.getContent(); // FIXME evaluate the expression final String className = messageContent.getReturnType(); return new DataDefinitionBuilder(getProcessBuilder(), getContainer(), (ThrowMessageEventTriggerDefinitionImpl) getActivity().getMessageTrigger(), dataName, className, messageContent); }
/** * Adds a content to this message. * @param displayName expression representing the content display name. * @param messageContent expression representing the content value. * @return */ public DataDefinitionBuilder addMessageContentExpression(final Expression displayName, final Expression messageContent) { final String dataName = displayName.getContent(); // FIXME evaluate the expression final String className = messageContent.getReturnType(); return new DataDefinitionBuilder(getProcessBuilder(), getContainer(), (ThrowMessageEventTriggerDefinitionImpl) getActivity().getMessageTrigger(), dataName, className, messageContent); }