Bulk
Execution Workflow
Case
Study: –
Some
time we need to run on demand workflow for selected set of records. This task
need manual intervention. In some scenario
we want to schedule this task on hourly basis or daily basis. In Dynamics CRM there
is no provision for scheduling on demand workflow execution for set of selected
records. Like Dynamics CRM provide provision to schedule Bulk deletion workflow
scheduling.
Solution:
–
In
below solution I will provide a way how we can schedule our bulk on demand workflow
execution.
I
have used below one custom entity to schedule bulk workflow execution.
Entity
Name: -Bulk Execution Task
Below
are the field used in this entity: –
Field name
|
Data Type
|
Fetchxml Query
|
Multiple Lines of Text
|
Last Run Time
|
Date and Time
|
Next Run Time
|
Date and Time(Calculated)
|
Repeat Duration(Hours)
|
Whole Number
|
Termination Date
|
Date and Time
|
Calculated
field: –
Workflow
Used: –
In
this solution a OOB workflow is used name “Bulk Workflow Execution”.
This
workflow will trigger when record is created in “Bulk Execution Task”.
In
this workflow Child process needs to check.
If
record is created and conditions are meet a custom workflow will execute. This
custom workflow responsible to run our on-demand workflow based fetch query we
have specified.
This
solution is created in “Dynamics 365” version.
Working: –
Create
record in Setting->Bulk Execution Workflow->New.
Provide
workflow ID.
Open
your workflow need to execute and copy ID from address bar. Make sure On-demand
is checked for this workflow.
Provide your fetch XML query to select records. You can used “Advance Find” to get fetch query.
Provide other details.
When
you save the record. Your Workflow start execution based on your information.
Click
on follow to keep update from my blogs.
Original Post https://dotnetdeveloper2012.blogspot.com/2018/04/dynamics-crm-bulk-execution-workflow.html