Article published on the 7th of June, 2022.
1. Case description
In this article, we are going to discuss the use of WorkPoint Automate in relation to creating items.
For this case, a company wants to implement automation when they create tasks on cases in their WorkPoint solution.
Specifically, their requirements are as follows:
- When creating a task, the Start date should be automatically set to the day it is created.
- When creating a task, the Due date should automatically be set to the way it is created plus 30 days.
- When creating a task, it should be automatically assigned to the user creating it.
- New tasks should be created from a My Tools button only accessible to managers on case sites.
To implement the solution for the case, we are going to create a new process titled "New case task".
The process is going to make use of two steps; an Item Form step, and a Create item step.
The My Tools button to run the process will use a target audience to ensure that only managers can use it.
We begin the implementation by creating the "New case task" process:
The type of process is set to User Process, as we will run it manually from a button.
We also put the process in the "Item Processes" group.
We then add an Item form step to the process and configure it as follows:
The "Start Date" field has been modified, using the following adaptive expression:
This will automatically fill the Start Date field in the Item form with the current day when the process is run.
The "Due Date" field has also been modified with the following adaptive expression:
This expression automatically fills the Due Date field of the Item form with the current date plus 30 days when the process is run.
In the "Value" field of the "Assigned To" field, we select the "CurrentUser" object from the process context.
In this way, the user running the process will automatically be added to the "Assigned To" field in the Item form when the process is run.
In the Create item step, we select the Output from the Item form as Step Input.
This is to ensure that the item we create is based on the meta data coming from the Item step we have configured.
Lastly, on the Cases business module, we have configured a My Tools button to run the process:
The button is set to run the Create case task process, but only be visible to people in the "Managers" Active Directory group.
In the next section, we will go through the execution of the process.
We will now create a new task using the Create case task process.
We begin by clicking the "New task" button in the My Tools panel of one of out case sites:
This opens the Create case task process:
As we can see, the Start date-, the Due date-, and the Assigned To fields have all been pre-filled with the current date, the current date plus 30 days, and the user that is currently running the process, respectively.
We can now fill in the remaining meta data:
We can now proceed to the next step which creates the task for us:
Once the task has been created, we can find it in our task list, or perhaps in a Task Overview webpart on our case site:
Through this implementation, we conclude that we have fulfilled all requirements in the case.