and more in a single search tool across platforms. Read the announcement here. |
12/07/2023 09:39 AM
Trying to create role mdofication workflow where we need to get the role owner . Here am using the custom assignment as we dont have any hooks for role management workflows.
I have tried using the
select ro.userkey from role_owners ro,roles r where ro.rolekey=r.rolekey and r.role_name=${requestaccessobj.id}
This is not working it throws SQL error. How do we enable the role owner approval for role modification requests.
Solved! Go to Solution.
12/07/2023 10:05 AM
select userkey from users where username in
(SELECT SUBSTRING_INDEX(newvalue, ' ', 1) FROM roles_historychangelog rhcl, ars_requests ar, request_access ra
WHERE ar.REQUESTKEY =ra.REQUESTKEY and ar.requestkey=${ARSREQUEST.id} and rhcl.FIELDNAME in ('OWNER','Role Owner')
and rhcl.ROLEHISTORYKEY=ra.accesskey and ra.accesstype = 1
and ra.requesttype = 3 and substring_index(substring_index(NEWVALUE, ' ', -1),']', 1) = 1) UNION select userkey from role_owners where rank = 1 and rolekey in
(select distinct r.rolekey from roles_historychangelog rhcl, ars_requests ar, request_access ra,roles r
WHERE ar.REQUESTKEY =ra.REQUESTKEY and ar.requestkey=${ARSREQUEST.id} and rhcl.ROLEHISTORYKEY=ra.accesskey and ra.accesstype = 1
and ra.requesttype = 3 and r.ROLEKEY = rhcl.ROLEKEY)
12/08/2023 05:44 AM
1. wondering why would be need union query to get the role owner from roles.
2.here it seems it is retrieving the owner with rank 1 only.
3.i dont see this roles_historychangelog table in DA...where did you find the table schema ?
4.Does modifying the roles is also treated as ars_requests?
12/08/2023 09:15 AM
12/08/2023 10:13 AM
nope its not working .
12/08/2023 10:49 AM
01/05/2024 11:27 AM
This works fine. Now that the requirement changed , we need to check the role owner existence based on which the flow is redirected
have tried role.ownerrank1() and also role.getownerrank1()
these are not working
01/05/2024 04:16 PM - edited 01/05/2024 04:17 PM
So if role owner not exists then whats will be flow ?
below condition if role owner and requestor same then auto approve
role.getOwnerRank1().contains(user.username) eq true
01/08/2024 09:04 AM
can't we directly check the roleowenerslist.size()? do we need to check specifically for the rank1 and rank2 ??
01/08/2024 10:33 AM
We can check
12/07/2023 10:14 AM
12/08/2023 07:27 AM
@trivi Did you check Workflow Components (saviyntcloud.com)
select userkey from role_owners where rolekey=${REQUESTACCESSOBJ.id} and rank = 1