General

Through Inspection Configuration, BlueWorx Administrators can control the appearance and required entry of one or more additional Questions. This concept allows organisations to be precise in their data gather and offers opportunities to create audit-able procedures where performance dictates.

Contents

Basic Principals

An Inspection Rule may be referenced by multiple Inspections. In addition to their identity and comments they comprise of the following:

  • Rule Conditions (optional) - these are logical statements that evaluate things about the Technical Object being inspected or the Work Order or another Inspection Question response. The rule conditions run and return either True or False
  • Rule Actions - Rule Actions run when the Rule Condition evaluation returns True. The Action can be to either hide one or more Questions; or show one or more Questions; or one or more Questions and make them mandatory

Important Notes 

  • Audit - Inspection Questions and their response values in BlueWorx are stored in SAP as a permanent record of what the Inspector was asked and what their response was. This can serve to support regulatory audit requirements, subject to an organisation satisfying themselves and regulators of this approach. However Inspection Rules are not captured as a snapshot at the time of the inspection event, therefore the logic applied at the time the Rules ran can not be audited. From a product perspective Zag has assessed this as not being material, but its up to individual organisation to make their own assessment
  • Translations - Inspection Rules are not directly exposed to end users so while there is translation of the screen controls, there is no translation functions for the rule content
  • Same Question Re-Use - When being developed the concept of apply the same rule action to the same Question located in different Question Groups was not anticipated and it only applies to the first Question found. As such the action will only execute on the first Question found. This limitation will be addressed in a future release.
  • Multiple Answer Questions - Rules cannot use the answers of Multiple Answer Questions as conditions.

Rules Condition Evaluation

Key Concepts

Here are some key concepts around Rule Conditions:

  • Rules are evaluated in Order of Sequence in an Inspection after Inspection initialization or after an Inspection Question response. So if you're hide some questions to then evaluate them to make visible later, make the hide Rule sequenced before the show Rules (and visa-versa to use a show/ hide strategy which is a 'safer' approach)
  • If a Rule has no Conditions it will evaluate as True and all Actions will be performed. For example use to hide Questions en-mass. For this reason Rules like this should generally be first to be evaluated
  • If a Rule Condition tries to evaluate a source which does not exist; or to evaluate a Question value that is hidden, then it will evaluate as False. For example if you evaluate a Characteristic value that has not been added to the Equipment then it will return False
  • Rule Conditions evaluated within a Group ID are evaluated using the OR operand. In an OR evaluation TRUE will always over ride FALSE
  • Rule Conditions without a Group ID are evaluated using the AND operand

Source Types

When Rule Conditions are evaluated they use data from the following list of Source Types:

  • Characteristic of the parent Technical Object being inspected
  • Equipment being inspected
  • Functional Location being inspected
  • Inspection Question response

Classification Characteristics - Multi-Value Evaluations

As of SP12, where you want to evaluate a value in a multi-value characteristic this is now possible. Single entries will be found using the Includes operator. Where used with other Conditions, when using the same Group ID the evaluation uses and OR; when using different Group ID the evaluation uses AND. 


Example A - Different Groups (AND)

Testing providing all the values - separated by a pipe |. Passes

Testing using one of the values. Fails because it's an AND condition:

Example B - Same Groups (OR)

Testing using one of the Conditions - works as expected as it's an OR condition:

Operators

The Rule Condition Operators are as follows:

OperatorNumericStringDateExamples
BetweenYesNoNo
  • 5 (source) is between 3 and 7 (value and value 2) | Evaluate TRUE
  • 8 (source) is between 3 and 7 (value and value 2) | Evaluate FALSE

Contains

YesYesNo
  • X55 (value) is contained in ABC-X55-1234 (source)  | Evaluate TRUE
  • X54 (value) is contained in ABC-X55-1234 (source) | Evaluate FALSE
Not Contain YesYesNo
  • X55 (value) is not contained in ABC-X55-1234 (source)  | Evaluate FALSE
  • X54 (value) is contained in ABC-X55-1234 (source) | Evaluate TRUE

Days from Today

NoNoYes
  • -100 (value) is <= 100 days in the past from (source) and NOW | Evaluate FALSE [Note the negative]
  • 100 (value) is >= 100 days in the future from (source) and NOW | Evaluate TRUE

Equals

YesYesYes
  • 1 (source) = 1 (value) | Evaluate TRUE
  • Cat (source) = Dog (value) | Evaluate FALSE
  • Dog (source) = Dog (value) | Evaluate TRUE

Greater than

YesNoNo
  • 10 (source) > 5 (value) | Evaluate TRUE
  • 5 (source) > 10 (value) | Evaluate FALSE

Greater than or Equal

YesNoNo
  • 5 (source) > 5 (value) | Evaluate TRUE
  • 4 (source) > 5 (value) | Evaluate FALSE

Less Than

YesNoNo
  • 10 (source) < 5 (value) | Evaluate FALSE
  • 4 (source) < 5 (value) | Evaluate TRUE

Less Than or Equal

YesNoNo
  • 4 (source) > 5 (value) | Evaluate FALSE
  • 6(source) > 5 (value) | Evaluate TRUE

Not Equals

YesYesYes
  • 1 (source) <> 1 (value) | Evaluate FALSE
  • Cat (source) <> Dog (value) | Evaluate TRUE
  • Dog (source) <> Dog (value) | Evaluate FALSE
