Skip to main content

Task with Result

A regular Task has TaskResult<Void> as return type:

TaskResult<Void> perform(ParameterContext<InvoiceDetails> targetParameter) { }

But it is possible to change this using the hasResultClass option:

TaskResult<MyResult> perform(ParameterContext<InvoiceDetails> targetParameter) { }

This is sometimes used when a Task is executed as part of another process.

Option
hasResultClass TaskElement

Changes the return type for implementations of this task.

<options>
<hasResultClass>net.demo.MyResult</hasResultClass>
</options>