How to do it...

To create the workflow design, follow these steps:

  1. Open the following URL, and from there, open Vehicle management | Setup | Vehicle management workflows:

https://usnconeboxax1aos.cloud.onebox.dynamics.com/?cmp=usmf

You can navigate directly to the configuration form using the following URL: https://usnconeboxax1aos.cloud.onebox.dynamics.com/?cmp=usmf&mi=ConWHSWorkflowConfiguration
  1. Click on NEW, and you should see the workflow type in the list, and is listed using the Label and Help Text properties that we set.
  2. Select the workflow type link, as shown in the following screenshot:
  1. You will then be asked to log in, which you should do as the same user you used to log in to Operations. You will then be presented with a new window, with the two workflow elements that we wrote and some flow control options in the left-hand pane.
  2. Drag the New vehicle approval workflow and Inspect vehicle elements onto the design surface, as shown in the following screenshot:
  1. As your mouse hovers over the Start element, you will see small handles appear--drag one of these handles so that it connects the Start element to the Inspect vehicle 1 element. Connect all elements, as shown in the following screenshot:
  1. Select the Inspect vehicle 1 element, and click on Basic Settings from the action pane. Configure it as shown in the following screenshot:
The text within % symbols was added using the Insert placeholder button; click on this and you will see that our parm method was added and the parm prefix was automatically removed.
  1. Click on Assignment from the left, and choose User from the Assign users to this workflow element list. Select the User tab, and manually assign this to Admin. This is the default administration user. Since we are simply testing our code works, we will assign all tasks and approvals to our user.
  2. Click on Close.
  3. Double-click on the New vehicle approval workflow 1 element and click on Basic Settings from the action pane. Change Name to New vehicle approval workflow and click on Close.
We would normally configure the notifications; for example, we would usually notify Workflow Originator if the approval was rejected.
  1. Then, select Step 1, press Basic Settings, and configure as shown here:
  1. Click on Assignment and assign this to our user as we did before. Press Close. There is a bread crumb at the top of the workflow designer's design surface, which shows Workflow | New vehicle approval. Click on the word Workflow from the bread crumb.
  2. Finally, we must give submission instructions to the person who submitted the vehicle approval. Right-click on an empty area of the workflow designer's design surface and click on Properties. Enter suitable instructions in the Submission instructions field and click on Close.
  3. Click on Save and close, and then the OK on the Save workflow dialog. Select Active the new version on the Activate workflow dialog and click on OK.

Let's now test if the workflow works:

  1. Open the vehicle form, and you should see the Workflow button as shown in the following screenshot:
  1. Click on the button and select Submit, which is the label we assigned to the ConWHSVehWFSubmitMenuItem menu item. Enter a comment and click on Submit.
  2. The options should change to Cancel and View history. You can choose View history to see the progress of the workflow engine. If the tasks aren't assigned within a minute, check that the Microsoft Dynamics 365 for Operations - Batch Management Service Windows service is running. Also check that there are batch jobs for Workflow message processing, Workflow due data processing, and Workflow line-item notifications. If not, open Workflow infrastructure configuration from System administration | Workflow, and click on OK.
  1. After approximately two minutes, having pressed the refresh icon, you should see the Complete, Delegate, and Cancel options. These are the options for the inspection task. Select Complete. Enter an inspection comment and click on Complete. View the vehicle details and wait for about a minute. Click on the refresh button. You should see information similar to the following:
  1. After a further minute, refresh the form, and the options will change to the approval options. Choose Approve from the list.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.177.135