Is BlankYesYesYes

If a value is either an empty string, undefined or null it is regarded as blank:

  • 1 (value) | Evaluate FALSE
  • "" (value) | Evaluate TRUE
  • [undefined] (value) | Evaluate TRUE
  • [null] (value) | Evaluate TRUE
Not BlankYesYesYes

If a value is NOT an empty string, undefined or null it is regarded as not blank:

  • 43 (value) | Evaluate TRUE
  • "Dog" | Evaluate TRUE
  • "" (value) | Evaluate FALSE
  • [undefined] (value) | Evaluate FALSE
  • [null] (value) | Evaluate FALSE

Other Notes

  • Character (non mathematics operands) evaluations are not case sensitive

  • Where the source value specified can not logically be evaluated (for example a numeric operator on a string value), the evaluation returns False.

  • The Source values displayed when configuring a Rule Condition are dependent on the Source Type you enter, so if you select Equipment then you'll get the available Equipment fields and if you select Work Order then you'll get a list of Work Order fields
  • If you select a Classification value as a Source Type then it will use that value sourced from the Technical Object and not any response value for other Inspection Questions that might also reference that source field
  • The Question value field is only available where the Source Type = Inspection Question
  • Percentage comparisons between two values may be included in future release depending on customer demand.

Rule Condition Evaluation Logic Explained

The following diagram explains how Rules are evaluated.


An example to further clarify how the Group IDs work follows:

In the above screenshot:

  1. The “AND” operator applies between different code groups. i.e. (Group ID A = True AND Group ID B = True ) = Pass
  2. The “OR” operator applies within a code group. i.e. (Group ID A = True OR Group ID A = False ) = Pass


Note that when blank code groups are used the "AND" operator which is applied. In the screenshot below both of these conditions have to be true in order for the rule to pass.

Business Scenario 1 - Gas Compliance Certificate Date

In this scenario, when inspecting a house, we want the inspector to record the Gas Compliance Certificate Date if the stove Gas or Gas Electric. If it's not Gas or Gas Electric then we don't want them to see this question. 


In order to do this we set up the following rule which runs and evaluates whether to show a question on the date of the last gas compliance certificate, based on their previous response to a question about whether the oven being inspected is gas or electric, which itself is sourced to and can update the Equipment Classification Data.


Here's how setting up this Business Scenario might look like in theory:


Question 1: Gas or Electric

Answer Group or Classification Values:

1. Electric

2. Gas

3. Gas/ Electric


Question 2: Gas Compliance Date

Response = Mandatory


Rule 1 - Sequence Blank

Rule Condition [evaluate one values from the Technical Object, Work Order or Question Responses]

Is the value of Question 1 Response Not Equal to Gas Electric. 


Rule Action [do this if the Rule Condition = TRUE]

Make Question 2 (Gas Compliance Date) Hidden


Important Note: If we took the approach of hiding a question to then evaluate to make it visible later, then you run the risk of them not being made visible. If the question is safety related, then, as has been done in this example, it's better to hide it based on it not being something.

BlueWorx Administration

Here's how setting up the Business Scenario above looks like in BlueWorx Config:

Question 1 - Gas or Electric

This question asks for the type of appliance.

Question 2 - Gas Compliance Date

This question asks for the Gas Compliance Date

Rule 1 - Gas Certificate Date - Conditions Tab

Now here's the Rule to evaluate for Gas Electric:


Rule 1 - Gas Certificate Date - Condition Dialog Detail

Here's the Condition detail:

Rule 1 - Gas Certificate Date - Actions Tab

Here's the Actions where the Rule(s) evaluate as True - i.e. Hide the Question GAS_COMPLIANCE_DATE 

Applying the Rules to an Inspection

Having made the rules we now apply them to an Inspection in BlueWorx Administration. 

Rule Test at Rule Level

You can run simulations of rules with the admin application at the Rule and Inspection level, saving you administration time.

This testing level simulates the evaluation of all the Rules Conditions.

Rule Test and Inspection Level

This testing shows that, as a result of all the Rules for an Inspection being applied, what Inspection Question would be hidden, shown or shown and mandatory.

BlueWorx Application

Now we can see how the configured Inspection and Rules work in the main BlueWorx application. You can see in the screen shot below that the 'Gas or Electric' question value has been answered as 'Electric', so no 'Compliance Date' question is shown


Now if we change the 'Gas to Electric' question response to 'Gas' then the 'Compliance Date' question is shown and is mandatory:


Business Scenario 2 - Contractors Signature

In this scenario, when contractors are performing work, you want their signature for some reason (Safety or Work Completion to standard for example). You assess something about the Order to determine that its a contractor. For example that the Work Centre contains an E, and then make a Signature Question Mandatory.


Here's how setting up this Business Scenario might look like in theory:


Question 100: Signature of Completion 

Instructions: Certify that work has been undertaken I/A/ W contract and to specification standards.


Rule 1 - Sequence Blank

Rule Condition [evaluate one values from the Technical Object, Work Order or Question Responses]

Does the Work Centre Contain the Text 'EX'


Rule Action [do this if the Rule Condition = TRUE]

Make Question 100 (Signature of Completion) Compulsory


Note that screen shots for the BlueWorx set up have not been shown, they use the same pattern as the previous example.