Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Dynamic Workflow Creation Assistance

Manu269
All-Star
All-Star

Hello Team,

We need an assistance for creating a WF with below requirement.

1. Once the end user selects the Endpoint A with entitlements the first level of approver must be requestee manager.

2. Once the manager approves the same, the request must go to 2nd level of Approved.

3. We are using Endpoint CP 10 to contain the details of Approver.

 iF CP10-> 1 then it should go For User Group Approval. User Group Name is stored in CP11

If CP10-> 2 then it should go for Endpoint Owner Approval. Endpoint Owner is stored in Owner tab of Endpoint.

 

Can someone assist how to handle the 3rd part which is mentioned above?

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.
2 REPLIES 2

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Manu269,

1.  if-else condition to check if endpoint cp10 is 1 or 2
    
    (endpoints.customproperty10 != ' ' and
    endpoints.customproperty10 != null and
    (endpoints.customproperty10 == '1' or endpoints.customproperty10 == '2'))
   
2. If the above condition is true, then check if customproperty10 is 1:
    
    endpoints.customproperty10 != ' ' and
    endpoints.customproperty10 != null and
    endpoints.customproperty10 == '1'
    
    - If true, send the request to the following custom assignment block:   
        
SELECT userkey FROM usergroup_users 
        WHERE user_groupkey IN (
            SELECT usergroupkey FROM user_groups 
            WHERE user_groupname = '${endpoints.customproperty11}'
        )
        
    - If false (which implies customproperty10 is 2), send the request to this custom assignment block:
        
SELECT userkey FROM users where USERKEY = ${endpoints.ownerkey}
        
 
Additionally, please clarify whether customproperty10 will have numeric values 1 or 2,  or if you are referring to different approvers in points 1 and 2. 

If you mean different approvers, then above logic will not work as intended and needs to be adjusted accordingly.

Thanks
If you find the above response useful, Kindly Mark it as "Accept As Solution".

Manu269
All-Star
All-Star

@sudeshjaiswal 

    - If false (which implies customproperty10 is 2), send the request to this custom assignment block:
        
SELECT userkey FROM users where USERKEY = ${endpoints.ownerkey}
 
-- For this i used resource owner approval block and it worked.
Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.