You are here:
ActionListService:processOnCreateActions
This service executes the Vlocity Action set on the State Model version of the object.
Because the OnCreate action is designed to execute when the object is created, this method can be called after the insert trigger of the target object. The service executes the OnCreate actions associated with the list of object Ids passed to it.
Or, this service can pass a map of optional parameters, which are passed to the OnCreate action that is going to be executed.
This service is not like the other services that implement VlocityOpenInterface2. The signature for this service is:
processOnCreateActions(List<Id> objectIds, Map<String, Object> output, Map<String, Object> options
Class: ActionListService
Method: processOnCreateActions
How It Works
-
The service takes the list of object Ids and finds the state model, state model version, and the OnCreate Vlocity Action associated with the state model version level.
-
The service executes the invoke method defined in the action.
The input for the action is the object Id under the key "id." Example: "Id": "0Q06g000000ZE7vCAG"
-
The service passes the result of the execution in the output map with the objectId and OnCreate output.

