Class ProcessUtils
java.lang.Object
com.bonitasoft.processbuilder.extension.ProcessUtils
An actor filter to assign a task to a list of users based on a JSON configuration.
The configuration can include the process initiator, a list of user IDs, and/or
a list of memberships (group and role IDs) to find candidate users.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
A record representing the process initiator. -
Method Summary
Modifier and TypeMethodDescriptiongetProcessInitiator
(org.bonitasoft.engine.api.APIAccessor apiAccessor, long processInstanceId) Retrieves the user who started a specific process instance.
-
Method Details
-
getProcessInitiator
public static ProcessUtils.ProcessInitiator getProcessInitiator(org.bonitasoft.engine.api.APIAccessor apiAccessor, long processInstanceId) Retrieves the user who started a specific process instance. This method accesses the Bonita process and identity APIs to find the initiator's details. If the initiator is not found, or an unexpected error occurs, a default 'unknown_user' is returned.- Parameters:
apiAccessor
- An instance ofAPIAccessor
to get the Bonita APIs.processInstanceId
- The unique identifier of the process instance.- Returns:
- A
ProcessUtils.ProcessInitiator
record containing the initiator's ID, username, and full name.
-