Setup of DYCE Smart Workflow Tool
To process a document (such as a Sales order or a Purchase order), many individual process steps are often necessary, which take place one after the other and may also require the use of different users. The DYCE Smart Workflow Tool provides process control functionality for specifying these steps and documenting their completion or for transferring a document to another user.
This process control essentially consists of a workflow or process, which is selected for each document or operation, the associated process steps, which are mapped via so-called process statuses, and possibly via additional functionalities that are assigned to the individual process status.
Definition of a process
Processes are set up via the Processes page, which is available in various places. After assigning a unique Code and a Description, the scope to which the process is to be applied is defined. This is done by selecting the table in the Table name field and, if necessary, further filters, which can be defined depending on the context either via the Filter exists field or via the Edit filter action.
To simplify the creation of a new process, Process Templates can be defined in which the scope (table and filter, if applicable) can already be predefined. When creating a new process, a suitable template can be selected using the New from Template action. In addition, an existing process including the associated process status can be duplicated using the Copy Process action and then adapted.
It can be useful to define several processes for the same document type (e.g. Sales quotes) if they differ in their process steps. In sales, for example, the standard processing of quotes and orders typically differs from those that are combined with a project. The process code therefore also serves as a characteristic of the document type, which can be used to differentiate and filter.
Definition of associated process statuses
All steps that may be required for a process are defined in the Process Status page, which can be called up on the Processes page via the Status action. The sequence of defined process statuses then forms a workflow.
The No. of actions field or the Status Actions action can be used to define so-called status actions for each status, which are then executed when the status is set. Several actions can be defined on the page of the same name. Reports, codeunits and Business Events are initially available for selection via the Type field, which are specified using the ID.
Definition of the pool of all statuses
All required process statuses are defined system-wide in the Status page, which forms the pool of all process statuses. A status defined here can be used for different processes.
It is advisable to define the status codes that describe the typical process flow with a prefix that identifies the document type and a consecutive number.
Business events and external systems
There are 20 generic business events to choose from. Business events provide a mechanism for triggering actions in external systems from Business Central. A business event only indirectly causes actions in other systems. When the status is set, the business event is sent to all Listeners, who have subscribed to it. All systems that have permission and listen to this business event can observe it and are triggered, when they perceive the business event.
For example, if status SO 001 triggers the business event 1 DYCE SWT 01 and status SO 002 triggers the business event 2 DYCE SWT 02, all external systems that listen for 2 DYCE SWT 02 are triggered when status SO 002 is set.
Power Automate
Power Automate is perfect for triggering follow-up actions after a status has been set. The possibilities are almost unlimited, which is why the documentation only covers the initial setup.
Create a new flow and use the trigger When a Business Event occurs (V3). Make sure you are connected to the correct Business Central environment. After selecting the environment, the Business Event that is to trigger the flow can be entered as an event. Once the flow has been activated, it is triggered as soon as the business event is set by a status in the environment.
The flow can be restricted to companies and Document Types, using further steps such as Get Record (V3). In this way, the business events in different clients and documents can trigger different flows.
Permissions
Three authorization sets are included with the app:
- DYCESWTALL (DYCE Smart Workflow Tool All)
This permission set can be assigned to all users. It only contains read permission for processes and statuses. - DYCESWTUSER (DYCE Smart Workflow Tool All)
This permission set should be assigned to all users who should be able to set process statuses. - DYCESWTADMIN (DYCE Smart Workflow Tool Admin)
This permission set is designed for administrators and power users who should also be able to reset statuses set by other users.
Further information on authorization sets can be found in this part of the Microsoft documentation.