Created
May 1, 2020 22:51
-
-
Save tsurdilo/a2da7243361050b1b009004df5f8cc46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public RuleSetNode ruleUnitNode(long id, String name, Function function, NodeContainer nodeContainer) { | |
RuleSetNode ruleSetNode = new RuleSetNode(); | |
ruleSetNode.setId(id); | |
ruleSetNode.setName(name); | |
//ruleSetNode.setLanguage(RuleSetNode.DRL_LANG); | |
if (ServerlessWorkflowUtils.resolveFunctionMetadata(function, RF_GROUP, workflowAppContext).length() > 0) { | |
ruleSetNode.setRuleType(RuleSetNode.RuleType.of(ServerlessWorkflowUtils.resolveFunctionMetadata(function, RF_GROUP, workflowAppContext), | |
RuleSetNode.DRL_LANG)); | |
} else { | |
LOGGER.error("unable to set rule unit"); | |
} | |
ruleSetNode.addInMapping(DEFAULT_WORKFLOW_VAR, DEFAULT_WORKFLOW_VAR); | |
ruleSetNode.addOutMapping(DEFAULT_WORKFLOW_VAR, DEFAULT_WORKFLOW_VAR); | |
nodeContainer.addNode(ruleSetNode); | |
return ruleSetNode; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment