Using Test Data Rules (G-Rules) with EDI Overview

Important: We recommend going through the Software Tester Intermediate Flight Plan first to become more familiar with setting up and using G-Rules within the GenRocket web platform.

This lesson provides an overview of how G-Rules can be used with G-Cases to apply business logic to generated EDI Documents/Transaction Sets.

Test Data Rules are a key part of GenRocket’s Self Service Test Data Portal. We organize all the Test Data Rule functionality into a part of the GenRocket platform we call “G-Rules.”

What are Test Data Rules (or G-Rules)?

Test Data Rules (or G-Rules) define business logic that can be applied to generated test data. G-Rule Suites are used to manage G-Rules and may contain one or many G-Rules.

Each G-Rule may have one or many Actions/Conditions, which define the business logic as a Conditional Statement.

What is a G-Rule Condition?

A Condition represents the IF portion of a conditional statement for 1 Segment/Loop (i.e., Domain) and 1 Element (i.e., Attribute).

A G-Rule can have one or many Conditions, which can be combined using AND or OR. Here is an example of a Condition for EDI:

IF (NM1_SubmitterName_1000A.NM101__EntityIdentifierCode == ’41’AND
NM1_SubmitterName_1000A.NM102__EntityTypeQualifier == ‘1’)


What is a G-Rule Action?

An Action represents the THEN portion of a conditional statement for 1 Segment/Loop (i.e., Domain) and 1 Element (i.e., Attribute).

A G-Rule can have one or multiple Actions. Here is an example of an Action for EDI:

THEN
    NM1_SubmitterName_1000A.NM103__SubmitterLastOrOrganizationName = ‘Taylor’
    NM1_SubmitterName_1000A.NM104__SubmitterFirstName = ‘Hycel’


How can they be used with EDI?

Users can define Conditions in G-Rules that must be met for an Action to take place. The Action will generate a constant value, or a value generated by a referenced Generator.

For example, G-Rules can determine what values will be generated for one or more Elements within a Segment based on the defined Actions.

G-Rule 1: If the NM101_EntityIdentifierCode is “41” and the NM102_ EntityTypeQualifier is “1” within the NM1_SubmitterName_1000A Segment, then the following data values will be used:

  • NM103_SubmitterLastOrOrganizationName = “Taylor”
  • NM104_SubmitterFirstName = “Hycel”

G-Rule 2: If the NM101_EntityIdentifierCode is “41” and the NM102_EntityTypeQualifier is “2” within the NM1_SubmitterName_1000A Segment, then the following data values will be used:

  • NM103_SubmitterLastOrOrganizationName = “GenRocket”
  • NM104_SubmitterFirstName = References a Generator that will generate an “Empty” value

How to Access G-Rules from the EDI Management Dashboard

Step 1: Expand the Management Menu within the Menu Bar and select EDI Management.

Step 2: Select the EDI Project within the EDI Header Pane.

Step 3: Select the EDI Project Version within the EDI Versions Pane (if the EDI Project has multiple Project Versions).

Step 4: Click on the G-Rules button.

How to Access G-Rules from the Project Dashboard

Step 1: Select the EDI Project within the Projects Pane.

Step 2: Select the EDI Project Version within the Project Versions Pane (if the EDI Project has multiple Project Versions).

Step 3: Expand the Self Serve Menu Options drop-down menu and select G-Rules.

Step 4: Select the EDI View option within the drop-down menu at the top left of the G-Rules Management Dashboard.

Related Assets

GenRocket - Test Data Management

Download Literature

View Literature
GenRocket - Test Data Management

View Blog

Read More
GenRocket - Test Data Management

How can we help
you today?

Request a Demo

See how GenRocket can solve your toughest test data challenge with quality synthetic data by-design and on-demand