- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2017 08:40 AM
We accidentally wrecked some custom activities when we rolled out a change recently.
The documentation show that you can "View and revert to previous versions of an activity.", but I'm not sure how to revert. I can view the old version, but does anyone know how to roll back to previous custom activity versions?
Orchestration activity designer
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2017 08:58 AM
Thanks Michael. After working with support for awhile, we've determined there is no good way to rollback, but one that can be used for emergencies outlined below. As I've heard before the best option is always to "patch forward, don't roll back", and so I ended up recreating new activities with the code from the old ones and updating all the workflows that used those. Then to prevent issues like this in the future we will have a more liberal "branch-not-update" policy for activities.
Emergency Rollback Procedure
Note: We found there was no way checkout the rolled-back activities, make a copy of the rolled-back activities, or pull these changes into an update set for promotion; so this should be a temporary, last resort, in production only kind of thing.
Update the Activity
- In the wf_versionable table, the related versions or an activity are tied together by a Version Container field. You may with to note the value of this field.
- Export the XML if the records of the current version and the old version you wish to rollback to.
- Change the Published value for the current to false, and the old to true via one of these methods:
- Run a script in "Scripts - Background" (I did this)
- OR by altering the XML files you exported and re-importing them.
The workflows are probably still connected to the original current version of the activities so you will need to update those as well. I had new inputs on the original activity, which caused issues trying to update from workflow designer so I opted to do this in-place on the workflow tables.
Update the workflows
- Find your current workflow version in wf_workflow_version.
- Open the related list of activities in a new window, or go to wf_activity and filter for the correct version of your workflow.
- Find the old activity record in the list and change the Activity Definition to the rolled back version of the activity.
- Verify from the workflow designer that your workflow is still passing the correct inputs and outputs.
At this point, because you lose the ability to check these rolled-back activities out, I would recommend you "patch forward" your issues in dev and promote up a fix.
Good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2017 10:34 AM
Hi Troy,
I had the same question myself and struggled to find the answer. Even with trying additional workflow related roles I wasn't able to find away to easily revert to the older version. I even looked at the update set route and deleting updates - maybe I didn't get them all??. If this is a production environment I would suggest calling support for help. So proceed at your own risk... Basically, the versions of the Activity Designer Activities are stored in the wf_versionable table. If you list that table and filter for the Activity in question by name you should see the old version and the new version. You'll want to export both records to XML, delete the new version, then make a copy of the XML for the original activity and change the value of Published to true in the XML. Then import the new XML so the original version is published.
Hope that helps.. but again this is just a suggestion and may cause unanticipated issues... Maybe someone can give a more "official" less-risky method.
Good luck!
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2017 08:58 AM
Thanks Michael. After working with support for awhile, we've determined there is no good way to rollback, but one that can be used for emergencies outlined below. As I've heard before the best option is always to "patch forward, don't roll back", and so I ended up recreating new activities with the code from the old ones and updating all the workflows that used those. Then to prevent issues like this in the future we will have a more liberal "branch-not-update" policy for activities.
Emergency Rollback Procedure
Note: We found there was no way checkout the rolled-back activities, make a copy of the rolled-back activities, or pull these changes into an update set for promotion; so this should be a temporary, last resort, in production only kind of thing.
Update the Activity
- In the wf_versionable table, the related versions or an activity are tied together by a Version Container field. You may with to note the value of this field.
- Export the XML if the records of the current version and the old version you wish to rollback to.
- Change the Published value for the current to false, and the old to true via one of these methods:
- Run a script in "Scripts - Background" (I did this)
- OR by altering the XML files you exported and re-importing them.
The workflows are probably still connected to the original current version of the activities so you will need to update those as well. I had new inputs on the original activity, which caused issues trying to update from workflow designer so I opted to do this in-place on the workflow tables.
Update the workflows
- Find your current workflow version in wf_workflow_version.
- Open the related list of activities in a new window, or go to wf_activity and filter for the correct version of your workflow.
- Find the old activity record in the list and change the Activity Definition to the rolled back version of the activity.
- Verify from the workflow designer that your workflow is still passing the correct inputs and outputs.
At this point, because you lose the ability to check these rolled-back activities out, I would recommend you "patch forward" your issues in dev and promote up a fix.
Good luck!