Filter Object (FILTER)

The purpose of a Filter object is to search in one or more text files for the presence or absence of a specific string and, based on the results of the search, to return an overall true or false value. As a developer and object designer you create Filter objects and assign them to File Transfer Objects (JOBF), Job Object (JOBS) or Remote Task Manager Object (JOBQ) in their Output Page to search their output files for a specific string or combination of strings. .

Object definition

Object class: Passive object

Object type/Short name: FILTER

Object template: OUTPUT

There is only one FILTER object type definition that is delivered with the Automation Engine, namely the FILTER.OUTPUT.

When you read about Filter objects in the Automic documentation or in messages when working with Automic, this refers to the FILTER.OUPUT object subtype.

This topic provides information on the following:

Example

In a Workflow, you sometimes need to check for a certain processing status before continuing to the next task. If all you need to know is whether the previous task ended with a certain status, you can define post- and pre-conditions for the tasks in the Workflow. Other times, however, the status that you need is more than just whether a previous step ends with a certain status. For example, you could need a status that can be verified by checking the output files of previous tasks for certain strings or combinations of strings. In this case, you use a Filter object (FILTER.OUTPUT).

Prerequisites

Consider the following for Filter objects of type Registered Job Output or File:

  1. Define the output files that you want to register as external for the Job. They will be transferred to and stored on the agent; thus they can be accessed from the User Interface and by the Filter object.
  2. You do this on the Output-Scan page when defining the Job, File Transfer or Remote Task Manager objects.

  3. When the object is executed, the system scans for the strings defined in the Filter object considering the conditions specified there. The results are published to the task report.

Technical Considerations

Automic administrators set the memory size for reading reports in the DEFAULT_REPORT_SCAN_MEMORY and MAX_REPORT_SCAN_MEMORY options in the UC_SYSTEM_SETTINGS - System-Wide Settings.

Filter objects created in system client 0 can be used in user-defined clients.

Defining Filter Objects

A Filter object definition is made up of the following pages:

Output page definition

Filter Searches

In the remaining sections of the filter definition you can define one of more criteria for the different file types that you can search. The file types are:

To Define the Specific Searches

You define the searches in the same way for all file types.

  1. In the Process Assembly perspective, click Add Object and select Filter.
  2. On the Filter page, do one of the following:

    • For Reports, select a file type
    • For Registered Job Output or File, enter a file path and name. For example: C:/MyUser/filename.txt.

    You can use wildcard characters for file names. The search for files is case-sensitive.

  3. Select an operator:
    • Contains
    • Does not contain
  4. Enter a search string. Standard wildcard characters (*, ?) are allowed. You can also use variables here.

    The notation of the string is irrelevant, as this field is not case-sensitive.

  5. Click Add.

    A search filter statement appears under the input fields.

    Output page definition

    Only statements under the input fields are used in the final object, so make sure to click Add.

  6. To remove an added search criterion, click the X in the right of the criteria box.
  7. To edit an added search criterion, click on the search filter statement to activate it and modify its contents:

    Output page definition

  8. Repeat these steps for all the search criteria and save the object.

Next Steps:

Assign the Filter object to the object in which you want to search for strings in their output files.

You can now insert the object in a Workflow, for example, and build the logic to process further objects based on the results of the search.

See also: