Skip to main content

Brinqa Condition Language

This articles details the Brinqa Condition Language (BCL), differences between the Brinqa Query Language (BQL) and BCL, proper BCL syntax, and where and how to use BCL in your Brinqa Platform.

What is BCL?

BCL is the language used to specify conditions when creating or modifying Risk Factors, Service-Level Agreements (SLAs), or any other feature in the Brinqa Platform that requires a condition for an action to run. The condition is used to define a data set and its syntax is similar to the WHERE clause of a BQL query. For example:

  • riskRating = "Critical"

  • status = "Active"

  • dateCreated IN LAST 30 Days

BCL syntax

The general BCL syntax is as follows:

  • attributeName operator "Value"

The attribute must exist in the target data model, the operator can be any of the BQL operators, and you can specify the value placed in double quotes. (Number and Date values do not have to be wrapped in double quotes.) You do not need to include the name of the data model since you can only create conditions within a data model.

For example, if you want to specify a condition for out-of-compliance high and critical vulnerabilities, you can write the following condition on the Vulnerability data model:

complianceStatus = "Out of SLA" AND riskRating IN ["Critical", "High"]

Since the condition is for the Vulnerability data model, you must ensure that both complianceStatus and riskRating are valid attribute names for Vulnerability. Use the Vulnerability data model documentation to verify. If the data model does not contain the attribute names, the condition does not run.

Assign relationships in BCL

In BQL, you use the relationship keywords to specify relationships, like SOURCED_FROM, OWNS, or SUPPORTS. For example:

Find Person that OWNS Host Where name CONTAINS "Bob"

The Host data model has an attribute, owners, that defines the OWNS relationship on the Person data model.

BCL also supports the use of relationships, but the syntax is different. Rather than using the keywords, you define relationships with . on the Reference type attributes in the target data model. For example, the following condition is equivalent to the BQL query above: CONTAINS "Bob"

The requirement is that the attribute must be a Reference type related to another data model. In this case, owners is an attribute (in the Host data model) that references the Person data model.

If you want to traverse multiple relationships, you can chain additional attributes with additional . . Each attribute must be a Reference type and exists in the target data model. For example, if you want to change the previous condition to filter on the owner’s manager instead, you can write the condition as follows: CONTAINS "Alice"

managers is an attribute in the Person data model that references the Person data model.