0

Is there a way to completely remove a workflow from an application when there are records still 'in process'? I've tried inactivating the workflow, but of course it won't allow that while there are records still 'in' the workflow.

Update: I did try setting the fields to 0/false. That did allow me to delete the workflow fields, but it did not allow the workflow itself to be deleted. I started looking through the database tables and found tblEnrolledContent and tblContentReviewStage. In tblEnrolledContent, I found the records 'stuck' in the review_stage id that matched to the workflow stage in tblContentReviewStage. I deleted the records equal to that stage id and I was able to then delete the workflow without issue. I did try this on a development environment. I have had no issues with the application, and I had no issues creating a new workflow on the application.

catscancode
  • 115
  • 1
  • 7

2 Answers2

3

In 5.5 - found solution was to delete the rows in tblEnrolledContent where stage_id = the id of the stage of your workflow in tblContentReviewStage. This then allowed me to delete the workflow entirely in application builder.

catscancode
  • 115
  • 1
  • 7
2

Archer v6.x solution:
You can terminate existing workflow jobs in Archer from Administration -> Advanced Workflow -> Job Troubleshooting. There you can sort/filter and identify the workflow jobs that apply to the application you work on. You can select all that apply and press "Delete" button on the keyboard to bulk delete.

This should delete workflow jobs, but leave application records in place. After that you should be able to deactivate advanced workflow in your application.

Archer v5.x recommendations:
RSA recommend not to use workflow functionality in Archer v5.x due to various reasons (not flexible, not well documented, records get stuck and so on). This is why in v6 it has been replaced with Advanced Workflow running on a new engine on the back end.
I would do the following if you want to delete the workflow while the records are stuck there:

  1. Identify all fields in the application that are created and used by the workflow.
  2. Using SQL find these fields in the table "tblFieldDef" using GUIDs and set the following flags to FALSE (or 0) if available: system, aso, locked
  3. After you set these flags to 0, you will be able to delete these fields using the application builder, so delete them.
  4. After you deleted the fields that drive the workflow try to delete the workflow itself.

I hope this works for you.

Note:
[1] Back up your application by generating a package and saving it locally before you delete any workflow related fields.This should be tested first in non-production environment.
[2] Test this in non-production environment. I have not tested this approach myself.

Good luck!

Stan Utevski
  • 582
  • 2
  • 9
  • Oh, that's great - we will be upgrading to 6.0 soon, so that might work! I don't suppose there's anything similar in 5.5? – catscancode Jun 08 '18 at 13:48
  • Sorry, I assumed that you are on v6.x. I have added Archer v5.x recommendations. I didn't test them though, so be careful. I hope you have sand box environment to test this in. – Stan Utevski Jun 09 '18 at 16:04