Vlocity Facts #31 || Calling Integration Procedure asynchronously from Omniscripts and Integration Procedures
An asynchronous process is a process or function that executes a task "in the background" without the user having to wait for the task to finish.
Omniscripts:
By using Non-Blocking, Fire and Forget, Use Future, Use Queueable we can Integration procedure in asynchronous mode.
- Non-Blocking — Runs asynchronously, and the response is applied to the Ul. When Invoke Mode is set to non-blocking, elements using default values will not receive the response because the element loads before the response returns.
- Fire and Forget — Runs asynchronously with no callback to the Ul. A response will still appear in the debug console but will not be applied to the Data JSON.
- Use Future — Specifies that the Integration Procedure runs asynchronously, as a Salesforce future method, which can return no data to the calling OmniScript.
- Use Queueable — Which runs in Async mode, which have higher governor limits.
Integration Procedure:
If a Child IP need to be called in Async mode from parent IP then you can use remote action and make useFuture as true.
If a Child IP need to be called in Async mode from parent IP then you can use remote action and make useFuture as true.
----------------------------------------------------------------------------------------------------------
If your parent Ip has 2 child Ip's one by one and if you face any issue, for example 2nd child Ip is depend on 1st Ip response. In this scenario if 1st child Ip takes long time to execute 2nd child Ip will execute immediately with out 1st Ip response -- To avoid this we can make useFuture as true in 2nd child Ip it will wait till the 1st child Ip execution.
For other references: Integration Procedure Properties
Comments
Post a Comment