Sunday, November 19, 2017

Cannot create a record in Workflow tracking status table (WorkflowTrackingStatusTable). Correlation ID: {70B17AE2-AF1A-47A9-937F-39F206AF91DE}, Pending. The record already exists.

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 :

  1. Shutdown all the AOS instance
  2. Bring up any one AOS, synchronize the database.
  3. 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 );

1 comment:

Unknown said...

replica bags 168 mall browse around these guys c2d23y3j35 replica bags joy replica prada nylon bags hermes fake t8s90x0j93 replica bags from china see y6g87b3p32 fake louis vuitton replica bags nyc m1n87z6c33