Workbooks has a built in function called the process engine which is designed to host add-on scripts to the service. This allows you to customise Workbooks one step further by automating processes that would normally be time consuming to carry out manually. The process engine users with the appropriate capabilities to create four types of processes which are:
- Web Processes
- Button Processes
- Scheduled Processes
- Report Processes
When running internal processes or integrating with another system, you should use a separate licence, dedicated to that purpose (and not use a 'regular' Workbooks user's licence). We recommend this because it:
- Provides a clear audit trail - using a dedicated licence enables you to see which process/integration changed or updated a record. If the process/integration is running as a user, then it would make it harder to work out whether any changes were made by that user or by the automation.
- Avoids problems caused by the user leaving or their password expiring, either of which will cause the process/integration to fail.
In this article we describe some examples of how you can use these facilities.
A web process is one that is invoked from a web link. In the Workbooks Office, we have a small device (a "Raspberry Pi") which is connected to a large screen. The device invokes a Web Process every half minute or which runs a PHP script to display a number of reports related to our SLA agreements.
Above: This report details our SLA performance for last week. We can modify this according to our needs and display this on a webpage. The underlying PHP script is invoked every time the page is refreshed so that the data displayed is always current.
A button process is one that is manually invoked by a user within the Workbooks interface. A script can be written to automate pretty much anything you want. In the Workbooks office, we have a button process that populates our KPI fields on a case - simple, but effective. It saves a great deal of time manually populating a date/time field each time.
A scheduled process is one that runs in the background of your database and is completely automatic. In our own Workbooks account, we have a script that runs every hour which generates and sends out by email PDF invoices for overdue charges to finance contact of the customer attaching the PDF invoice.
A report process can be used to manipulate a result that is returned by a report. It could be used to mark a particular result as say "Reviewed". In your report there would be a criteria set to exclude anything that is marked as reviewed. The next time this report is rendered it will update the rows that re returned.
All of the above script examples can easily be written for your database. If this is something that interests you then please contact email@example.com who will be more than willing to understand your requirements and provide you with an admin credit quote for completing this work.
Occasionally, a scheduled process may fail in Workbooks. This can be due to a number of reasons which differ depending on the type of process. The support team deal with a number of these types of issues every day and we try to notify you via email if this happens. However, there are a number of steps that you can take to ensure that the more common reasons for a process failure are avoided before they become a problem for your business.
Sometimes, simply re-enabling the process will cause it to run again perfectly well. Users with system administrator rights can access this menu by clicking:
Start > Configuration > Automation > Processes > Scheduled Processes.
You will notice that you are then presented with a window and the different types of processes under individual tabs.
Under each tab is a grid view of each particular process type. If the process has failed then beside the schedule for each process you will see "(Disabled)". Open up this process to continue.
Click the Enabled box > Run Now.
Next you need to check the logs to ensure that the process worked correctly since running it again.
In the process window > Logs tab.
Above: You can see here that this process was unsuccessful. If this happens then feel free to log a case with the support team who will be able to investigate this further and provide a solution. To shorten the response time on this we request the exact time and date that it failed.
NOTE: The majority of process failures are caused because a password has expired or a user has left your company. Workbooks recommend the following to prevent errors occurring and causing minimal disruption to your business:
1) Purchase an additional licence and setup a dedicated process/api user which can be used to manage processes easily. Make this user exempt from password expiry and give it a password which is impossible to guess (and throw away the paper you wrote it on).
2) Set up the process so that the owner is the dedicated process/api user and set the "notify user" on a process to a 'real' user (who is not going to leave anytime soon).