ACC | Spawn workflows and automate more

Adobe Campaign, Marketing Automation
3 minutes read#JavaScript #programming #workflow

Adobe Campaign is a powerful tool for creating and managing marketing campaigns. One of its most useful features is the ability to create automated workflows. In this post, we will walk you through the process of “spawning” workflows in Adobe Campaign.

What is spawning a workflow? And why and where we can it be useful in our Adobe Campaign instance?

Imagine a technical workflow that involves exporting daily data. Every night, we export the changes in all tracking and delivery logs that occurred on the previous day. If this workflow fails without detection, we may lose data from multiple days. Fixing the issue requires modifying the exporting process to retrieve only the missing data from past days, which can be a time-consuming and labor-intensive task. However, if we create a separate workflow for each daily export, we can quickly restart any failed workflow for a specific day without losing any data or halting the process due to a failure on one day.

Another scenario where separation of workflows can be beneficial is when dealing with a technical workflow that involves frequent signal activity, with multiple calls being made every minute. In such cases, the incoming calls are queued up, leading to significant processing delays. By directing each remote call to run in a separate workflow, we can potentially achieve a major improvement in processing speed.

To address these scenarios, one possible approach is to spawn a workflow using the JSAPI function NLWS.xtkWorkflow.Spawn(). By following the steps outlined below, you can create a more robust process and potentially improve the time it takes to process data.

Step 1: Create a Workflow Template

The first step is to create a workflow template that contains all the activities you want to perform after the signal activity. Instead of using a signal activity, use a start activity and change the name to something like “start00”. Set the execution folder somewhere where all the workflows will be dumped so you have them nicely separated and later we can remove them or resolve any errors.

Step 2: Add Initialization Script

Go into the initialization script and add the following code:

var initVars = "vars.myvar1='" + vars.myvar1 + "'\n;"+
               "vars.myvar2='" + vars.myvar1 + "'\n;";

var workflowVars = 
<workflow label={"Process data " + formatDate(new Date,"- %4Y%2M%2D%02H:%02N:%02S")}
  <start name="start00">
        <start name="start00">

This code will create a new workflow every time the signal activity is triggered, with the initialization script set up as specified.

Step 3: Clean Up Service

After some time, you will end up with thousands of workflows. Ideally, you should create a clean-up service that will remove all workflows from the folder that are finished and last start time is more than 30 minutes. To do this, create another workflow scheduled to run every 30 minutes that calls the “Update Data” activity with the delete option. This will only keep all failed workflows for you to fix and restart, and workflows that are not older than 30 minutes.


In this post, we’ve shown you how to create automated workflows in Adobe Campaign. By following these steps, you can set up a system that will automatically create workflows based on a template, with the technical process logic, and clean up any completed workflows that are no longer needed. With this in place, you can save time and streamline your technical processes.

Let me know in the comments how did you used this method in your Adobe Campaign Instance?

Fade article effect on wordpress post
Building the blog, Wordpress

WP | Fade article effect on wordpress post

3 minutes read#css #php #programming #wordpress

Adding visual interest and engaging design elements to your WordPress website is an essential part of creating a great user experience. One way to accomplish this is by adding a fade effect to your post articles, which can create an attractive and engaging visual transition for readers. In this blog post, we’ll show you how […]

Continue reading
SFMC tips and tricks
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

SFMC TIP | The Power of Send Logging

1 minute read#send logging

Send logging in Salesforce Marketing Cloud is a feature that allows you to track the delivery, open, click, and other engagement metrics for the emails that you send from your account. This feature helps you to gain insights into the performance of your email campaigns and optimize them for better results. When you enable send […]

Continue reading