AutoTask Modifications

For an overview of AutoTasks and their syntax, see AutoTasks

AutoTask modifications are changes made directly to any affected asset when the task is triggered, such as editing attribute values, reorganizing assets in folders, and expiring assets.

Modification types

attribute

Attribute-type modifications require the exact name of an attribute and a precise value to apply to any asset that matches the AutoTask's match criteria. This value replaces any value that is already applied to an affected asset. 

Parameter Description
type

To use attribute parameters, the AutoTask's criterion type must be attribute.

Value options: attribute

name

The value of this parameter must be the name of a custom attribute.

Value options: valid attribute name

value

The value of this parameter must be an appropriate value for the named attribute, e.g. if the attribute is a date-type attribute, the value for this parameter must be a properly formatted date. If the attribute uses a controlled vocabulary, such as pulldown or tag attribute types, this value must exactly match an existing vocabulary value.

Value options: valid value for the named attribute

In the following example, the AutoTask will assign the value yes to the attribute named Resync once triggered. This AutoTask will trigger according to its match criteria, in this case when an asset in NetX is resynced.

<task>
    <matchCriteria type="and">
        <criteria type="action" value="resync"/>
    </matchCriteria>
    <modifications>
        <modify type="attribute" name="Resynced" value="yes"/>
    </modifications>
</task>

category

The category modification type reorganizes affected assets to a new folder location once the AutoTask is triggered.

Parameter Description
mkdir

If the value of this parameter is true, a new folder will be created at the specified folder path if the folder does not yet exist. If the value of this parameter is false and the path parameter does not point to an existing folder, the task will fail.

Value options: true / false

type

To use category parameters, the AutoTask's criterion type must be category

Value options: category

path

The value of this parameter must point to a NetX folder. If the folder is a subfolder, the full path from the top level must be included, e.g. Campaigns/Fall/Fall collection where Fall collection is the chosen parameter folder. Note that a prefix should not be used to indicate the start of the folder path, even if the folder is a top-level folder.

Value options: name of a NetX folder

value

The value of this parameter defines the organize action the AutoTask will perform once an asset meets its match criteria. If the value is move, the asset will be moved to the folder specified in the path parameter and subsequently removed from all other folders. If the value is add, the asset will be added to the folder specified in the path parameter without removing the affected asset from any other folder. 

Value options: move / add

In the following example, any asset that is checked in will be reorganized into the folder Campaigns/Autumnal vibes/Updated.

<task>
    <matchCriteria>
        <criteria type="action" value="checkin"/>
    </matchCriteria>
    <modifications>
        <modify type="category" path="Campaigns/Autumnal vibes/Updated" value="move" mkdir="true"></modify>
    </modifications>
</task>

expire

Assets can be set to automatically expire via AutoTask by configuring the number, in days, between the date the AutoTask triggers for an asset and that asset's expiration. 

Parameter Description
type

To use expiration parameters, the AutoTask's criterion type must be expire

Value options: expire

value

This parameter defines the number of days between the point the AutoTask is triggered, and the time any affected asset expires

Value options: number, in days

The expire modification type's value parameter defines the point at which the asset will expire, but not the effects of the expiration. To determine what occurs once an asset is expired, one must configure the following properties:

Parameter Description
asset.expire.enabled

If the value of this property is true, the asset expiration feature is enabled. If the value of this property is false, the asset expiration feature is disabled. A value of true is required in order to trigger any AutoTask with an expire modification type.

Value options: true / false

Requires restart? No

image.expire_assets_action

Value options:

  • Folder Path: When the value of this property is a NetX folder path, e.g. Campaign materials/Autumn line/Autumn line 2020, expired assets are moved to the corresponding path. If this path does not exist, the expiration will fail.
  • delete: When the value of this property is delete, any expired asset will be deleted from NetX. Use caution when configuring an AutoTask that uses the delete parameter, as this action cannot be undone and any affected assets will be permanently removed from NetX.
  • notVisible: When the value of this property is notVisible, any affected asset's visibility will be changed to not visible; when an asset is marked as not visible, only administrator-level users will have any access to the asset. 

Requires restart? No

In the following example, any asset moved to the folder Campaign materials/Autumn line/Autumn line 2020 will expire after ten days. Once expired, any affected asset will be deleted, marked as not visible, or moved to a new folder according to the value for the property image.expire_assets_action.

<task>
    <matchCriteria type="and">
        <criteria type="action" value="move"></criteria>
        <criteria path="Campaign materials/Autumn line/Autumn line 2020" type="category"></criteria>
    </matchCriteria>
    <modifications>
        <modify type="expire" value="10"/>
    </modifications>
</task>
Was this article helpful?
0 out of 0 found this helpful