Hello,
I have added the following javascript code to a copy of the notifySupervisor template in order to send workflow failure alerts to an ACC workflow for further processing:
<%
xtk.workflow.PostEvent("ccStageAlerts","signal","",<variables workflowLabel = {dataSource.workflowLabel} workflowName = {dataSource.workflowName} taskName = {dataSource.taskName} instanceName = {dataSource.instanceName}/>,false);
%>
This javascript is executed as expected and the data is sent to the 'ccStageAlerts', however, the HTML compiler fails because it does not recognize the "xtk" classification, so the delivery does not get sent.
Is there another way to post an event to a workflow from within a delivery?
Thanks,
Skyler
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @SkylerQu2 ,
Store the variable in your 'ccStageAlerts' workflow and to call these variables in delivery refer this section - Calling a Variable in the Content of the Delivery
Views
Replies
Total Likes
Hi @ParthaSarathy,
I'd like to send delivery variables to the 'ccStageAlerts' workflow, not the other way around.
Thanks,
Skyler
Views
Replies
Total Likes
Hi @SkylerQu2,
Since you want to send variables from the delivery to the ‘ccStageAlerts’ workflow, here’s what I’d suggest:
- Use a JavaScript activity inside the workflow itself to handle and process those variables when the workflow runs.
- From the delivery side, it’s not really possible to call xtk.workflow.PostEvent directly in the delivery content (that environment doesn’t support it). Instead, you could trigger the workflow externally—like via an API call or some other process that has the right permissions and context.
- If your delivery is actually triggered by a workflow, another option is to pass those variables through the workflow context before sending the delivery, so the workflow already has everything it needs when it runs.
Thanks,
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies