
Understanding Synchronous and Asynchronous Function Calls in Workato
January 15, 2025
Understanding Synchronous and Asynchronous Function Calls in Workato
January 15, 2025
Handling Errors in Synchronous Function Calls in Workato
As an automation developer, I’ve always prioritized building efficient and error-resilient workflows. When I first implemented an asynchronous approach to function calls in Workato, I expected improved performance and parallel execution. However, I quickly realized that error tracking became a challenge — debugging required manual investigation across multiple child functions, leading to delays in resolving failures.
This challenge became even more evident in real-world scenarios, such as employee onboarding. In today’s dynamic work environments, provisioning new employees with access to essential tools like Salesforce, Slack, Zoom, JIRA, and Confluence is critical for seamless integration. When a new employee is created in BambooHR, their profile must be provisioned across these applications, ensuring the right access to groups, accounts, and resources. Any failure in this process can disrupt workflows, causing onboarding delays and operational inefficiencies.
To address these challenges, I shifted to synchronous function calls — a move that significantly improved error visibility, streamlined troubleshooting, and enhanced process control. This blog will explore how Workato leverages synchronous function calls to handle errors efficiently, ensuring smooth automation, minimizing failures, and improving operational reliability.
Recipe Structure Overview
Before diving into the workflow, it's essential to understand how Workato structures its automation recipes. A recipe is a set of automated steps that execute a business process. In complex workflows, recipes often include parent, child, and subchild function calls to ensure a logical execution order and structured error handling.
- Parent Recipe: The main automation that coordinates the entire process, calling child recipes and managing execution flow.
- Child Function Calls: These are modular tasks that handle specific processes, such as provisioning an account in a particular application.
- Sub-child Function Calls: These functions perform sub-tasks within child recipes, such as updating user details after account creation.
Understanding this hierarchy is crucial for effective error management, as each level has its own error-handling mechanisms that feed back into the parent recipe for centralized tracking and resolution.
Understanding the Workflow
1. Parent Recipe: Provisioning User Access
As we can see in the figure below, the parent recipe initiates the provisioning process by calling various child functions responsible for setting up accounts and access rights in different applications. It ensures that each function executes correctly before moving to the next step, providing a structured and reliable way to manage onboarding automation.
2. Child Function Calls: Application-Specific Provisioning
Each child function call handles access provisioning for specific applications:
- Salesforce – Creating accounts and assigning group access.
- Slack – Setting up workspaces and roles.
- JIRA – Assigning issue tracking permissions.
3. Subchild Function Calls: Updating User Details
Some processes require subchild function calls to update user details, ensuring all applications have synchronized user data.
4. Transition to Synchronous Calls
To address the challenges faced while using asynchronous function calls, the process was redesigned using synchronous function calls, ensuring that:
- The parent recipe waits for each function to complete before proceeding.
- Errors are immediately visible and handled proactively.
- Better workflow control minimizes the risk of incomplete onboarding.
5. Error Message Handling in Synchronous Calls
- If a child function fails (e.g., Salesforce provisioning error), it returns an error message to the parent recipe.
- The parent recipe then evaluates the error message before proceeding.
6. Tracking Errors with Job Tables
A custom job table provides real-time tracking of each function’s status, allowing teams to:
- Quickly identify which function failed.
- Debug errors efficiently.
- Maintain visibility into the onboarding workflow.
7. Autonomous Error Handling: Alerts & Notifications
- The Autonomous Operations Framework (AOF) ensures that errors trigger automated responses:
- Slack or Email Alerts: Immediate notifications to relevant teams.
- Conditional Logic: The parent recipe detects errors and determines whether to retry or escalate the issue.
- Workflow Continuity: Even if one function fails, the rest of the onboarding process continues.
Best Practices for Synchronous Error Handling
- Set Up Alerts (AOF): Automate notifications for faster resolution.
- Implement Conditional Logic: Handle errors dynamically without stopping the entire workflow.
- Track Status with Job Tables: Ensure clear visibility into each function call’s success or failure.
- Balance Efficiency & Control: Optimize performance while maintaining robust error handling.
Key Takeaways
Switching to synchronous function calls results in:
- Improved error visibility by ensuring real-time detection.
- Enabled faster issue resolution with automated tracking and notifications.
- Enhanced onboarding reliability, ensuring employees get access to necessary tools without delay.
Looking to make your automation more reliable? Let’s connect —
we will help you build workflows that don’t just run — they run right.
About the Author
Aishwarya Bhangale
Meet Aishwarya, our Associate Software Engineer, who has transformed business processes through innovative automation solutions. She has designed and implemented seamless integrations across platforms like Workday, Slack, and Google, optimizing workflows and enhancing operational efficiency. Her expertise in Salesforce and Workato has streamlined IT support, improved data synchronization, and empowered teams with powerful tools like Slack bots and AI-driven knowledge automation. Aishwarya’s dedication to excellence and passion for innovation drive impactful results in every project she undertakes.