use of org.jbpm.bpmn2.core.Expression in project kogito-runtimes by kiegroup.
the class CorrelationPropertyHandler method buildMessagePathExpression.
private Expression buildMessagePathExpression(NodeList childNodes, ExtensibleXmlParser parser) {
for (int i = 0; i < childNodes.getLength(); i++) {
Node node = childNodes.item(i);
if ("messagePath".equals(node.getNodeName())) {
Element expressionElement = (Element) node;
Expression expression = new Expression();
expression.setId(expressionElement.getAttribute("id"));
expression.setLang(expressionElement.getAttribute("language"));
expression.setScript(expressionElement.getTextContent());
expression.setOutcomeType(HandlerUtil.definitions(parser).get(expressionElement.getAttribute("evaluatesToTypeRef")).getStructureRef());
return expression;
}
}
throw new RuntimeException("message Path not found for correlation property " + parser.getCurrent());
}
Aggregations