Interface WorkflowUsers


public interface WorkflowUsers
Workflow bean providing access to user related functionalities. Don't use this outside of a workflow. The bean will be accessible by using 'users' in your workflow expressions.
  • Method Details Link icon

    • getUserIds Link icon

      Set<UUID> getUserIds(String expression)
      Retrieves all the user Ids from a comma separated string of user expressions.
      Parameters:
      expression - The comma separated list of user expressions
      Returns:
      A Set of user ids.
    • getUsers Link icon

      Set<com.collibra.dgc.core.api.model.user.User> getUsers(String expression)
      Retrieves all the users from a comma separated string of user expressions.
      Parameters:
      expression - The comma separated list of user expressions.
      Returns:
      A Set of Users.
    • getUserIdsFromRoles Link icon

      Set<UUID> getUserIdsFromRoles(String roles)
      Retrieve the userIds from a comma separated list of roles.
      Parameters:
      roles - The csv string of roles to convert to user Ids.
      Returns:
      A set of user ids.
    • getUsersFromRoles Link icon

      Set<com.collibra.dgc.core.api.model.user.User> getUsersFromRoles(String roles)
      Retrieve the users from a comma separated list of roles.
      Parameters:
      roles - The csv of roles to convert to users.
      Returns:
      A Set of Users.
    • getRoleIds Link icon

      Set<UUID> getRoleIds(String roleNames)
      Retrieves all the role Ids from a comma separated string of role names. When a corresponding role is not found for a given role name, no roleId is added to the result Set.
      Parameters:
      roleNames - The comma separated list of role names
      Returns:
      A Set of role ids.
    • getRoleId Link icon

      UUID getRoleId(String roleName)
      Retrieves the role Id for the given roleName.
      Parameters:
      roleName - The name of the role to retrieve the role id for.
      Returns:
      The roleId of the given roleName, null if role not found
    • runAsUserById Link icon

      void runAsUserById(UUID userId, Runnable runnable)
      Run the given runnable logic as a given user. The logic will be executed in a separate transaction.
      Parameters:
      userId - the user id of the user
      runnable - the runnable logic
    • getCurrent Link icon

      String getCurrent()
      Return the current user name.
      Returns:
      the current user name
    • getUserNamesCsv Link icon

      String getUserNamesCsv(String expression)
      Converts a Candidate user expression to a comma separated list of user names using the current workflow business item.
      Parameters:
      expression - The candidate user expression
      Returns:
      A String of user names, comma separated
    • getUserNames Link icon

      Set<String> getUserNames(String expression)
      Converts a Candidate user expression to a Set of user names using the current workflow business item.
      Parameters:
      expression - The candidate user expression
      Returns:
      A Set of user names
    • isEmpty Link icon

      boolean isEmpty(String expression)
      Analyses the given expression and indicates if the expression resolves to any user or not.
      Parameters:
      expression - The expression to check for emptyness
      Returns:
      true if the expression is empty, false otherwise.
    • getUserNamesWithParticipatePermissionWithError Link icon

      Set<String> getUserNamesWithParticipatePermissionWithError(String expression)
      Converts a Candidate user expression to a Set of user names using the current workflow business item with Participate Permissions.
      Parameters:
      expression - The candidate user expression
      Returns:
      A Set of user names
    • getUserNamesWithError Link icon

      Set<String> getUserNamesWithError(String expression)
      Converts a Candidate user expression to a Set of user names using the current workflow business item.
      Parameters:
      expression - The candidate user expression
      Returns:
      A Set of user names
    • runAsUserByUserName Link icon

      void runAsUserByUserName(String userName, Runnable runnable)
      Run the given runnable logic as a given user. The logic will be executed in a separate transaction.
      Parameters:
      userName - the username of the user
      runnable - the runnable logic