Clean Workflows
Use the Clean Workflows built-in script to clean up your instance by removing workflow functions left behind by uninstalled/disabled apps.
The Preview action for this built-in script scans all or selected workflows and returns a table of workflow functions that were created with currently disabled or uninstalled apps. The table displays the Workflow Name, Workflow Status (Active, Inactive, Draft), Function Class Name, and a Function Link that takes you to the workflow transition where the function exists.
The Run action for this built-in script will remove all workflow functions created with currently disabled or uninstalled apps from either all workflows, or the workflows selected from the workflows selection drop-down.
Before you run this, back up your workflows by exporting them. There is no way to recover deleted functions after running this built-in script.
- From ScriptRunner, navigate to Built-in Scripts >Clean Workflows
- Choose Global (All Workflows) to preview/run for all workflows.
Or choose the Select workflow(s) option and specify the workflows you want the script to run on. Select Preview to see a table listing all workflow functions created with currently disabled or uninstalled apps. These are the workflow functions that will be removed when the script is run. Check this list thoroughly before moving to the next step.
Always use Preview before you run this script to validate the functions that will be removed.
Select Run when you are certain you want to delete the disabled or uninstalled apps workflow functions. When the script finishes a report displays details of the workflows that have been updated.
If the workflow is in Draft mode when you run the Clean Workflows built-in script, it will remove the functions from the draft and the changes will not be published unless the user editing the draft publishes the workflow.
Preview examples
Preview example for Global(All Workflows):
Preview example for a single selected workflow: