The AutoTask feature provides a configurable system for various tasks triggered by particularly important events that occur within the NetX system. The basic idea is this: watch for specific events — such as when the “Status” attribute changes to “Approved” maybe even in a specific category; then execute preconfigured functions based on the triggering event — such as convert to JPG format and FTP to the Web server. The system is very flexible, and very powerful. Effectively it’s a workflow macro system.
Please note that AutoTask requires a Workflow license; contact firstname.lastname@example.org if you are interested in purchasing this module.
The event monitoring is done deep within the NetX system — events are captured, filtered, and issued appropriately. Additionally, this system provides an event queue. Event data is placed into the queue in order to avoid any time delay. The event notification system runs a separate thread that then pops events from that queue and handles them as quickly as it can. In this way, normal application operations are not impeded by the event monitoring. However, tasks should not be assumed to be executed in realtime, but they are usually executed in a reasonable amount of time. Obviously if the event queue becomes saturated, the delays should be expected.
Tasks are defined within the autotask.xml file, which is generally located here:
This file can also be edited in the user interface. If you edit the file directly on the file system, please restart NetX for your changes to take affect.
The contents of this file look like the following:
<?xml version="1.0" encoding="UTF-8"?> <autotask> <task name="My Task 1"> ... </task> <task name="My Task 2"> ... </task> </autotask>
Note that tasks are added within the main <autotask> block.
Task Components and Execution Order
Please read the various sub-articles for more details on the components of tasks, but the general structure of a task looks like this:
<task name="My Task"> <matchCriteria/> <modifications/> <repurpose/> <exports/> <notifications/> </task>
And, in fact, task components execute in this order:
System Attribute Keys
In addition to custom defined asset attributes, the following are inherently included. These can be used in conjunction with the “criteria” (type=attribute) nodes and in the “name” attribute of that node
|assetId||Asset ID (integer)||Read-only|
|fileName||File name (file system)||Read-only|
|fileSize||Size of the file (bytes)||Read-only|
|fileWidth||Width in pixels (if available)||Read-only|
|fileHeight||Height in pixels (if available)||Read-only|
|modificationDate||Last modification date||Read-only|
|visible||Visibility (Admin view only)|
Please note: in NetX version 8.5, the AutoTask value substitution system was added. This feature defines a system of variables using "tokens" to substitute values a variety of situations.
The following articles will help you delve into the world of AutoTasks: