You already have an ITPR demo account or a production account. If not, you can easily request one with demo data.
You already signed up for a techwork automator demo account. If not, goto the registration blog post.
In ITRP it is easy to design business workflows. For instance purchasing processes are implemented using change templates and related task templates. In some companies an additional approver is required if the value exceeds a certain amount.
In my simple example the chief controller “Matt Leach” is added as an approver if the investment exceeds 50.000 Euros otherwise Matt is not part of the process.The automator code is as usual very simple:
I created a purchase request worth 60.000 Euros. This is how the task list looks like before I start the change:
Now, the change has been started and Matt Leach has been added by the automator package as an additional approver. Of course, the “Purchase Automation” task has been completed by the package too…
The code with comments
Interesting to note
The webhook event I chose is task.status-changed. I could have used task.update as an alternative. However, using task.update needs a couple of additional lines and mergeAudit is necessary to check wether the status changed or not. In addition the task.update webhook triggers each time a task is beeing updated.
Therefore task.status-changed is much more efficient.