preloader-matrix

Alfasith

Dequeue all the workflow jobs in AX 2012

// To dequeue all the workflow for workflow performance

static void DequeueWorkFlow(Args _args)
{
SysWorkflowMessageTable     SysWorkflowMessageTable;
    ttsBegin;
    while select forUpdate SysWorkflowMessageTable where SysWorkflowMessageTable.MessageLifeCycleState !=2

        {
            SysWorkflowMessageTable.MessageLifeCycleState =2;
            SysWorkflowMessageTable.update();
    }
    ttsCommit;
}

Regards,

Share on email
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

Leave a Reply

Your email address will not be published.