VERIFIED SOLUTION i

'You cannot delete this template' in EngageOne Server 3.X

Issue

Message 'You cannot delete this template because it is referenced by active work or work pending delivery or work in the approval workflow' is observed while deleting a template in EngageOne Server 3.X.

Cause

The mechanism which is responsible for template removal checks whether there are any work items in certain statuses present.
Before deleting a template EngageOne Server checks condition on the existing status. If the status for the reported template is either Submitted or Rejected then it will not allow the template to be deleted. SQL query responsible for the check is as follows:
SELECT ID FROM OCM_WORK_QUEUE WHERE TEMPLATE_ID = <template_id> AND STATUS IN (0,1,3,4,5,6,7,8)

The status details can be obtained through the query:
SELECT * FROM OCM_WORK_ITEM_STATUS_TYPE

The STATUS used in the first query will be available under column STATUS_ID of the second query.

Resolution

UPDATED: May 27, 2019
Ensure the template to be deleted did not contain any ID of a work item with staus containing Submitted or Rejected under table 'OCM_WORK_QUEUE'. To get SQL query to delete the associated, contact Support and quote case # 20296087