Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards

xtk.workflow.PostEvent in Delivery Template

Avatar

Level 3

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

Topics help categorize Community content and increase your ability to discover relevant content.

3 Replies

Avatar

Community Advisor

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

Avatar

Level 3

Hi @ParthaSarathy,

 

I'd like to send delivery variables to the 'ccStageAlerts' workflow, not the other way around.

 

Thanks,

Skyler

Avatar

Level 3

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,