Hi All,
Is there any script to execute pending tasks in a workflow that is in a scheduled state in Adobe campaign classic version 7?
I tried using xtk.workflow.Start, xtk.workflow.Restart. When a workflow is not scheduled, I'm able to start and restart it, but when it is scheduled, I'm unable to execute pending tasks. Can anyone help with the script to execute a pending task in Adobe campaign classic version 7?
Thanks in advance,
Sujith kumar.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @Sujith_02kumar ,
You can use Wakeup method from one workflow to 'execute pending task' of the scheduler of another workflow.
WKF1: workflow with scheduler (workflow in started state)
WKF2: Create a JavaScript code activity, and paste the below script and run the workflow.
xtk.workflow.Wakeup("internal_name_of_the_workflow");
Once you Ran the Workflow-2 script, it will execute the pending task of scheduler in Workflow-1.
Hope you get a solution!
Hello @Sujith_02kumar ,
why is this needed? If you succeed the scheduler will trigger at scheduled time and might cause e.g. delivery will trigger twice. But anyway here is how you can solve your problem:
You just add another start activity and with your command you can start workflow from where is needed.
//start workflow from another workflow
NLSW.xtkWorkflow.Start('WKF01');
Marcel Szimonisz
MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/
Views
Replies
Total Likes
Thank you @Marcel_Szimonisz ,
Due to delivery sequence issue, my workflow is getting into failed state often, we are fixing this issue till then i need to trigger workflow manually which is in scheduled state. I have created a script that will check all the workflow which is failed state and i can restart but i was not able to trigger today's communication. Each and every time i need to execute pending tasks in my scheduler. So i thought if we have some script it would be easy. Thanks for your solution.
Views
Replies
Total Likes
Hi @Sujith_02kumar ,
You can use Wakeup method from one workflow to 'execute pending task' of the scheduler of another workflow.
WKF1: workflow with scheduler (workflow in started state)
WKF2: Create a JavaScript code activity, and paste the below script and run the workflow.
xtk.workflow.Wakeup("internal_name_of_the_workflow");
Once you Ran the Workflow-2 script, it will execute the pending task of scheduler in Workflow-1.
Hope you get a solution!
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies