Preventing workflow tasks from being updated via data partitioning

book

Article ID: 18993

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Desk Manager

Issue/Introduction

The following data partition is added to the data partition list for the out-of-the-box data partition named "Service Desk Analyst":

Table Name: 
Workflow_Task

Constraint Type: 
Update 

Constraint:
assignee = @root.id OR group.[group]group_list.member IN (@root.id)

The intention is to only allow the logged-in user to update a Workflow task for which the logged-in user is the Assignee or for which the logged-in user is a member of a Group that is designated as the assigned Group for the task.

However, when the logged in user attempts to update a workflow task which satisfies the restrictions, although the user is able to make changes to the Update Change Workflow form for the workflow task, when the user clicks the Save button on the form, the following error message is written on the form:

AHD03055: Data partition Update restriction on Workflow Task

Environment

Release: CA Service Desk Manager (SDM) R12.x, and higher
Component:

Resolution

The suggested solution is to create a Pre-Update type of constraint instead of an Update type of constraint.

So, do not create this constraint:

Data Partition Name:
Service Desk Analyst       

Table Name: 
Workflow_Task 

Constraint Type: 
Update 

Active Constraint: 
assignee = @root.id OR group.[group]group_list.member IN (@root.id)

 

Instead, create this constraint:

Data Partition Name: 
Service Desk Analyst  

Table Name: 
Workflow_Task 

Constraint Type: 
Pre-Update 

Constraint: 
assignee = @root.id OR group.[group]group_list.member IN (@root.id)

Alternatively, use a View constraint type.

Additional Information

If you are assigning the Workflow to a specific group and wish to leverage membership, you may also try this data partition as an alternative:

Data Partition Name: 
Service Desk Analyst  

Table Name: 
Workflow_Task 

Constraint Type: 
Pre-Update 

Constraint: 
assignee = @root.id OR assignee.[group]group_list.member IN (@root.id)

Note:  Workflow Task table has both an "assignee" field and a "group" field.  A common mistake when writing a data partition is to forget that both fields exist in workflows, often using "assignee" and "group" for a given workflow interchangeably.