diff --git a/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/main/java/org/kie/kogito/serverless/workflow/suppliers/ProduceEventActionSupplier.java b/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/main/java/org/kie/kogito/serverless/workflow/suppliers/ProduceEventActionSupplier.java index 71001997875..e53e57f69c9 100644 --- a/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/main/java/org/kie/kogito/serverless/workflow/suppliers/ProduceEventActionSupplier.java +++ b/kogito-serverless-workflow/kogito-serverless-workflow-builder/src/main/java/org/kie/kogito/serverless/workflow/suppliers/ProduceEventActionSupplier.java @@ -38,6 +38,7 @@ import io.serverlessworkflow.api.Workflow; import static com.github.javaparser.StaticJavaParser.parseClassOrInterfaceType; +import static org.jbpm.ruleflow.core.Metadata.MAPPING_VARIABLE_INPUT; public class ProduceEventActionSupplier extends SWFProduceEventAction implements ExpressionSupplier { @@ -49,7 +50,8 @@ public ProduceEventActionSupplier(Workflow workflow, String trigger, String varN @Override public Expression get(KogitoNode node, ProcessMetaData metadata) { - return AbstractNodeVisitor.buildProducerAction(parseClassOrInterfaceType(SWFProduceEventAction.class.getCanonicalName()), TriggerMetaData.of(node), metadata) + return AbstractNodeVisitor.buildProducerAction(parseClassOrInterfaceType(SWFProduceEventAction.class.getCanonicalName()), TriggerMetaData.of(node, (String) node.getMetaData() + .get(MAPPING_VARIABLE_INPUT)), metadata) .addArgument(new StringLiteralExpr(exprLang)) .addArgument(data != null ? new StringLiteralExpr().setString(data) : new NullLiteralExpr()); }