public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception { if (!(parentElement instanceof SequenceFlow)) { return; } ((SequenceFlow) parentElement).setConditionExpression(xtr.getElementText().trim()); } }
protected void setOutcomeConditionExpression(SequenceFlow flow, JsonNode expressionNode) { Long formId = null; if (expressionNode.get("outcomeFormId") != null && !(expressionNode.get("outcomeFormId").isNull())) { formId = expressionNode.get("outcomeFormId").asLong(); } String operator = null; if (expressionNode.get("operator") != null && expressionNode.get("operator").isNull() == false) { operator = expressionNode.get("operator").asText(); } String outcomeName = null; if (expressionNode.get("outcomeName") != null && !(expressionNode.get("outcomeName").isNull())) { outcomeName = expressionNode.get("outcomeName").asText(); } if (formId != null && operator != null && outcomeName != null) { flow.setConditionExpression("${form" + formId + "outcome " + operator + " " + outcomeName + "}"); addExtensionElement("conditionFormId", String.valueOf(formId), flow); addExtensionElement("conditionOperator", operator, flow); addExtensionElement("conditionOutcomeName", outcomeName, flow); } }
protected void setFieldConditionExpression(SequenceFlow flow, JsonNode expressionNode) { String fieldId = null; if (expressionNode.get("fieldId") != null && !(expressionNode.get("fieldId").isNull())) { fieldId = expressionNode.get("fieldId").asText(); } String operator = null; if (expressionNode.get("operator") != null && !(expressionNode.get("operator").isNull())) { operator = expressionNode.get("operator").asText(); } String value = null; if (expressionNode.get("value") != null && !(expressionNode.get("value").isNull())) { value = expressionNode.get("value").asText(); } if (fieldId != null && operator != null && value != null) { flow.setConditionExpression("${" + fieldId + " " + operator + " " + value + "}"); addExtensionElement("conditionFieldId", fieldId, flow); addExtensionElement("conditionOperator", operator, flow); addExtensionElement("conditionValue", value, flow); } }
flow.setConditionExpression(conditionNode.asText()); flow.setConditionExpression(expressionNode.get("staticValue").asText());
public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception { if (parentElement instanceof SequenceFlow == false) return; ((SequenceFlow) parentElement).setConditionExpression(xtr.getElementText().trim()); } }
public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception { if (parentElement instanceof SequenceFlow == false) return; ((SequenceFlow) parentElement).setConditionExpression(xtr.getElementText().trim()); } }
protected void setOutcomeConditionExpression(SequenceFlow flow, JsonNode expressionNode) { Long formId = null; if (expressionNode.get("outcomeFormId") != null && expressionNode.get("outcomeFormId").isNull() == false) { formId = expressionNode.get("outcomeFormId").asLong(); } String operator = null; if (expressionNode.get("operator") != null && expressionNode.get("operator").isNull() == false) { operator = expressionNode.get("operator").asText(); } String outcomeName = null; if (expressionNode.get("outcomeName") != null && expressionNode.get("outcomeName").isNull() == false) { outcomeName = expressionNode.get("outcomeName").asText(); } if (formId != null && operator != null && outcomeName != null) { flow.setConditionExpression("${form" + formId + "outcome " + operator + " " + outcomeName + "}"); addExtensionElement("conditionFormId", String.valueOf(formId), flow); addExtensionElement("conditionOperator", operator, flow); addExtensionElement("conditionOutcomeName", outcomeName, flow); } }
protected void setFieldConditionExpression(SequenceFlow flow, JsonNode expressionNode) { String fieldId = null; if (expressionNode.get("fieldId") != null && expressionNode.get("fieldId").isNull() == false) { fieldId = expressionNode.get("fieldId").asText(); } String operator = null; if (expressionNode.get("operator") != null && expressionNode.get("operator").isNull() == false) { operator = expressionNode.get("operator").asText(); } String value = null; if (expressionNode.get("value") != null && expressionNode.get("value").isNull() == false) { value = expressionNode.get("value").asText(); } if (fieldId != null && operator != null && value != null) { flow.setConditionExpression("${" + fieldId + " " + operator + " " + value + "}"); addExtensionElement("conditionFieldId", fieldId, flow); addExtensionElement("conditionOperator", operator, flow); addExtensionElement("conditionValue", value, flow); } }
flow.setConditionExpression(conditionNode.asText()); flow.setConditionExpression(expressionNode.get("staticValue").asText());
/** * Add a sequence-flow to the current process from source to target. * Sequence-flow name is set to a user-friendly name, containing an * incrementing number. * * @param conversion * @param sourceActivityId * @param targetActivityId * @param condition */ protected SequenceFlow addSequenceFlow(WorkflowDefinitionConversion conversion, String sourceActivityId, String targetActivityId, String condition) { SequenceFlow sequenceFlow = new SequenceFlow(); sequenceFlow.setId(conversion.getUniqueNumberedId(getSequenceFlowPrefix())); sequenceFlow.setSourceRef(sourceActivityId); sequenceFlow.setTargetRef(targetActivityId); if (StringUtils.isNotEmpty(condition)) { sequenceFlow.setConditionExpression(condition); } conversion.getProcess().addFlowElement(sequenceFlow); return sequenceFlow; }