Copado Actions Overview
A Copado action is the API of the Copado Multi-Cloud platform. Actions consist of three main parts:
- Invocable method
Let’s describe these in more detail.
The Apex invocable method used by the standard Copado actions includes the following:
Body of the action
It validates the request and the user permissions and licenses, and calculates the job request and the action response.
Global action request
The parameters sent by whoever is calling this method (an Apex page, a Lightning web component, a flow, a REST service, etc.).
Private job execution request
The action request, plus the data that the job template will need to perform its function.
Global action response
The data needed for the caller, e.g., the new Promotion record created, the job execution to monitor, etc.
Job execution callback
The actions that will be performed once the job finishes, for instance, changing the status of a field.
The execution part consists of a job template that contains all the steps required to perform the action. It can include a flow or a function. For more information about job templates, review the Job Templates Overview article.
You can use a callback Apex class to apply some custom logic when the job execution ends, such as updating fields. This callback is applied to all the steps in the job execution.