Step 3 Add Directory List Activity to your Processing Sequence

LANSA Composer

Step 3. Add Directory List Activity to your Processing Sequence

LIC002 - Create a Processing Sequence

1.  Select the Activities tab (top left) to display a list of Activities. The list may be filtered by selecting an Activity group from the drop down list.

     Note that Activities are shown in groups.

2.  Locate the File Management group and then locate the DIRECTORY_LIST Activity and drag and drop it on to the sequence details panel (top right). Drop it on the *** End of processing sequence *** text. Alternatively, you may add the Activity to the sequence by double clicking on it.

     The DIRECTORY_LIST Activity is a supplied Activity. It will output a list of files in a requested directory. Optionally, you can filter the list of files to select only files with a particular extension.

3.  Select the DIRECTORY_LIST Activity in the Details panel (top right). The details for the Activity will be shown in the panel bottom right.

4.  Select the Parameters tab (bottom right) to view the parameters for this Activity. The Notes relating to this Activity are shown in the bottom left panel.

5.  For this tutorial you will select only files with an extension of xml. So, for the parameter EXTENSION enter a value of xml in the Variable or value for parameter column. This means that when this Processing Sequence is executed a value of xml will be set for the EXTENSION parameter.

6.  When this Processing Sequence is executed the value for the DIRECTORY parameter is going to be provided. This parameter needs to be identified as an input parameter. To do this select the Variables tab (top left). The Variables tab lists all variables defined in this Processing Sequence and all those required by any of its processing steps.

     Select the Parameters tab (top right) and drag and drop the DIRECTORY parameter from the Variables tab into the Parameters tab.

     Note:

      You have just defined a runtime parameter for the Processing Sequence.

      You can define a default value for parameters. This is a useful if a path and file name is being input, to avoid errors while testing.