The Sub-workflow activity in Adobe Campaign Classic is a very powerful tool that allows you to incorporate and execute reusable workflows within your main workflow. It enables you to modularize and streamline your workflow design by breaking down complex processes into smaller, manageable components.
With the Sub-workflow activity, you can create separate workflows that handle specific tasks or actions and then include them as sub-workflows within your main campaign workflow. This promotes reusability, as you can use the same sub-workflow in multiple campaign workflows, saving time and effort in workflow creation and maintenance.
Key features and benefits of the Subworkflow activity in Adobe Campaign include:
Workflow Modularity: Sub-workflows act as independent modules, focusing on specific actions or processes. This improves workflow organization and readability, making it easier to understand and maintain complex campaign workflows.
Reusability: You can reuse sub-workflows in multiple campaign workflows, avoiding duplication of effort. This promotes consistency and reduces the need to recreate similar workflows from scratch.
Workflow Composition: By integrating sub-workflows, you can create sophisticated and flexible campaign workflows by combining multiple reusable components. This allows for a modular approach to workflow design, enhancing overall workflow efficiency.
Granular Control: Sub-workflows can be customized and configured with specific settings, parameters, and input/output variables. This provides granular control over each sub-workflow’s behavior and enables seamless integration with the main campaign workflow.
Improved Collaboration: Sub-workflows facilitate collaboration among campaign managers and workflow designers by enabling them to work on specific components independently. Changes made to a sub-workflow are automatically reflected in all campaign workflows that include it.
Improved Readability: The workflow can accommodate only a certain number of activities, as we are all limited by the same canvas size. Surely, you have encountered a workflow that contains numerous jump points, requiring you to scroll left and down to navigate. In such cases, we can utilize the Sub-workflow activity to encapsulate specific blocks of activities. This approach transforms the block into a black box-like function that performs its designated tasks without occupying excessive space on the workflow canvas. By employing this technique, we can effectively manage complex workflows while optimizing the use of available space.
How does the sub-workflow activity work
When executing a Sub-workflow activity, a new workflow is generated and initiated using the target population from the main workflow. After the sub-workflow successfully completes its execution, the temporary workflow created for it will be automatically removed, ensuring a clean workflow environment.
In the event of a sub-workflow failure, the details and logs of the failed sub-workflow will be available for further debugging. These can be accessed in the designated execution folder, allowing you to identify and address any issues. Once the necessary fixes or adjustments are made, you can proceed by pressing “play” or restarting the main workflow.
It’s important to note that any modifications or tweaks made during the execution of the sub-workflow are only applicable to the temporary workflow and do not impact the original template. If changes are required, they should be applied to the template itself. This ensures that the sub-workflow retains its intended structure and behavior, as modifications made within the temporary workflow will be discarded once it is removed.
How to set sub-workflow activity
To be able to use Sub-workflow activity we will need to create workflow template that will be used in the Sub-workflow activity of the main workflow.
- Build a technical workflow and execute it, making adjustments as needed until you are satisfied with its performance and results.
- Duplicate the workflow and save it as a template, leaving the default settings intact during the template creation process. You can change the execution folder if you wish to be aligned with the type of subworkflow you build e.g. if it is campaign worklfow use
Campaign workflowsand if it is technical worklfow then use
- Integrate a “Jump (end point)” and a “Jump (Start point)” activity into the workflow, ensuring that the jump number of the end point is lower than that of the start point.
- Save the modified template.
- Create a new workflow and add a Sub-workflow activity. Choose the previously saved workflow template as the sub-workflow.
- Execute the main workflow to initiate the process.
Example sub-workflow activity
In our example, we will develop a waterfall diagram feature that allows us to visualize the anticipated drop in recipient target before actually executing the campaign workflow and applying typology rules to the actuall delivery. We intentionally do not exclude the target population in order to observe the corresponding drop in the delivery logs for subsequent data analysis.
To achieve this, we utilize a Fork activity at the beginning of the workflow to make the incoming target population available as an output of the sub-workflow. This ensures that the target population remains intact and accessible for further processing.
For actual waterfall we have implemented a Split activity to accommodate any filtering rules specified in the typology rules or on the delivery template. This includes actions such as deduplication, quarantine, and opt-out, which may impact the distribution of recipients within the workflow. Not demonstrated in our specific example, we can extend the functionality by reconciling our target population with the nms:address table. This reconciliation allows us to identify and account for recipients who have been quarantined.
instance.vars but in my case I went and used
vars. only. You can read more about variables in Adobe Campaign Classic them in my blog post)
vars.optOut = vars.recCount;
Jump (end point): jump number has to be lower than the Jump (start point)
Jump (start potint): has to be greater then Jump (end point)
Workflow logic: any business logic you want to achieve with the sub-workflow
The Sub-workflow activity can be applied in various scenarios to enhance workflow management and promote modularization and code reusability. Here are some examples where the Sub-workflow activity can be useful:
Data Processing: Use sub-workflows to perform specific data processing tasks such as data cleansing, data transformation, or data enrichment. These sub-workflows can be reused across multiple campaigns or workflows, ensuring consistent and efficient data processing.
Personalization: Implement sub-workflows to handle personalized content generation or dynamic content insertion. Sub-workflows can fetch personalized data, apply rules for content personalization, and generate customized content for each recipient.
Decision Making: Create sub-workflows to handle decision-making processes within larger workflows. These sub-workflows can evaluate conditions, perform calculations, or make complex decisions based on input data, simplifying the main workflow and improving its readability.
Notification Systems: Develop sub-workflows that handle notifications or alerts within a larger workflow. These sub-workflows can trigger notifications based on specific events or conditions, such as sending email notifications to administrators or updating a notification log.
API Integration: Utilize sub-workflows to integrate with external APIs or systems. These sub-workflows can handle the interaction with the external services, retrieve data, perform necessary transformations, and pass the results back to the main workflow for further processing.
Error Handling: Implement sub-workflows to handle error or exception scenarios. These sub-workflows can catch and handle errors, perform error logging, send notifications, or initiate recovery actions to ensure the overall workflow execution remains stable and resilient.
Workflow Orchestration: Use sub-workflows to orchestrate complex workflows by breaking them down into smaller, manageable components. Each sub-workflow can handle a specific task or step, and the main workflow coordinates the execution and sequencing of these sub-workflows.
Do you have any other implementation examples or use cases? Let me know in the comments.