Task attributes
Task attributes are only available in Studios created after 1 December 2024.
A task is an instance of an activity. Each time a mandatory activity is triggered or a user performs an optional activity in your application, a new task is created. Grexx Platform automatically records various pieces of metadata for each task, including the task ID, the dates the task was created, finished, and/or cancelled, the due date, and the case ID of the user that performed the task.
In addition to this default metadata, you may want to record additional data in relation to tasks. You can do this using task attributes. For example, you might use a task attribute to record an "advance warning" date for a mandatory task so that you can trigger an email notification if the task has not been submitted by that point in time.
Create task attributes
Task attributes are created at the platform level. This means the same attributes are available on all tasks, regardless of the activity.
You can create new task attributes from your Studio under Platform > Task attributes. Select the appropriate Type according to the data you want to store. Note that Small string
is limited to 250 standard characters. For more information about supported data types, see Attributes.
Populate and use task attributes
To set the value of a task attribute, use a mapping and set the To attribute type to Task attribute. You can add the mapping to any stage of the activity lifecycle and use this to update the task attribute value as the task progresses.
As with case attribute mappings, you can set the value of a task attribute from a number of sources, including a form field, inline template, case data, or by specifying a static value.
Once set, you can use the value from a task attribute in several ways:
- In a condition on an activity, such as an
If then else
block. For example, you might use a condition to evaluate whether a date stored in the task attribute is in the past, and only trigger aSend email
activity if the condition is satisfied. For more information, see Apply conditional logic to activities. - As a column in a dataset of open or overdue tasks. You can then display the dataset in a grid widget. For more information, see Work with case and activity data.
- In a mapping to populate a form field or update case data. You can access the task attribute value directly (by setting the From attribute type to Task attribute), or combine it with other values or static text by using an inline template.
- In a template. In addition to using inline templates to reference task attributes in activity conditions or mappings, you might want to include the task attribute value in the body of an email or in dynamic CSS. To access the value of a task attribute, use the
task.
template function. For more information, see Templates.
You can see where a task attribute is being used from the Related cases pane on the individual task attribute page.