BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Maayan_Oscar
Obsidian | Level 7
Hello, I’m working with workflows in SAS Visual Investigator and would like to know if there is an efficient or recommended way to achieve the following: When a workflow reaches its End Event and completes, is it possible to automatically cancel all open tasks associated with that workflow so they no longer appear for users? Additionally, is there a way to define a dynamic condition for a task so that it is canceled if the value of a specific variable changes (for example, a Boolean variable that determines whether the task should remain active)? I’d appreciate any insights on whether there is a built-in solution for this or a best practice. Thank you!
1 ACCEPTED SOLUTION

Accepted Solutions
RickMatthews
SAS Employee

Hi Maayan, 

* When all Tasks in a Workflow are completed, the Workflow ends. If you observe any other type of behavior, please contact Tech Support. Perhaps there is a 'stuck' workflow (Script or REST Service) holding the WF open? 

* Dynamically cancelling a Task will require coding with a combination of Script and/or Service Tasks using the WF APIs. See https://developer.sas.com/rest-apis/workflows

Rick Matthews
Senior Software Manager • Fraud and Security Intelligence
Tel: + 1 919 531 6945 • Mobile: + 1 919 995 3599 • Rick.Matthews@sas.com
Cary World Headquarters • 100 SAS Campus Drive • Cary, NC, 27513
www.sas.com/
SAS® … THE POWER TO KNOW®

View solution in original post

3 REPLIES 3
susantrueman
SAS Employee

Hi 

Please could you share more detail about the workflow configuration and how you have open tasks remaining when the workflow has reached it's end event?

 

I'm not sure if there is a way to programmatically close the tasks (perhaps via a script or service task) but an admin can cancel actively running tasks via the workflow section of the VI Admin application. 

 

If you could share more detail about the workflow that would be great. 

Thanks

Susan

RickMatthews
SAS Employee

Hi Maayan, 

* When all Tasks in a Workflow are completed, the Workflow ends. If you observe any other type of behavior, please contact Tech Support. Perhaps there is a 'stuck' workflow (Script or REST Service) holding the WF open? 

* Dynamically cancelling a Task will require coding with a combination of Script and/or Service Tasks using the WF APIs. See https://developer.sas.com/rest-apis/workflows

Rick Matthews
Senior Software Manager • Fraud and Security Intelligence
Tel: + 1 919 531 6945 • Mobile: + 1 919 995 3599 • Rick.Matthews@sas.com
Cary World Headquarters • 100 SAS Campus Drive • Cary, NC, 27513
www.sas.com/
SAS® … THE POWER TO KNOW®
Maayan_Oscar
Obsidian | Level 7

thank you!

 I used this API to complete the tasks before the workflow ended.

updateCompleteWorkflowTask | SAS Developer Portal