Custom Fields

Use custom fields to dynamically add additional business relevant information as key/value pairs on Starts, Cases and Tasks.

Examples of custom fields are:

  • branchLocation - The location of the branch that is responsible for a task

  • customerId - The id of the customer a case is working on

  • orderAmount - The number of pieces or the amount of money of the order associated with a case

The developer workflow UI and the Portal application will display custom fields on their task and case detail pages. In the Portal application, custom fields can also be added as additional columns in task and case lists, as well as for filtering task- and case lists in dashboards. You can also use custom fields to search for task and cases.

Meta Information

You can use custom fields directly on the process elements without any additional configuration. However, we suggest that you provide additional information (meta information) for often used custom fields or custom fields that are visible to end-users in the Portal application. Meta information for custom fields can be provided in the file <project>/config/custom-fields.yaml. Additionally, you can provide some attributes of the meta information in multiple languages using the CMS.

Custom Fields API

You can access custom fields using the following API:

String branchOffice = ivy.task.customFields().stringField("branchOffice").getOrDefault("Luzern")

To search for tasks and cases by custom fields, use the following API:

TaskQuery taskQuery = TaskQuery.create();
List<ITask> tasks = taskQuery.where()
  .customField().stringField("branchOffice").isEqual("Luzern")
  .orderBy().name().ascending();
  .executor().results();

You can access the meta information of custom fields with the following API:

String label = ivy.task.customFields().stringField("branchOffice").meta().label();

To access additional attributes, use this API:

String icon = ivy.task.customFields().stringField("branchOffice").meta().attribute("Icon");