Overview
An action is a defined workflow or process that performs a specific task in response to user interaction or other triggers. It consists of steps, conditions, and inputs that execute certain operations, similar to a "transaction" or "procedure" in traditional programming. Actions enable you to define business logic, processes, and workflows that automate tasks and interact with the platform's entities.
An action automatically generates an API endpoint, allowing it to be integrated into applications and enabling real-time execution of predefined tasks.
Key Components of an Action
1. Inputs
Inputs are parameters that define the variables used in the action, allowing dynamic behavior based on user-defined values at runtime.
Inputs can come from the UI or other systems and can be required or optional. They are validated during execution.
Example: In an employee management system, an action to approve employee leave requests might have the following inputs:
EmployeeID: The employee whose leave is being approved.
LeaveID: The specific leave request to be processed.
2. Authorization Policies
Authorization policies ensure that only authorized users can trigger or execute the action, securing the workflow.
Example: For a Leave Approval action, an authorization policy might allow only HR managers to approve leave requests, preventing unauthorized access.
3. Workflow Builder
The workflow builder lets you define the sequence of steps that the action will follow, including tasks, conditions, and decision branches.
Example: The leave approval action might have the following workflow:
Step 1: Verify the leave request (e.g., check if the leave days exceed the employee’s remaining balance).
Step 2: If valid, update the employee's leave balance and mark the request as "Approved."
Step 3: If not valid, send a rejection notification to the employee.
4. Errors
Errors define what happens when an issue occurs during the action execution. Error-handling mechanisms provide feedback or log issues.
Example: If the system encounters an invalid LeaveID during the leave approval process, the error handler might log the issue and notify the HR manager to retry the action.
5. Outputs
Outputs are the results generated once the action is completed. They may return any value from the action's context, such as success messages or updated records.
Actions in the platform enable automation by defining inputs, authorizing users, building workflows, handling errors, and generating outputs.
Last updated