Encountered this issue once the system recovered from the RecId max out in the workflow tables. There were certain transactions that were submitted and updated as In-review however the workflow was not triggered for them. The workflow bar was missing and on trying to Re-Submit the workflows the error was received.
Solution :
Solution :
- Shutdown all the AOS instance
- Bring up any one AOS, synchronize the database.
- Re-Submit the workflow for the failed records.
e.g:
TSTimesheetTable timesheets;
WorkflowTrackingStatusTable trackingstatus;
while select timesheets
where 1==1
&& timesheets.ApprovalStatus == TSAppStatus::Pending
//&& timesheets.TimesheetNbr == 'CCM-175040'
notexists join trackingstatus
where trackingstatus.ContextTableID == 4627
&& trackingstatus.ContextRecId == timesheets.RecId
{
/*
ttsBegin;
timesheets.ApprovalStatus = TSAppStatus::Create;
timesheets.update();
ttsCommit;
*/
Workflow::activateFromWorkflowType("TSDocumentTemplate",
timesheets.RecID,
"Resubmitted due to error",
false,
timesheets.createdBy );
info( timesheets.TimesheetNbr );