Skip to content

Commit

Permalink
fix producer trigger in serverless workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
elguardian committed Jun 13, 2024
1 parent 346efa5 commit 69622af
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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());
}
Expand Down

0 comments on commit 69622af

Please sign in to comment.