Custom task uses

Custom tasks can be used to do things such as adjust the dates in Gantt sections, or adjust the free/busy status in Availability Legacy sections. Custom tasks can be used to retrieve field values dynamically from the setup record of a field, or execute an integration object record or integration definition. Custom tasks can also be used to turn on and off Data Load mode, and rebuild the hierarchy cache.

When you create a custom task, you can specify the following values in the Class Name field:
com.tririga.platform.admin.cache.web.CacheProcessingCustomTask $RefreshAllCache
Triggering this custom task does not give an indication of any change. However, it produces the same effect as selecting All Caches (Global) in the Administrator Console Cache Manager. Validate there are no errors in the logs.
com.tririga.platform.admin.cache.web.CacheProcessingCustomTask $SetDataLoadMode
Triggering this custom task shows a message in server.log indicating that you are now in Data Load mode. You can validate this in the Administrator Console Cache Manager, where it should also indicate Data Load mode.
com.tririga.platform.admin.cache.web.CacheProcessingCustomTask $SetNormalMode
Triggering this custom task shows a message in server.log indicating that you are now in Normal mode. You can validate this in the Administrator Console Cache Manager, where it should also indicate Normal mode.
com.tririga.platform.admin.cache.web.CacheProcessingCustomTask $ClearCacheAndRebuildHierarchyTree
Triggering this custom task does not give an indication of any change. However, it produces the same effect as selecting Hierarchy Tree Data - with rebuild in the Administrator Console Cache Manager. Validate there are no errors in the logs.
com.tririga.platform.util.customtasks.DynamicFieldValueCustomTask$ProcessFieldValue

Retrieve field values dynamically

Triggering this custom task with the parameter triDynamicFieldValueHelpers retrieves field values dynamically from the setup record of a field.

The workflow parameter can contain one or more helper records that are built from the triDynamicFieldValueHelper business object in the System module.

  • In the triRecordIdNU field, enter the record ID of the IBM® TRIRIGA® record from which you are retrieving the value.
  • In the triFieldNameTX field, enter the field name for the value that is being retrieved.

When the custom task completes processing, the triFieldValueTX and the triFieldDisplayValueTX fields on each triDynamicFieldValueHelper record will contain the non-formatted value and the translated display value for the value that is being retrieved.

Set field values dynamically

Triggering the DynamicFieldValueHelper custom task also allows the setting of field values dynamically. To use the custom task, pass the workflow parameter named triDynamicFieldValueHelpers into a workflow custom task with the class name: com.tririga.platform.util.customtasks.DynamicFieldValueCustomTask.

The workflow parameter can contain one or more helper records that are built from the triDynamicFieldValueHelper business object in the System module.

  • The triRecordIdNU field must contain the record ID of the IBM TRIRIGA record with the field that you want to set.
  • The triFieldNameTX field must contain the field name of the field that you want to set. The following field types are supported: Text (TX), Number (NU), Date (DA), DateTime (DT), and Duration (DU). The field must be named in accordance with IBM TRIRIGA naming conventions or best practices.
  • The triFieldValueTX field must contain the value of the field that you want to set. If you map a value that is not the native type (for example, a text value into a text field), this process is not supported and might not give the expected results.
  • The triDynamicActionPostBL field is added to the BO. If this check box is enabled, the custom task will process the fields to set their new values.

If a non-supported BO type is used, the execution of the custom task will fail. If an error occurs, see the server.log for more information.

com.tririga.platform.util.customtasks.DynamicFileAttachCustomTask$ProcessNotificationQueryAttach
Triggering this custom task allows for dynamically attaching report results to notification emails. The report types Report, Query, and External are supported.

You must pass a parameter called triDynamicFileAttachHelpers. It can contain one or more triDynamicFileAttachHelper records. The business object triDynamicFileAttachHelper resides in the System module. It contains the fields triQueryModuleNameTX, triQueryBoNameTX, triQueryNameTX, triQueryIdNU, and triFileAttachmentNameTX.

Map the triDynamicFileAttachHelper record to either have a triQueryIDNU value to represent the query id of the report to attach. Or enter the appropriate values in the triQueryModuleNameTX, triQueryBoNameTX, triQueryNameTX fields for the custom task to look up the query id of the report to attach. The value mapped to the triFileAttachmentNameTX field is the name that you want give to the attachment file.

The target record of the CustomTask workflow task should be a notification record.

For more information about custom tasks, see the following areas:
Gantt sections
Custom tasks with Gantt sections are described in "Workflow custom tasks that adjust dates in Gantt system".
Availability Legacy sections
Custom tasks with Availability Legacy sections are described in "Workflow custom tasks that adjust free status".
Integration Object records
Custom tasks with Integration Object records are discussed in the IBM TRIRIGA Application Platform: Connector User Guide.