Newer Version Available
Configure the Client-Side Controller for a Flow Local Action
When a component is executed as a flow local action, the flow calls the invoke method in the client-side controller. To run the code
asynchronously in your client-side controller, such as when you're making an XML HTTP request
(XHR), return a Promise. When the method finishes or the Promise is fulfilled, control is
returned back to the flow.
Asynchronous Code
When a Promise is resolved, the next element in the flow is executed. When a Promise is rejected or hits the timeout, the flow takes the local action's fault connector and sets $Flow.FaultMessage to the error message.
By default, the error message is “An error occurred when the elementName element tried to execute the c:myComponent component.” To customize the error message in $Flow.FaultMessage, return it as a new Error object in the reject() call.
Synchronous Code
When the method finishes, the next element in the flow is executed.