Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/15/2024 07:24 AM - edited 10/15/2024 07:25 AM
Hi,
We have a requirement to discontinue pending tasks if the ticket for those is rejected in servicedesk system. We are using integration platform to call discontinueTask API Saviynt Enterprise Identity Cloud API Reference v24.7 (getpostman.com)
The example call
{
"taskkeytodiscontinue": [
{
"taskid": "29725",
"discontinueassociatedtask": "true",
"comments": "Cannot be provisioned."
}
]
}
Expected behavior is that above call would discontinue tasks related to taskid 29725 using the parenttask property.
Currently it seems that all of the tasks in the same request are discontinued. From the logs I can see the query:
2024-10-15T09:35:43.712+00:00,"ecm","services.WorkflowService","http-nio-8080-exec-91-kq76m","DEBUG","Qry for ArsTask to be discontinued- select arsTasks from ArsTasks arsTasks where arsTasks.requestKey=857 and arsTasks.status<> 3 and arsTasks.status<> 4 and arsTasks.endpoint=22 and arsTasks.ownerType=2 and arsTasks.ownerkey=1 and arsTasks.accountName='xyz1000644' and arsTasks.users=905" |
There is no reference to parenttask, only requestkey seems to be used to identify which tasks should be discontinued.
What is the actual expected behavior since the documentation doesn't tell how those tasks are associated?
10/15/2024 08:23 AM
10/15/2024 08:39 AM
I don't understand what you mean by "use latest package".
The API reference is only the documentation / postman collection and it contains same information for discontinueTask API call than the earlier versions.
The actual API used is in EIC and v24.7 is the latest we have. No option to try anything newer.
10/15/2024 08:44 AM
10/15/2024 08:47 AM
Latest package of what? That discontinueTask API is in the EIC platform not in some postman collection.
10/15/2024 08:49 AM
Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]
⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️
10/15/2024 08:54 AM
Example call is already in the first post... please check that... here also for reference. But the issue is not the call but the functionality what happens inside EIC and which tasks are discontinued. How those tasks are associated are those by parenttask relation or by requestkey. That information is missing from documentation.
curl --location -g '{{url}}/ECM/{{path}}/discontinueTask' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
"taskkeytodiscontinue": [
{
"taskid": "29725",
"comments": "Some demo comment",
"discontinueassociatedtask": "true"
}
]
}'
10/15/2024 08:58 AM
10/15/2024 09:14 AM
We discontinued task 29725 with the call above and task 29727 also got discontinued even though the parenttask column was empty. Expected behaviour is that only task 29725 should have been discontinued.
TASKKEY PARENTTASK TASKTYPE REQUESTKEY TICKETID
29725 | 1 | 857 | IDN-795999 | |
29727 | 1 | 857 | IDN-795999 |
10/15/2024 09:36 AM
"discontinueassociatedtask": "false",
10/15/2024 09:48 AM
Yes, I know that changing that parameter value to false will stop discontinuing other tasks.
The question was that how Saviynt associates the tasks which it is going to discontinue based on the given taskid.
Expected behavior is that child or parent tasks would be discontinued but now it seems that all tasks in the request will get discontinued even though there is no other relation between the tasks (other than being in the same endpoint) if that parameter is set as true.
discontinueassociatedtask parameter functionality is not documented anywhere. Atleast I couldn't find anything which is the reason for asking here when seeing this unexpected behavior of discontinuing seemingly separate tasks.