Background Tasks
Background task is a grid containing every job that is executed, for all users. A background task will be activated on system-defined processes, such as:
- Synchronise from the asset tree
- Accept development in the asset tree
- Generate proposed work orders
- User permission calculations.
The purpose of background tasks is to monitor the progress of tasks and identify errors that take a long time to process, while working on other system functionality.
Background task fair usage policy
The background task fair usage policy aims to ensure that the different On Key Plus tenants each get an opportunity to have their work queued as background tasks being executed. Priorities are assigned to background tasks based on predetermined rules and server capacity is balanced based on these priorities.
Instead of executing background tasks in a FIFO order, the following aspects are considered during the allocation of work across tenants and different users for the same tenant:
- tenant - each tenant gets an opportunity
- task priority - more important work is prioritised
- user - each user gets an opportunity
- created on - the creation date is considered
- origin - job or user request.
For example if user A executes a synchronisation operation that results in 3 000 assets being synchronised (ie 3 000 background task steps are created) and other users also execute background task work at the same time, they should get a time slice for some of their work to be completed whilst user A's synchronisation operation completes.
Using background tasks
- Background task steps
- Step response messages
- Errors
- Cancelling a background task
- Deleting a background task
Background tasks are broken down into smaller chunks of work called steps. Clicking the Details button opens split view, where you can analyse the various steps for the selected background task and view its progress. One background task can have multiple steps. If a step has completed successfully, Is Valid will be set to true and if not, Is Valid will be set to false.
A step response message is also displayed, providing a reason why the step has passed or failed. One step can have multiple response messages. Select the relevant step to view its response message.
Not all steps have response messages. All failed steps (where Is Valid is false) have response messages. However, for steps where Is Valid is true, you might see step response messages in some cases and not in others.
In addition to seeing which step failed and why the step failed, you also have ability to navigate to the record to fix the error. If a step response message has an Object ID, then you are able to double-click that entry. The related record's edit screen will open, where you can make changes, as required.
If the step response message is too long to be viewed in full, you can click the View Message's Full Value button associated with the message. The full message will be displayed in a pop-up window. From here, you can also copy the message, if required, or close the pop-up.
On the Errors tab, you will see a summary of the failed steps response messages. An error is a combination of a failed step (where Is Valid is false) and it is related response message. Only errors are displayed here (where Severity is
Error
). This information is used to easily fix entities that contain errors across multiple steps.You are able to cancel a background task while it is still running, in other words, when the background task has a Status of
Running
. To do this, select the background task and click Cancel. If successful, the background task Status will update to "Cancelled". Once the background task has a status of Completed
, it cannot be cancelled. You also have the ability to delete background tasks. Select one or more background tasks and click Delete. Once the delete is confirmed, the deleted records will be removed from the grid.
My background tasks
While the Background Tasks screen lists the global background tasks for all users, the My Background Tasks screen provides a view of only your own background tasks. It enables the logged in user to see tasks that you've performed in On Key and monitor the progress of the various steps in those tasks.
To access your own background tasks, click System Management > My Background Tasks in the main menu. Alternatively, to quickly access your background tasks that are initiated from the asset tree, select the View Background Tasks custom action in the Assist panel in the sidebar. This allows you to see your own background tasks without having to leave your current screen. Refer to On Key Assist for more information.
Background task permissions
Users can always work on the background tasks that they created, ie the background tasks that are visible on the user's My Background Tasks screen. However, to be able to work on background tasks created by other users, the user needs the following security role permissions:
Can View Others Background Tasks
Can Delete Others Background Tasks
Can Cancel Others Background Tasks
.