Business Rules applied to a DDS File > process_tkts > Reformat01

Use Case Description

Use a Corticon decision service to transform/reformat input data to output data by applying business rules.

Transformations include:

  1. Determining the distribution channel
  2. Determining the country code (using various lookup tables if not supplied on input)
  3. Determining the correct position for the decimal point based on currency code


Distribution Channel

  • If the agent number is an ARC agent, then AAGT.
  • If the agent number is not an ARC agent, then BAGT.
  • If there is not agent number present, then
    • If the distribution channel on the input is IND, AAGT or BAGT, set the output value to IND.
    • If the distribution channel on the input is "DIR", "APT", “WEB","BUS","CONS","CTO","GSO","RES","VEND","WHOL","TEST","UNKW","END","SSM","PEND","MULT","INT" – pass the value to the output.
    • Otherwise use “DIR”.




Country Code

  • If a country code is present on the input, accept as is.
  • If a country code is not present on the input, then lookup country code using the agency number in the Agent-to-Country lookup file.
  • If no agency number present, then lookup the country code using Origin Airport code in the Airport-to-Country lookup file.


Determine Country Code

Use Agency Code to lookup Country Code

Use Airport Code to look up Country code


Financial Amount columns

This applies to the Fare Amount, Tax Amount, Commission Amount, Document Amount, Quarterly Surcharge, Yearly Surcharge, Supplemental Fare Amount and Net Fare Amount, Penalty Fee Amount.

  • If no value in the field, move zero (0) to the output field.
  • If the value is zero, move zero to the output.
  • Otherwise, check if input value contains a decimal point.
    • If there is a decimal point, then pass value as-is to output.
    • If there is no decimal point, use the 4th byte of the currency column, on the input, to determine where to place the decimal point. For example, “USD2” means that the last 2 places of the amount column are the decimal portion.


Currency Type Flag

Set the flag to 1 if any of the Amount columns have a valid numeric value.

Determine the amount field


Determine Decimal Position from currency code.



Decision Rule Flow


Generalizing the Amount Rules to handle all amount fields (without duplicating the rule sheets

Once all the amount attributes are added, the vocabulary looks like this:

It defines the inputs, outputs and any temporary attributes:


In order to avoid having to copy the amount rule sheet for each different attribute we can make use of Corticon’s ability to write rules about  collections.

So we can convert the nine (or any number of ) separate amount fields into instances of an Amount collection (using name value pairs)

The vocab for this would look like:


And this would be attached to the Transaction using a one to many association:

Data Model

Then we can create instances of AMOUNT using these expressions:

The rule flow for this part might look like:


Now we can us a generic rule sheet to process any instance of AMOUNT with the same rules:

After the rule sheet has processed all the AMOUNTs we can map the output back into the separate transaction fields for return to the calling application:

So now a full test case might look like this:

And if desired the rules that applied to any individual amount can be inspected:



Database Access Using EDC

Lookup Table Definitions

Agency Code Lookup Table

Agency Table Lookup Rules

Airport Code Lookup Table

Airport Code Lookup Rules




Test Cases

Distribution Channel


Country Code




Publishing the Decision to the Corticon server


There are two versions of the decision service:

  1. ARCPOC_DB uses EDC to retrieve agency or airport lookup information from a database in order to determine the country code
  2. ARCPOC_NODB defines the lookup tables in rule sheets.

NOTE: the rules that access the lookup tables are the same in both cases

Invoking the decision as a web service using Studio as the client

Monitoring the Decision

Performance Monitoring

Invoking the decision as a web service using SOAP UI as the client

Generate WSDL

Transaction SOAP Request

Create a new SOAP UI Project and import the WSDL

SOAP Request in SOAP UI

Soap Response




Invoke Corticon using REST

Export the Corticon request from the tester

Make sure you have the following property set to JSON in your


It will look like this

This can be used in SOAP UI to invoke Corticon using REST


Make sure to create a header with dsname = decision service name

This can be added to control how Corticon executes:

Other parameters


REST Response




Integration with Ab Initio

Need information from ARC for this section


Download PDF version.