Skip to main content

Parameterized Tasks

The includeParameters enables Tasks to be configured with a Parameter object.

The option requires you to define a target Parameter DataElement.

The StateTask has a params fieldFieldA property of a DataElement expanded to a database column and user interface input element.. When a Task with the includeParameters option runs, an instance is fetched with the name or, if defined, functional key equal to the value of this params fieldFieldA property of a DataElement expanded to a database column and user interface input element..

This instance is then passed to the Task implementation.

Usage

You can use this if you have a Task that can be configured with certain properties. It allows you to configure these at runtime.

E.g. configure a template and from-address for a mail-sender Task.

Option
includeParameters TaskElement

Adds the Details projectionProjectionA tailored subset of fields on a DataElement designed to encapsulate data for a specific technical or functional view. of a ‘parameter’ dataElement as additional argument for the task.

Before performing a task, the task bean will attempt to fetch an instance of the target type based on the params value in the StateTask. This object will then be added to the task with a setParameter() method.

<options>
<includeParameters>invoices::InvoiceSenderConfiguration</includeParameters>
</options>