Task descriptor

The task descriptor defines a Business Rules task. A task is called from a node.

The following XML shows a sample format of the task descriptor element.
<?xml version="1.0"?>
<taskDescriptor name="SampleTaskName" type="TABLE">
   <dataName>NameOfADataDescriptor</dataName>
   <userExitClass>SampleTaskUserExitClassName</userExitClass>
   <assignments>
      <assignment field="fieldname" value="fieldvalue"/>
            ...
   </assignments>
</taskDescriptor>
The following table shows the elements for a task descriptor.
Table 1. Task descriptor elements
Element Parent element Description
taskDescriptor None, this is the root element This element is the root element. The name and the type of the task must be specified in the attributes of this element.
dataName taskDescriptor This element contains the name of the data descriptor that describes the data that is used by a table task type.
userExitClass taskDescriptor This optional element specifies the name of a Java™ class that is called before and after the task is executed. The user exit must implement the defined task user exit interface.
assignments taskDescriptor The assignments element can be used to assign values to one or more of the fields for the task. This element and its children are optional.
assignment assignments This optional element is used to assign a value to a field.

A task returns either SUCCESS or FAILURE in a results variable when it has finished running. A node can test the results value from a task and use it to make decisions during execution.

The following topics describe the tasks that are available in Business Rules.