Click HERE to see how Saviynt Intelligence is transforming the industry. |
04/18/2024 08:29 AM
Hi Team,
We are trying below query to reopent the errored task in ARS through analytics. Please confirm if below query is good to proceed.
select taskkey as tasks, STATUS , provisioningtries, 'reopenTasks' as 'Default_Action_For_Analytics' from arstasks where status=8 and PROVISIONINGTRIES>1 and taskkey='<add taskkey>';
Solved! Go to Solution.
04/18/2024 12:13 PM - edited 04/18/2024 01:38 PM
Hi @asharma ,
For failed task, we are using below query. Its similar as you are using with additional filters.
select
taskkey as tasks,
(select username from users where userkey = ars.userkey) as Requestee,
(select concat(firstname,' ',lastname) from users where userkey = ars.userkey) as 'Requestee Name',
CASE
when tasktype = 1 then "Add access"
when tasktype = 2 then "Remove access / Account"
when tasktype = 3 then "New account"
when tasktype = 4 then "Role request"
when tasktype = 5 then "Change password"
when tasktype = 6 then "Enable account"
when tasktype = 8 then "Delete account"
when tasktype = 9 then "Update user"
when tasktype = 12 then "Update account"
when tasktype = 14 then "Disable account"
when tasktype = 18 then "Create user (From create user tile)"
when tasktype = 19 then "Update user (From update user tile)"
when tasktype = 24 then "Create entitlement"
when tasktype = 25 then "Add access entitlement"
when tasktype = 26 then "Remove access entitlement"
when tasktype = 27 then "Update entitlement"
when tasktype = 28 then "Delete entitlement"
END as Operation,
CASE
when status = 1 then 'OPEN'
when status = 8 then 'ERROR'
end TASKSTATUS,
PROVISIONINGTRIES as 'Provisioning tries',
UPDATEDATE as 'Completetion Date',
'reopenTasks' as 'Default_Action_For_Analytics'
from
arstasks
where
status in ('8','1')
and (PROVISIONINGCOMMENTS like '%Error%' OR PROVISIONINGTRIES > 1)
and taskkey='<taskkey>'
If you find the above response useful, Kindly Mark it as Accept As Solution and hit Kudos
04/18/2024 01:25 PM
Yes above query is correct
04/22/2024 08:31 AM
When I am trying the above query, I am getting below error. Kindly suggest me if I am missing anything.
04/22/2024 08:43 AM - edited 04/22/2024 08:43 AM
@asharma ,
Below will work, please try.
select
ars.taskkey as tasks,
(select username from users where userkey = ars.userkey) as Requestee,
(select concat(firstname,' ',lastname) from users where userkey = ars.userkey) as 'Requestee Name',
ars.PROVISIONINGTRIES as 'Provisioning tries',
ars.UPDATEDATE as 'Completetion Date',
'reopenTasks' as 'Default_Action_For_Analytics'
from
arstasks ars
where
ars.status in ('8','1')
and (ars.PROVISIONINGCOMMENTS like '%Error%' OR ars.PROVISIONINGTRIES > 1)
If you find the above response useful, Kindly Mark it as Accept As Solution and hit Kudos
04/22/2024 01:01 PM - edited 04/22/2024 04:36 PM
Please share logs
select taskkey as tasks, STATUS as taskstate , provisioningtries, 'reopenTasks' as 'Default_Action_For_Analytics' from arstasks where status=8 and PROVISIONINGTRIES > 0 and taskkey='<add taskkey>';
04/22/2024 09:46 PM
Above query doesn't gave any error but it is also not giving any records. It says 0 records. However, there is 1 error task in completed task list.
04/22/2024 10:12 PM
@asharma ,
Maybe provisioning tries or taskid is filtering records.
Can you just try without any filters.
select taskkey as tasks, STATUS as taskstate , provisioningtries, 'reopenTasks' as 'Default_Action_For_Analytics' from arstasks where status=8
This should work for sure. Post this, please debug by adding filters suggested above.
If this answers your question, please Accept As Solution and hit Kudos
04/22/2024 11:33 PM
@PremMahadikar this query is working but we need for specific task as this is challenging to identify specific task from the huge list.
04/23/2024 02:22 AM
@asharma ,
The below should be more clear for filtering your task:
My 'Completed task' has one errored task:
In data analyzer, I can see this record:
Use the same in data analyzer to see your record in preview and run it:
Query:
select taskkey as tasks, STATUS as taskstate , provisioningtries, 'reopenTasks' as 'Default_Action_For_Analytics' from arstasks where status=8 and taskkey='<Your task ID from Completed tasks tab>'
If this answers your question, please Accept As Solution and hit Kudos
04/22/2024 10:22 PM
Share query output from data analyzer
select taskkey as tasks, STATUS as state , provisioningtries, 'reopenTasks' as 'Default_Action_For_Analytics' from arstasks where status=4 and PROVISIONINGTRIES>1;
04/22/2024 11:34 PM
04/23/2024 01:01 AM
@asharma can you share the screenshot from analytics page?
04/23/2024 02:54 AM
04/23/2024 02:59 AM
@asharma ,
Can you please remove all other actions and just add 'Reopen Tasks' and try above code with taskkey.
04/23/2024 03:02 AM
@asharma check this post :
Solved: customqueryjob & enhancedqueryexecution job update... - Saviynt Forums - 70751
04/23/2024 05:35 AM
This worked, thankyou Manish Kumar
04/23/2024 05:36 AM
Its workaround ideally you should re open task using default action