Workflow Development

Workflows in Microsoft Dynamics 365 Finance and Supply Chain Management have two main types of elements – approvals and tasks – that act on a document. This is the center of the workflow and is where tasks are triggered based on what the user decides. By document, we mean a record with a form that maintains it. For example, a New customer creation workflow would be based on the customer table using the customer details form as the document.

The workflow designer can then use conditions based on fields and display methods on tables in order to decide what happens. This solves many requirements where a great deal of flexibility in the configuration is required, but can also be misunderstood and used inappropriately. The submission of a workflow is usually started with the user pressing the Submit button on the form; it's which is then processed within a minute by the batch server. The minimum time it can take for a workflow to complete, if the conditions for automatic completion are met, is three minutes: up to one minute for submission, one minute for evaluation, and one minute for each subsequent workflow step. This, therefore, can't be used when the user is expecting feedback as part of the data entry process.

Even though the batch framework is likely to be desgined to enable the immediate processing of tasks, just like Business Events, it doesn't change the paradigm that workflows are asynchronous processes and no business process should rely on the immediate processing of workflow tasks. This is likely to mean that we are using workflows for the wrong purpose, and a business event or other immediate event-based technical solution is more appropriate.

In this chapter, we'll use workflow design to control the approval of a new vehicle, including a task to inspect the vehicle as part of the workflow. To do this, we will cover the following recipes: