14.11.2014, 20:11 | #1 |
Участник
|
workflowax: Mass Resume Line Workflows
Источник: http://workflowax.wordpress.com/2014...ine-workflows/
============== Orginally from my new blog: www.exploreax.com http://www.exploreax.com/blog/blog/2...ine-workflows/ Challenge/Problem: Many line level workflows that need to be resumed. Description: Sometimes due to data or setups one may have numerous line level workflows failing and entering a “Stopped” state. This may be a result of calendars that do not have enough dates created, users who have been disabled etc… If the workflows were header level, it is easy enough to select all in the Workflow History form and click resume, however on line level workflows one needs to view each line level workflow individually and resume them. Solution: The following job can be used to perform mass resume on stopped workflows. You can adapt the SQL to limit to certain documents or document types of necessary. static void resumeStoppedWorkflows(Args _args) { WorkflowTrackinStatusTable tracking; int i, j; while select tracking where tracking.TrackingStatus == WorkflowTrackingStatus::Faulted && tracking.WorkflowType == WorkflowTrackingStatusWorkflowType::DependentSubworkflow { try { Workflow::resumeWorkflow(tracking.CorrelationId, “Auto-resumed”); i++; } catch (Exception::Error) { //Some may not be able to be resumed but we dont want to stop the process j++ } } info(strfmt(“%1 workflows resumed, %2 workflows could not be resumed”)); } Источник: http://workflowax.wordpress.com/2014...ine-workflows/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|