pefernan commented on code in PR #3490:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3490#discussion_r1587411369
##########
jbpm/jbpm-flow/src/main/java/org/jbpm/ruleflow/core/factory/NodeFactory.java:
##########
@@ -71,4 +78,29 @@ public Mappable getMappableNode() {
return (Mappable) node;
}
+ public T onEntryAction(String dialect, String action) {
+ return onActionScript(ExtendedNodeImpl.EVENT_NODE_ENTER, dialect,
action, null);
+ }
+
+ public T onExitAction(String dialect, String action) {
+ return onActionScript(ExtendedNodeImpl.EVENT_NODE_EXIT, dialect,
action, null);
+ }
+
+ public T onActionScript(String type, String dialect, String script, Action
compiledScript) {
+ DroolsConsequenceAction action = new DroolsConsequenceAction(dialect,
script);
+ if (compiledScript != null) {
+ action.setMetaData("Action", compiledScript);
+ }
+ if (getExtendedNode().getActions(type) == null) {
+ List<DroolsAction> actions = new ArrayList<>();
+ actions.add(action);
+ getExtendedNode().setActions(type, actions);
+ }
+ getExtendedNode().getActions(type).add(action);
Review Comment:
+1 efectivelly with this scripts are executed twice
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]