2 1 Activities

LANSA Composer

2.1 Activities

Activities encapsulate individual units of work or business processes that can be combined with Transformations in a Processing Sequence. Activities, along with Transformations, implement the business functions that are executed by LANSA Composer Processing Sequences. Examples of Activities include:

  • Performing a file transfer via FTP (file transfer protocol)
  • Zipping a file or folder
  • Deleting a file

Two key aspects of the definition of an Activity support their implementation and use along with other Activities and Transformations to orchestrate a complete business process:

  • Activity ProcessorThis is a LANSA re-useable part that implements the function of the Activity. LANSA Composer invokes the processor as required in order to execute the Activity. The Activity Processor is provided for all supplied Activities. If you extend LANSA Composer with your own Activities, you will write their Activity Processors according to your requirements.
  • Activity parameters
    The inbound and outbound parameters for an Activity provide the variable information necessary for an Activity to complete its work. More than that though, they provide the communication between different Activities and Transformations that are orchestrated together in a single Processing Sequence. Thus, the output (outbound parameters) from one Activity might provide the input (inbound parameters) for the next.

LANSA Composer is supplied with a set of ready-to-use Activities that provide transport, file management and zip/unzip capabilities. Refer to 2.2.17 All Supplied Activities for a complete list and description of the supplied Activities or to 2.2 Activities by Group for a quick reference list of the Activities you may need for a particular task.

You can use LANSA Composer straight away with the supplied Activities. If required, you can extend LANSA Composer with custom Activities of your own. Refer to Develop Custom Activities for LANSA Composer for information on developing your own custom Activities.

Iterator Activities

Iterator Activities are a special form of Activity that can be used to perform iterative processing in a Processing Sequence.

It is possible to perform iterative processing using standard Processing Sequence directives such as LOOP, WHILE and UNTIL.  Iterative processing performed in this way is controlled by:

  • The extent of a variable list (LOOP directive)
  • A conditioning expression (WHILE or UNTIL directives)

Iterator Activities extend this capability to enable iterative processing controlled by any application-defined data, rule or condition.  When you add an Iterator Activity to a Processing Sequence, it becomes a "block" item (similar to a LOOP for example) under which you can nest further Processing Sequence directives, Activities or Transformation Maps that are to be executed for each iteration of the Iterator Activity.

Some of the Activities supplied with LANSA Composer are Iterator Activities.
They include:

FOR_EACH_CSVROW

Iterate for each row in a CSV file

FOR_EACH_INDEX

Iterate for each index in a range

FOR_EACH_TXDOCO

Iterate for each pending outbound transaction doc

You can extend LANSA Composer with your own Iterator Activities.  Such Iterator Activities might be driven by data in your own applications.  For example, you might define and implement Iterator Activities that iterate for:

  • Each division in your organization
  • Each of your products in a specified product group
  • Each product delivery scheduled on a given date

If you define your own Iterator Activities. you must implement the Activity Processor in a particular way such that it supports the iterative behavior.  Refer to Develop a Custom Activity Processor for more information.

If there is any problem with any supplied activity, refer to Restore Supplied Definitions for information on how to restore them.