Skip to main content

Call Activity

  Call Activities are essential components within an Workflow, responsible for executing specific tasks reliably and efficiently. These activities are stateless, durable, and resilient, making them suitable for various operations, including:

  • Sending notifications to users or systems.
  • Updating databases with new or modified information.
  • Invoking external APIs to integrate with third-party services.

Activities are triggered using a workflow scheduling mechanism, ensuring seamless and controlled execution within the workflow framework.

Activity Invocation​

Activities are executed inside a Workflow using a scheduling method. This method supports synchronous and asynchronous execution, depending on the configuration.

Invocation Process​

  • The Workflow requests execution of an activity.
  • The activity receives input parameters and processes them.
  • Execution occurs synchronously or asynchronously based on the configuration.
  • The activity completes execution and returns a result.

Activity Implementation​

Each activity must be implemented as an independent, reusable function that adheres to the framework’s execution model.

Key Implementation Aspects​

  • Receives input data and processes it.
  • Performs a specific business operation.
  • Executes synchronously or asynchronously as per configuration.
  • Returns an output after execution.
  • Logs critical actions for monitoring and debugging.

Retry Mechanism​

To handle transient failures, activities should include retry logic. The workflow framework supports automatic retries based on predefined policies, ensuring resilience.

Retry Logic Flow​

  • If an activity fails, it triggers the retry mechanism.
  • The framework checks the retry policy.
  • A retry attempt is scheduled based on configured intervals and backoff strategies.
  • The activity retries until either success or the max retry attempts is reached.
  • If max attempts are exceeded, the activity is marked as failed.

Activity Execution Flow​

  • Workflow schedules an activity.
  • The activity executes synchronously or asynchronously based on configuration.
  • The result is returned to the Workflow.
  • The Workflow continues workflow execution based on the activity outcome.

 

Steps to Add a Call Activity Construct​

 

Step 1: Drag & Drop the Construct​

  1. Open the Logic Flow Designer Canvas.
  2. Drag and drop the Call Activity construct into the flow.

Step 2: Configure Properties​

  1. Double-click the construct to open its properties panel.
  2. Configure the required properties:

Activity Properties​

PropertyDescriptionComments
LabelLabels help developers quickly understand each step in the logic flow without examining the details of the construct.It is recommended to provide a simple precise label that improves the logic flow readability.
Activity Name*Specifies the unique name of the activity being called.Must match the registered activity name.
InputDefines the parameters passed to the activity.Should include all required values.
Execution Mode*Specifies execution as Sequential or Async.Determines flow and dependencies.
Activity HandleUnique identifier required if execution mode is Async.Required only for async execution.Activity Handle is used to track and manage asynchronous calls. Since asynchronous operations do not return responses immediately, the Activity Handle acts as a reference to monitor the execution and retrieve results when available.The response can be accessed later by explicitly awaiting the Activity Handle.e.g response = await CallEmailActivity
Output MappingMaps relevant data elements within the flow if Sequential mode is used.Ensures seamless data integration.
Enable RetryIndicates if retry logic is enabled (YES/NO).Helps handle transient failures.
Retry OptionsConfigurable retry policies (attempts, delays).Optimizes failure handling.
CommentSpecify whether to comment this construct or not. Either Yes or No.If marked as Yes, the construct is treated as a commented expression and ignored in code generation.
DescriptionA brief explanation of the CallActivity purpose.Helps users understand the CallActivity functionality.

Retry Options Sub-Properties​

PropertyDescriptionComments
First Retry IntervalInitial delay before the first retry attempt.Prevents immediate repeated failures.
Max Retry IntervalMaximum wait time between retries.Ensures retries do not extend indefinitely.
Backoff CoefficientIncreases retry intervals exponentially after each attempt.Reduces system overload.
Retry TimeoutMaximum time allowed for all retries.Ensures timely resolution.
Max Number of AttemptsLimits retry attempts before marking failure.Prevents excessive retry loops.
Exception HandlerDefines how exceptions should be managed.Ensures proper error handling.

'Note: ' + ($args[0].Groups[1].Value -replace '\r?\n', ' ')