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:
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).
Consider the following for Filter objects of type Registered Job Output or File:
- 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.
- 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.
You do this on the Output-Scan page when defining the Job, File Transfer or Remote Task Manager objects.
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.
A Filter object definition is made up of the following pages:
- Standard pages that are always available, no matter what type of object you are defining:
- The object-specific page described here.
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:
-
Report: These are the reports that are generated by the Automic system and stored in the Automation Engine database when a task is executed, for example logging (LOG) or activation (ACT) files.
In this section you specify the reports in which the Filter object should search for the string.
- Registered Job Output: These are output files from external jobs.
- File: These are any other kind of text file that you want to check.
To Define the Specific Searches
You define the searches in the same way for all file types.
- In the Process Assembly perspective, click Add Object and select Filter.
-
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.
- Select an operator:
- Contains
- Does not contain
-
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.
- Click Add.
A search filter statement appears under the input fields.
Only statements under the input fields are used in the final object, so make sure to click Add.
- To remove an added search criterion, click the X in the right of the criteria box.
-
To edit an added search criterion, click on the search filter statement to activate it and modify its contents:
- Repeat these steps for all the search criteria and save the object.
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: