Skip to content

Commit 6f48b0b

Browse files
Revert to previous working version of workflow (#1768)
* script.js * readme.md * Create readme.md * Create script.js * Create readme.md * Create script.js * readme.md * script.js * Delete Background Scripts/Revert Workflow Version directory * Delete Background Scripts/Get Duplicate directory * Delete Attachments/Delete Attachments - Approvals directory
1 parent 5da39f5 commit 6f48b0b

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
How often you come across cases where any version update to workflow breaks some other element of the existing workflow in PRD. Consider a case where more than one developer works on workflow and the updates are not in sync. When pushed to PRD breaks the workflow and as the issue is in PRD all you need to do is a break-fix at the soonest.
2+
The idea is to return to a stable, known version of the workflow to ensure continuity and productivity, while investigating or fixing the problems in the newer version and thus reverting to previous working version of workflow is the only resort.
3+
4+
Use this as a background script/fix script and execute by merely changing the sys_id of workflows from 'wf_workflow_version' table.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
var updatevftoprevious = new GlideRecord('wf_workflow_version');
2+
3+
if (updatevftoprevious.get('4f215adf1b533d54bc97dce0b24bcb31')) //pass sys_id of current workflow version here
4+
{
5+
updatevftoprevious.published = false; //sets the published status to false
6+
updatevftoprevious.update();
7+
}
8+
9+
10+
var updatevftopreviousvf2 = new GlideRecord('wf_workflow_version');
11+
if (updatevftopreviousvf2.get('2cb9a6418713b5140b0f0d490cbb3512')) //pass sys_id of workflow version that needs to be reverted to
12+
{
13+
updatevftopreviousvf2.published = true;//sets the published status to false
14+
updatevftopreviousvf2.update();
15+
}

0 commit comments

Comments
 (0)