AssignOwner Use Examples
AssignOwner using *User
In this example the owner of the request is assigned to a specific user. AssignOwner is called in StatusArrival. Please note that the UserId you use in the OwnerId field must exists in EPUsers table. Fail to do so will cause the other services like GetRequestsInQueue not working as expected.
In EP_Workflow_Request_Owners table, you will see the owner of the request is updated to the UserId in OwnerId field.
AssignOwner using *Role
This is an example if you assign the owner to a group of users. AssignOwner is called in StatusArrival. Please note that the role name in OwnerId field must be added first in workflow. Please refer to workflow document for adding roles and role users.
In the log, you can see the service returns 1 field shows it runs successfully or not.
In EP_Workflow_Request_Owners table, you will see the owner is updated to Admin role. All the users you added to this role will be the owner.
AssignOwner using *UserProperty
This is an example that we set the owner to all users with UserAuthorizationType = Manager.
In the request owner table, you will see the value in the corresponding fields. When you call GetRequestsInQueue service, if the user has UserAuthorizationType = Manager, the request Id will be returned.
This works because each record in the EP_Users table has a property called UserAuthorizationType. It will use the “UserAuthorizationType” and “Manager” values given to filter the EP_Users table to assign ownership to the subset of the EP_Users table selected with that given filter.