Skip to main content

FieldLogs

Understanding the componentsConfiguration.json

The componentsConfiguration.json defines the scope of the data contained in the report. It has a list of variable configurations. These variables can be used in the .ftl file to refer to the required data.

It contains information that is used to define the search query used to print the report. The criteria specified in this file for the search query may include Template, Task, keyword, Suite, Template Version, Template Publication Date, etc.

Note

The componentsConfiguration.json file has to be compressed into a .zip file along with the .ftl model file.

The below image shows where to upload the .zip file in the Reporting NG user interface.

ReportingNG-componentConfigjsn.png

The file contains the list of all the variables and their configurations. Each variable configuration contains the following parameters:

Parameter

Description

Variable Name

The name of the variable.

This will be used in the .ftl model file to refer to the data contained in the variable.

Data Type

The type of FieldLogs object the variable pertains to.

The variable may refer to the data pertaining to a Template, Job, Dataset, COP, Executed Template, Task, Enterprise etc.

Data Source Type

Specifies if the variable used is the ID of an object or a search query string.

Accordingly, the "datSourceType" can either be "searchQuery" or the ID of the objects ("templateID", "datasetID", "copID", "enterprise" etc.).

Variable Data Source List

The Variable Data Source List is defined by three parameters.

Parameter

Description

Variable Data Type

Specifies where the variable is defined. It takes one of the following values.

  • configInput: The variable and its value are specified in the componentsConfiguration.json file.

  • userInput: The variable is specified in the userInputFile. The value of the variable will be provided by the user.

Note

Only when the variableDataType : "userInput" is specified in the componentsConfig.json, the system checks the userInputFile.json file.

Otherwise, the userInputFile.json is ignored.

Variable Input Data

Defines the type of variable data. It takes one of the following values.

  • keyword: Search query keyword

  • projectID: Project ID

  • package: Package in which the Template is

  • suite: Suite in which the Template is.

  • readingID: Template ID

  • datasetID: Dataset ID

  • copID: COP ID

  • version: Template Version

  • publicationDate: Publication Date

  • taskStatus: Status of the Task (Done/New/Started)

  • enterprise: Enterprise. This returns an object of type FMEnterpriseHierarchyModel.

Value

The value of the data.

Note

If the value is to be provided by the user, then the corresponding variable name in the user input file is used.

The following example shows a variable p1 used to filter Tasks whose version matches the value 1.0.0.

ReportingNGVarDataSourceList.png

User Required Data

User input data can be used to filter data in ReportingNG. This parameter is used to surface the user input data into the model.

components.userRequiredData returns UserRequiredData.

userRequiredData.requiredInputDataList returns a list of requiredInputData .

requiredInputData has the following attributes :

Attribute

Description

requiredInputData.name

Name of the data

requiredInputData.value

Value set by the user

Some examples of reports are discussed below.

1. Using Search Queries:

1.1. Search Query with a Keyword:

This example shows the definition of a variable p1 defined in the componentsConfiguration.json. The variable holds a keyword with the value 100 - DO A PRELIMINARY INSPECTION. The variable pertains to the Job object. The source of the data is searchQuery.

This variable defines a keyword that will be used in a search query. Reports pertaining to all the objects returned by the search query will be printed. This may be single or multiple reports.

ReportingNG-compConfig1.png

1.2. Search Query with a Condition:

The below example shows the definition of a variable p1 defined in the componentsConfiguration.json. The variable holds a publicationDate with the value 2022-06-18. The operator equals is also specified.The variable pertains to the execTemplate object. The source of the data is searchQuery.

Note

Operator can take one of the values (equals / greater / less).

This variable defines the search query condition PublicationDate equals 2022-06-18?. This is used in the search query.

PubDateReportingNG.png

The below example shows the definition of a variable p1 defined in the componentsConfiguration.json. The variable holds a version with the value 1.0.0. The variable pertains to the execTemplate object. The source of the data is searchQuery.

This variable defines the search query condition Does version have a value of 1.0.0? This is used in the search query.

versionReportingNG.png

2. Using a Specific ID:

The following example shows the definition of a variable var2 defined in the userInputFile. The variable holds a datasetID. The value will be provided by the user in the userInputFile. The variable pertains to the dataset object. The source of the data is datasetID.

This variable configuration indicates that the value of the dataset ID will be obtained from the user.

ReportingNG-CompConfig2.png