Error saying “Violation of PRIMARY KEY constraint ‘OC_WORKFLOWCACHEPARAMETERS_PK'”

Talking about an issue that can occur that results in a stalled instance in the Workflow Instances with the error as described.

Viewing the Workflow stalled instances displays the following error message.

Exception: Violation of PRIMARY KEY constraint ‘OC_WORKFLOWCACHEPARAMETERS_PK’. Cannot insert duplicate key in object ‘OC_WORKFLOWCACHEPARAMETERS’

Unstalling the instance will result in the workflow continuing to the end without incident (not every time).

This occurs when a workflow process has mapped database writer parameters that exceed the allowed limit (103 characters) in SQL.  The workflow may stall on the Database Writer stage causing the problem or on the stage immediatley following the Writer.

This issue can be resolved by reducing the amount of text contained in the database writer mapped parameters.

For example:
Database writer has a parameter of:
Input Tables\Values\Operational Team\Operational Group\Operational Department\Operational Division\Divisional Head\Full Name

Use a Database Reader prior to the writer to retrieve the Divisional Head\Full Name.

This will allow the mapped parameter to become:
DatabaseReader\Full Name.

This entry was posted in Admin Console and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *