Example of a Filter Object

Filter objects allow you to check one or more text files for the presence or absence of specific strings, to return an overall true/false value. This example illustrates how to use a Filter object to search for a string in a report.

You have created a workflow that contains a Windows Job object (JOBS); this job collects certain directories that you need for your operations and writes them to the Report (REP). You need to know whether a particular string occurs in those directories. In this example, the string you want to search for is mycompany. Whether the string is found or not is then written to the Output Scan report (OREP).

This is what you have to do:

  1. Create the Filter object. In this example it is called FILTER.OUTPUT.FIND.NAME. Since only one condition must be evaluated, the Filter Definitions setting is irrelevant in this case:

    XXX

    1. In the Report section select Report (REP). This is your target, that is, where you will read the results of the Filter object.
    2. Select the Contains operator.
    3. Enter mycompany in the adjacent input field.
    4. Click Add.
  2. You now assign the FILTER.OUTPUT.FIND.NAME object to the Job object that collects the directories. You do this on the Output-Scan page of the Windows job.

    In this example, the Job is called JOBS.WIN.CHECK.DIRECTORY.

    In addition to assigning the Filter object, you will define here the values that it should return as well as a user-friendly translation of those values.

    1. Click Add row and select FILTER.OUTPUT.FIND.NAME to assign it to the job.
    2. Click anywhere on the Filter Criteria Apply cell to activate it.
    3. The Set Return Code spinner is automatically activated. Leave 0 here.
    4. Click the editor icon in the Status Text cell. The Cell Editor dialog opens. Enter Directory exists.

    You have now defined what to search for and where to publish the results of that search (in the Filter object); you have also defined where to search and which filter criteria to apply (in the Job object)

    XXX

  3. Execute the workflow that contains the JOBS.WIN.CHECK.DIRECTORY. job and, when finished, open its Last Monitor.
  4. Right-click on the task to select Open Reports:

    XXX

  5. Select the Output Scan (OREP) report type from the dropdown list, where the you will find the result of the search:

    XXX