AutoTasks are powerful workflow tools used to automatically perform actions on NetX assets or data based on certain triggers. Some common uses of AutoTasks include:
- Organize assets based on an attribute change.
- Generate a watermarked version of an asset, to be attached as a view to the original asset.
- Notify specific users when certain actions are performed.
Once triggered, AutoTasks are added to a queue, then completed in order. This means if many AutoTasks are triggered during a short period of time, there may be a delay before a new AutoTask is completed.
What is an AutoTask?
Under the hood, AutoTasks are written in XML, a text-based format for representing structured data. It's helpful to have some basic familiarity with XML syntax before building AutoTasks. If you'd like to brush up on XML basics, head over to https://www.w3schools.com/xml/default.asp
Parent element: The parent of an individual AutoTask contains the entirety of the task itself. The parent element of every AutoTask is always <task>.
Subchild element: The subchild element is a component inside a child element. Note that repurpose components do not have any supported subchild elements.
Component : AutoTasks are composed of the following components : matchCriteria, modifications, repurpose, export, and notification. Only matchCriteria and any one other component is required for any given AutoTask, though all components can be included in any given AutoTask.
- Parameter: Every supported component has unique parameters with values based on the component type. For example, one parameter for the repurpose component consists of the name of a repurpose operation followed by a relevant value, e.g. <repurpose format="jpg" />.
- Value : Each parameter has a value that contains data related to it. These values are dependent on both the component and parameter being used, e.g. jpg for this repurpose component: <repurpose format="jpg" />.
All elements are case sensitive.
Below is a properly formatted AutoTask with placeholder values:
AutoTask components always trigger in the following order:
The task element contains your AutoTask actions and criteria; the opening task tag should contain a name field where you give the task a unique name.
Every AutoTask must have a <matchCriteria> element that will trigger the task. Within <matchCriteria>, you can specify which NetX actions will trigger the AutoTask using the <criteria> subchild element. The type parameter controls how multiple <criteria> are be combined:
- type="or" - only one of the listed criteria must match
- type="and" - all of the listed criteria must match
<matchCriteria type="and / or"> <criteria [ criteria parameters ]></criteria> </matchCriteria>
To learn more about matchCriteria, see AutoTask Step 1: Match Criteria .
Modifications make changes to assets that meet the AutoTask's matchCriteria. They are used to:
Modifications can be built upon by adding <modify> ... </modify> subchild brackets in between <modifications> ... </modifications> child brackets:
<modifications> <modify [ modify parameters ]></modify> </modifications>
For more information regarding AutoTask modifications, see AutoTask Step 2: Modification Options .
Repurposing assets via AutoTask uses repurpose operations as parameters to automatically create a derivative file for an asset that meets the task's match criteria ; these files are attached as a view to the original asset. Repurpose operations can be built upon by formatting repurpose operation parameters between a <repurpose /> bracket. Note that operations are contained inside a single bracket, with no nested subchild brackets. A / is still required before the closing bracket after any repurpose operations.
<repurpose [ repurpose parameters ]/>
For more information regarding repurposing assets via AutoTask and the formatting of repurpose parameters, see AutoTask Step 3: Repurpose Operations . For more information regarding each repurpose operation, see Repurpose Operations .
Adding an export action to an AutoTask can:
- Send assets or their derivatives to an alternate storage location.
- Send assets or their derivatives to a specified email address.
- Generate a new asset or asset view .
Export actions can be built upon by adding <export> ... </export> subchild brackets in between <exports> ... </exports> child brackets. Multiple export actions are supported with a single AutoTask.
<exports> <export [ export parameters ]></export> <exports/>
Notifications are used to send an email to a specified user, group , or email address when an AutoTask is triggered. They can be built upon by adding a <notify /> subchild bracket in between <notifications> ... </notifications> child brackets. Note that a / is still required before the final notify bracket.
<notifications> <notify [ notifications parameters ]/> </notifications>
Custom attributes can be updated with an AutoTask, or used as an AutoTask trigger. While the following system attributes can be used with an AutoTask, only name and visible are editable via AutoTask; all other system attributes can be used as triggers.
|An asset's name. Note that this is the name of the asset in NetX, not the name of the underlying file. You can find the name of the asset via its detail page .||Yes|
The visible attribute determines whether or not non-administrator level users can view or perform actions on an asset in any context.
|assetId||An asset's unique ID assigned to it when it is uploaded to NetX. You can find an asset's ID number via its detail page .||No|
|creationDate||The creation date of an asset. This date field should be formatted as yyyy-mm-dd. To check the creation date of a particular asset, view its detail page .||No|
|fileFormatFamily||3d, audio, animation, cameraRAW, compression, data, disc, document, font, image, layout, presentation, spreadsheet, vector, video, markup||No|
|fileHeight||The height of the asset, in pixels. If an asset is a file type that does not have dimensions, e.g. an audio file, this attribute will not apply. To view the dimensions of an asset including its file height, check its detail page .||No|
|fileName||The file name of an asset. Note that this is the name of the original file, not the asset name as it appears in NetX. To view an asset's file name, check its detail page .||No|
|fileSize||The size of the asset, in bytes. To view an asset's file size, check its detail page .||No|
|fileType||The file type of an asset, e.g. jpg, mp4, etc. To view an asset's file type, check its detail page .||No|
|fileWidth||The height of the asset, in pixels. If an asset is a file type that does not have dimensions, e.g. an audio file, this attribute will not apply. To view the dimensions of an asset including its file height, check its detail page .||No|
|modificationDate||The date of the last modification to an asset. To view its modification date, check its detail page.||No|
Creating and editing AutoTasks
Creating an AutoTask
- Navigate to the AutoTask tab of the Systems area.
To add a new AutoTask, click the upper-left plus icon and give it a descriptive name. A new, pre-formatted XML AutoTask will populate in the editor.
The name of an AutoTask cannot be edited later.
Modify the pre-populated XML in the righthand window.
- Click Save.
Editing an AutoTask
- Navigate to the AutoTask tab of the Systems editor.
- Select an existing AutoTask from the lefthand list.
- Make your changes to the AutoTask in the righthand window.
- Click Save.
Every change to a site's autotask.xml file requires a restart of NetX. This includes adding new AutoTasks as well as deleting, or modifying existing tasks.
On-premise administrators can add and edit AutoTasks by directly editing the autotask.xml file. The default location of this file is here:
- Windows: C:\Program Files\NetXposure\netx\config\autotask.xml
- Linux: /opt/netx/netx/config/autotask.xml
Each AutoTask must still be formatted using proper XML, enclosed by <task> ... </task> brackets, in between the overarching <autoTask> ... </autoTask> brackets in the file. Each component of the AutoTask must be properly formatted using its accepted parameters; to properly format each element of your AutoTask, see the component rundown above. If your AutoTask is not triggering or behaving as expected, make sure all of your task's XML is properly formatted and all parameters conform to NetX's AutoTask commands.
Adding, modifying, or removing AutoTasks using the autotask.xml file directly will reflect in NetX's AutoTask tab of the Systems area.