Defining Tasklets

Tasklets can be used in more than one orchestration and opened from various tasklets. With each instance, the tasklet can be configured differently for the orchestration in which it opens. To use a tasklet in an orchestration, you must define the tasklet. Defining a tasklet includes the following:

Local and Global Tasklet Definitions

You can define a tasklet for use in an orchestration in two ways:

  • Locally on the <orchestration> element.

  • Globally in the <userRole> element.

The following example shows where local and global tasklet definitions are located in the UserRole.xml file:

<userRole>
  <orchestrations>
    <orchestration>
    <!-- Local tasklet definitions here -->
      <tasklets>
      </tasklets>
    </orchestration>
  </orchestrations>
  <tasklets>
  <!-- Global tasklet definitions here -->
  </tasklets>
</userRole>

A local tasklet definition on an <orchestration> element applies only for that particular orchestration. The tasklet cannot be called from other orchestrations. To use the tasklet in another orchestration, you must also define the tasklet for that orchestration.

A global tasklet definition allows you to define a tasklet in one location and then reference it from any orchestration in the UserRole.xml file. Any instance of the tasklet inherits the settings of the global definition. You typically use a global definition on a tasklet that is used in multiple orchestrations, where many tasklet settings are common for each orchestration. For example, you can use the global tasklet definition to specify the tasklet assembly name instead of defining this every time that the tasklet is used. Global settings also make changes easier because you only have to make changes in one place.

Combining Local and Global Tasklet Definitions

You can define a tasklet both globally and locally. For an orchestration, the global and local tasklet definitions are combined to form a single definition. For example, you use a global tasklet definition for the general settings and use the local tasklet definition to configure the tasklet for the specific orchestration. The global and local tasklet definitions work together in an orchestration in the following ways:

  • The tasklet inherits the elements and attributes from both the local and global definitions.

  • If there are similar elements and attributes in the global and local definitions, then the local definition element takes priority.

  • If both the global definition and the local definition have a <configuration> element, then the <configuration> element for the global definition is ignored and only the local configuration block is used. For information about the <configuration> element, see Configuring Tasklets.

See Also

Community Additions

ADD
Show: