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

Approval Workflow - Custom Assignment Task is not working

arpitapattanaik
New Contributor
New Contributor

Below process is followed while configuring Approval workflow for request access.

- Approval should go to endpoints owner manager when there any request raised by business owner

Created Custom assignment task using custom query to send approval for business owner ' manager. However it is not working as expected.

Below are tested query which worked in data analyzer however It did not work in approval workflow.

1. select manager from users where USERKEY = ${endpoints.ownerkey}

2.select u.manager from users u where u.id = ${endpoints.ownerkey}  

3. select u.manager from users u where u.userkey = '${endpoints.ownerkey}'

4. select manager from users where USERKEY = ${endpoints.requestowner} 

We tried "TASK: Owners Manager approval" as well it did not help as it is sending approval to 'admin' user.

Attached screenshots for your reference.

arpitapattanaik_0-1689073473364.png

Error screenshots from "Log viewer"

arpitapattanaik_1-1689073546958.png

 

4 REPLIES 4

armaanzahir
Valued Contributor
Valued Contributor

Hi @arpitapattanaik ,

 

Please use the variable 

${endpoint.ownerkey}

armaanzahir_1-1689074589346.png

 

Can you try the below Query and check:

select u.manager as userkey from users u where u.userkey = ${endpoint.ownerkey}

Ref: Workflow Components (saviyntcloud.com)

 

Thanks,

Armaan

Regards,
Md Armaan Zahir

I tried this as well but same issue exists.

${endpoint.ownerkey}"

I observed in logs in below.

for example, value for this query is converted as 

select manager from users where USERKEY = ${endpoints.ownerkey}

select manager from users where USERKEY = 75987

In logs, it is showing as userkey as unknown column. Here we have used alias u.id and u.userkey as well for testing but it did not help.

 

armaanzahir
Valued Contributor
Valued Contributor

Hi @arpitapattanaik ,

 

Use the alias userkey for the manager column as defined below:

select u.manager as userkey from users u where u.userkey = ${endpoint.ownerkey}

This is working in my instance.

 

Thanks,

Armaan

 

Regards,
Md Armaan Zahir

Thank you for quick response.  Provided query is working in my instance.