How to send payload with GenerateSignalUrl() #5626
Replies: 1 comment 1 reply
-
To add a payload to the Here's an example of how you can modify the .WithBody(context =>
{
var documentId = context.GetVariable<string>("DocumentId"); // Assuming you have a variable with the document ID
var approvalUrl = context.GenerateSignalUrl("ApprovelevelsV4", new { id = documentId }); // Add the document ID as a query string parameter
return $"Document received for review.<br><a href=\"{approvalUrl}\">Approve</a><br>counter: {context.GetVariable<int>("counter")}";
}) In this example, the Please note that the actual method signature and usage might differ based on the version of Elsa Workflows you are using. If you are using Elsa 2, the above example should work. However, if you are using Elsa 3, you might need to adjust the code according to the new API changes. This comment was generated by Glime. |
Beta Was this translation helpful? Give feedback.
-
var approvalUrl = context.GenerateSignalUrl("ApprovelevelsV4");
In the Above GenerateSignalUrl method I want to add the payload some id or something because the correlation Id will be the same for a workflow
Code will be Like this
}
Beta Was this translation helpful? Give feedback.
All reactions