🔍

GCX015R - Thematically Grouped Rules

A dual-persona matrix designed specifically for Development scoping. Requirements are hierarchically structured by Epic → Module Program → Business Theme.

Epic Core: GCX015R Processing

Module Tracker: GCX015

385 Validations & Rules
Module Objective: No description provided from architecture analysis.
⚙️ General Logic & Formats 36 logic blocks
R-GCX015-cbl-00010 8:Validate Required Segments
Validation Rules
📊 Business Logic Narrative
When the process '8:Validate Required Segments' is invoked, and assuming that message segments have been processed, when checking for required segments, the desired outcome is that the system should log error if m10 segment not found, or if p4 segment not found, or if k3 segment not found and create default k3 segment.
💻 Technical Criteria
Given Message segments have been processed
When Checking for required segments
Then The system should log error if M10 segment not found, or if P4 segment not found, or if K3 segment not found and create default K3 segment
R-GCX015-cbl-00048 Calculate Message Entries Count
Computation Rules
📊 Business Logic Narrative
When the process 'Calculate Message Entries Count' is invoked, and assuming that message is successfully retrieved from queue, when message data length is available, the desired outcome is that maximum message entries count is calculated by subtracting header and unused data length from total data length and dividing by single entry length.
💻 Technical Criteria
Given Message is successfully retrieved from queue
When Message data length is available
Then Maximum message entries count is calculated by subtracting header and unused data length from total data length and dividing by single entry length
R-GCX015-cbl-00051 Extract M10 Segment Data
Process Rules
📊 Business Logic Narrative
When the process 'Extract M10 Segment Data' is invoked, and assuming that a message is being processed and contains message segments, when an m10 segment is found in the message, the desired outcome is that the system extracts the m10 segment data and marks m10 segment as found.
💻 Technical Criteria
Given A message is being processed and contains message segments
When An M10 segment is found in the message
Then The system extracts the M10 segment data and marks M10 segment as found
R-GCX015-cbl-00052 Reference Number Prefix = 'TRAIN'?
Decision Rules
📊 Business Logic Narrative
When the process 'Reference Number Prefix = 'TRAIN'?' is invoked, and assuming that an m10 segment has been extracted from the message, when the reference number (m10-12-ref-num) starts with 'train', the desired outcome is that the system sets the message type as train for processing.
💻 Technical Criteria
Given An M10 segment has been extracted from the message
When The reference number (M10-12-REF-NUM) starts with 'TRAIN'
Then The system sets the message type as TRAIN for processing
R-GCX015-cbl-00267 Extract Reference Number from M10-12
Process Rules
📊 Business Logic Narrative
When the process 'Extract Reference Number from M10-12' is invoked, and assuming that an m10 segment is received for processing, when the system processes the m10 segment, the desired outcome is that the reference number is extracted from m10-12-ref-num field and stored in work-m10-12 for further processing.
💻 Technical Criteria
Given An M10 segment is received for processing
When The system processes the M10 segment
Then The reference number is extracted from M10-12-REF-NUM field and stored in WORK-M10-12 for further processing
R-GCX015-cbl-00069 Process M10 Segment
Process Rules
📊 Business Logic Narrative
When the process 'Process M10 Segment' is invoked, and assuming that a message segment with table id 'm10' is encountered during message processing, when the system processes the m10 segment, the desired outcome is that the m10 segment data is stored and the m10 segment found flag is set to true.
💻 Technical Criteria
Given A message segment with table ID 'M10' is encountered during message processing
When The system processes the M10 segment
Then The M10 segment data is stored and the M10 segment found flag is set to true
R-GCX015-cbl-00070 Process P4 Segment
Process Rules
📊 Business Logic Narrative
When the process 'Process P4 Segment' is invoked, and assuming that a message segment with table id 'p4 ' is encountered during message processing, when the system processes the p4 segment, the desired outcome is that the p4 segment data is stored and the p4 segment found flag is set to true.
💻 Technical Criteria
Given A message segment with table ID 'P4 ' is encountered during message processing
When The system processes the P4 segment
Then The P4 segment data is stored and the P4 segment found flag is set to true
R-GCX015-cbl-00072 Look Up Error Message Text
Action Rules
📊 Business Logic Narrative
When the process 'Look Up Error Message Text' is invoked, and assuming that a k1 segment is being processed with a message number, when the system looks up the message number in the ms table with prefix 'a', the desired outcome is that if found, the english text from the table is used; if not found, the free-form message from k1 segment is used.
💻 Technical Criteria
Given A K1 segment is being processed with a message number
When The system looks up the message number in the MS table with prefix 'A'
Then If found, the English text from the table is used; if not found, the free-form message from K1 segment is used
R-GCX015-cbl-00074 Process K3 Segment
Process Rules
📊 Business Logic Narrative
When the process 'Process K3 Segment' is invoked, and assuming that a message segment with table id 'k3 ' is encountered during message processing, when the system processes the k3 segment, the desired outcome is that the k3 segment data is stored and the k3 segment found flag is set to true.
💻 Technical Criteria
Given A message segment with table ID 'K3 ' is encountered during message processing
When The system processes the K3 segment
Then The K3 segment data is stored and the K3 segment found flag is set to true
R-GCX015-cbl-00276 Start K1 Segment Processing
Process Rules
📊 Business Logic Narrative
When the process 'Start K1 Segment Processing' is invoked, and assuming that a k1 segment is being processed, when the system processes the k1 segment, the desired outcome is that the message number is extracted from the k1 segment and stored for further processing.
💻 Technical Criteria
Given A K1 segment is being processed
When The system processes the K1 segment
Then The message number is extracted from the K1 segment and stored for further processing
R-GCX015-cbl-00277 Build MS Table Key with Message Number
Process Rules
📊 Business Logic Narrative
When the process 'Build MS Table Key with Message Number' is invoked, and assuming that a k1 message number has been extracted, when the system builds the ms table lookup key, the desired outcome is that the key is constructed with table id 'ms', prefix 'a', and the k1 message number.
💻 Technical Criteria
Given A K1 message number has been extracted
When The system builds the MS table lookup key
Then The key is constructed with table ID 'MS', prefix 'A', and the K1 message number
R-GCX015-cbl-00278 Look Up Error Message Text in MS Table
Action Rules
📊 Business Logic Narrative
When the process 'Look Up Error Message Text in MS Table' is invoked, and assuming that an ms table key has been constructed with message number, when the system performs a table lookup, the desired outcome is that the system retrieves the corresponding english error message text from the ms table.
💻 Technical Criteria
Given An MS table key has been constructed with message number
When The system performs a table lookup
Then The system retrieves the corresponding English error message text from the MS table
R-GCX015-cbl-00279 Message Text Found?
Decision Rules
📊 Business Logic Narrative
When the process 'Message Text Found?' is invoked, and assuming that an ms table lookup has been performed for error message text, when the lookup return flag equals '0', the desired outcome is that use the ms table english text as the error message.
💻 Technical Criteria
Given An MS table lookup has been performed for error message text
When The lookup return flag equals '0'
Then Use the MS table English text as the error message
R-GCX015-cbl-00280 Use K1 Free Form Message
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Use K1 Free Form Message', assuming that an ms table lookup has been performed for error message text, when the lookup return flag does not equal '0', the desired outcome is that use the k1 free form message as the error message text.
💻 Technical Criteria
EXCLUDING An MS table lookup has been performed for error message text
When The lookup return flag does not equal '0'
Then Use the K1 free form message as the error message text
R-GCX015-cbl-00282 Store Message in K1 Message Array
Process Rules
📊 Business Logic Narrative
When the process 'Store Message in K1 Message Array' is invoked, and assuming that an error message has been formatted for display, when the system stores the message for logging, the desired outcome is that the formatted log message is stored in the k1 message array and the counter is incremented.
💻 Technical Criteria
Given An error message has been formatted for display
When The system stores the message for logging
Then The formatted log message is stored in the K1 message array and the counter is incremented
R-GCX015-cbl-00283 Message Number = 242?
Decision Rules
📊 Business Logic Narrative
When the process 'Message Number = 242?' is invoked, and assuming that a k1 message has been processed, when the k1 message number equals '242', the desired outcome is that the system initiates special c4 code processing.
💻 Technical Criteria
Given A K1 message has been processed
When The K1 message number equals '242'
Then The system initiates special C4 code processing
R-GCX015-cbl-00288 Clear C4 Code Holder
Process Rules
📊 Business Logic Narrative
When the process 'Clear C4 Code Holder' is invoked, and assuming that c4 code processing has been completed for message 242, when the system clears the c4 code holder, the desired outcome is that the c4 code holder is set to spaces to prevent reuse in subsequent processing.
💻 Technical Criteria
Given C4 code processing has been completed for message 242
When The system clears the C4 code holder
Then The C4 code holder is set to spaces to prevent reuse in subsequent processing
R-GCX015-cbl-00077 Test Train Message TRAINCPRSTESTTRAIN0000000000
Decision Rules
📊 Business Logic Narrative
When the process 'Test Train Message TRAINCPRSTESTTRAIN0000000000' is invoked, and assuming that a message queue entry contains an m10 segment with table id 'm10', when the m10 table reference number equals 'traincprstesttrain0000000000', the desired outcome is that the system performs special check processing, clears the message array, sets end processing flag, and terminates current message processing.
💻 Technical Criteria
Given A message queue entry contains an M10 segment with table ID 'M10'
When The M10 table reference number equals 'TRAINCPRSTESTTRAIN0000000000'
Then The system performs special check processing, clears the message array, sets end processing flag, and terminates current message processing
R-GCX015-cbl-00122 Set US-TRAIN Flag
Action Rules
📊 Business Logic Narrative
When the process 'Set US-TRAIN Flag' is invoked, and assuming that the entity being processed is identified as a train, when the entity type flag needs to be set for logging, the desired outcome is that the system sets the gcx105-us-train flag to true.
💻 Technical Criteria
Given The entity being processed is identified as a train
When The entity type flag needs to be set for logging
Then The system sets the GCX105-US-TRAIN flag to true
R-GCX015-cbl-00130 Process Each K1 Error Message
Process Rules
📊 Business Logic Narrative
When the process 'Process Each K1 Error Message' is invoked, and assuming that k1 error messages are present in the hold-k1-message table, when error messages need to be processed for logging, the desired outcome is that the system performs a501-send-log for each k1-cnt from 1 by 1 until hold-k1-message is spaces or k1-cnt exceeds 999.
💻 Technical Criteria
Given K1 error messages are present in the HOLD-K1-MESSAGE table
When Error messages need to be processed for logging
Then The system performs A501-SEND-LOG for each K1-CNT from 1 by 1 until HOLD-K1-MESSAGE is spaces or K1-CNT exceeds 999
R-GCX015-cbl-00133 K1 Segment Detected
Process Rules
📊 Business Logic Narrative
When the process 'K1 Segment Detected' is invoked, and assuming that a k1 segment is detected in the message processing loop, when the system processes the k1 segment entry, the desired outcome is that the k1 segment data should be extracted and prepared for message lookup processing.
💻 Technical Criteria
Given A K1 segment is detected in the message processing loop
When The system processes the K1 segment entry
Then The K1 segment data should be extracted and prepared for message lookup processing
R-GCX015-cbl-00134 Extract Message Number from K1-02-MSG-NUMBER
Process Rules
📊 Business Logic Narrative
When the process 'Extract Message Number from K1-02-MSG-NUMBER' is invoked, and assuming that a k1 segment contains message data in mqs-table-entry format, when the system processes the k1 segment, the desired outcome is that the message number should be extracted from k1-02-msg-number field.
💻 Technical Criteria
Given A K1 segment contains message data in MQS-TABLE-ENTRY format
When The system processes the K1 segment
Then The message number should be extracted from K1-02-MSG-NUMBER field
R-GCX015-cbl-00135 Build Table Key: 'A' + Message Number
Computation Rules
📊 Business Logic Narrative
When the process 'Build Table Key: 'A' + Message Number' is invoked, and assuming that a message number has been extracted from k1-02-msg-number, when the system needs to look up the message in the ms table, the desired outcome is that the table key should be constructed by concatenating 'a' with the message number and stored in gcstbrt-key-seqid.
💻 Technical Criteria
Given A message number has been extracted from K1-02-MSG-NUMBER
When The system needs to look up the message in the MS table
Then The table key should be constructed by concatenating 'A' with the message number and stored in GCSTBRT-KEY-SEQID
R-GCX015-cbl-00137 Message Found in Table?
Decision Rules
📊 Business Logic Narrative
When the process 'Message Found in Table?' is invoked, and assuming that a table lookup has been performed for the message number, when the lookup return flag is evaluated, the desired outcome is that if return flag equals '0' then use english text from table, otherwise use free-form message from k1 segment.
💻 Technical Criteria
Given A table lookup has been performed for the message number
When The lookup return flag is evaluated
Then If return flag equals '0' then use English text from table, otherwise use free-form message from K1 segment
R-GCX015-cbl-00142 Message Number = '242'?
Decision Rules
📊 Business Logic Narrative
When the process 'Message Number = '242'?' is invoked, and assuming that a k1 message has been processed and stored, when the system checks for special message processing requirements, the desired outcome is that if k1-02-msg-number equals '242' then proceed with c4 code processing, otherwise increment k1 counter and end processing.
💻 Technical Criteria
Given A K1 message has been processed and stored
When The system checks for special message processing requirements
Then If K1-02-MSG-NUMBER equals '242' then proceed with C4 code processing, otherwise increment K1 counter and end processing
R-GCX015-cbl-00147 Increment K1 Counter
Process Rules
📊 Business Logic Narrative
When the process 'Increment K1 Counter' is invoked, and assuming that k1 message processing has been completed, when the system finalizes the k1 processing, the desired outcome is that the k1-cnt counter should be incremented by 1.
💻 Technical Criteria
Given K1 message processing has been completed
When The system finalizes the K1 processing
Then The K1-CNT counter should be incremented by 1
R-GCX015-cbl-00222 Send Train Arrival Message to Queue
Action Rules
📊 Business Logic Narrative
When the process 'Send Train Arrival Message to Queue' is invoked, and assuming that a complete train arrival message has been constructed, when the system sends the message for processing, the desired outcome is that the message is transmitted to the designated message queue using the writmsgl service.
💻 Technical Criteria
Given A complete train arrival message has been constructed
When The system sends the message for processing
Then The message is transmitted to the designated message queue using the WRITMSGL service
R-GCX015-cbl-00370 Set To User to OM01247
Definitional Rules
📊 Business Logic Narrative
When the process 'Set To User to OM01247' is invoked, and assuming that a merlin message sender has been configured, when setting up the message recipient, the desired outcome is that the to user code should be set to om01247.
💻 Technical Criteria
Given A Merlin message sender has been configured
When Setting up the message recipient
Then The to user code should be set to OM01247
R-GCX015-cbl-00371 Set Subject to Merlin Subject
Process Rules
📊 Business Logic Narrative
When the process 'Set Subject to Merlin Subject' is invoked, and assuming that a merlin message has been configured with sender and recipient, when setting the message subject, the desired outcome is that the subject should be set to the predefined merlin subject content.
💻 Technical Criteria
Given A Merlin message has been configured with sender and recipient
When Setting the message subject
Then The subject should be set to the predefined Merlin subject content
R-GCX015-cbl-00377 Initialize Secondary Recipients
Process Rules
📊 Business Logic Narrative
When the process 'Initialize Secondary Recipients' is invoked, and assuming that a secondary merlin send process is initiated, when the system prepares to set up alternative recipients, the desired outcome is that all recipient user code fields are cleared to spaces.
💻 Technical Criteria
Given A secondary Merlin send process is initiated
When The system prepares to set up alternative recipients
Then All recipient user code fields are cleared to spaces
R-GCX015-cbl-00378 Set Primary Merlin ID as From User
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Primary Merlin ID as From User' is invoked, and assuming that secondary merlin send is being configured, when the from user needs to be established, the desired outcome is that the primary merlin id 'om01247' is set as the from user code.
💻 Technical Criteria
Given Secondary Merlin send is being configured
When The from user needs to be established
Then The primary Merlin ID 'OM01247' is set as the from user code
R-GCX015-cbl-00383 Handle From User Not Found Error
Validation Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Handle From User Not Found Error', assuming that secondary merlin send has been executed, when the send fails due to invalid from user (emi-from-not-found), the desired outcome is that system abend is triggered with error message 'emi - invalid merlin from'.
💻 Technical Criteria
EXCLUDING Secondary Merlin send has been executed
When The send fails due to invalid from user (EMI-FROM-NOT-FOUND)
Then System abend is triggered with error message 'EMI - INVALID MERLIN FROM'
R-GCX015-cbl-00384 Handle To/Copy User Not Found Error
Validation Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Handle To/Copy User Not Found Error', assuming that secondary merlin send has been executed, when the send fails due to invalid recipient or copy user (emi-to-or-copy-not-found), the desired outcome is that system abend is triggered with error message 'emi - invalid merlin to or copy'.
💻 Technical Criteria
EXCLUDING Secondary Merlin send has been executed
When The send fails due to invalid recipient or copy user (EMI-TO-OR-COPY-NOT-FOUND)
Then System abend is triggered with error message 'EMI - INVALID MERLIN TO OR COPY'
R-GCX015-cbl-00385 Handle Invalid Filename Error
Validation Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Handle Invalid Filename Error', assuming that secondary merlin send has been executed, when the send fails due to invalid filename (emi-filename-invalid), the desired outcome is that system abend is triggered with error message 'emi - invalid merlin filename'.
💻 Technical Criteria
EXCLUDING Secondary Merlin send has been executed
When The send fails due to invalid filename (EMI-FILENAME-INVALID)
Then System abend is triggered with error message 'EMI - INVALID MERLIN FILENAME'
R-GCX015-cbl-00252 Close Message Queue Handle
Process Rules
📊 Business Logic Narrative
When the process 'Close Message Queue Handle' is invoked, and assuming that message processing is complete and message queue handle exists, when system initiates message queue closure, the desired outcome is that message queue handle is closed and queue resources are released.
💻 Technical Criteria
Given Message processing is complete and message queue handle exists
When System initiates message queue closure
Then Message queue handle is closed and queue resources are released
R-GCX015-cbl-00260 Set End Processing Flag
Process Rules
📊 Business Logic Narrative
When the process 'Set End Processing Flag' is invoked, and assuming that a special test message has been processed and the message array has been cleared, when the test message handling is complete, the desired outcome is that the system should set ws-end-found to true to indicate end of processing.
💻 Technical Criteria
Given A special test message has been processed and the message array has been cleared
When The test message handling is complete
Then The system should set WS-END-FOUND to true to indicate end of processing

🏷️ CCN & Waybill Identification 3 logic blocks
R-GCX015-cbl-00008 15:Retrieve Cargo Records
Action Rules
📊 Business Logic Narrative
When the process '15:Retrieve Cargo Records' is invoked, and assuming that a message has been classified as cargo type, when retrieving cargo records using the cargo control number from m10 data, the desired outcome is that the system should call cargo i/o module with get function for cargo segment, and if not found, log error message indicating cargo control number was not found.
💻 Technical Criteria
Given A message has been classified as Cargo type
When Retrieving cargo records using the cargo control number from M10 data
Then The system should call cargo I/O module with GET function for cargo segment, and if not found, log error message indicating cargo control number was not found
R-GCX015-cbl-00151 Set US-CCN-KEY from Message Data
Process Rules
📊 Business Logic Narrative
When the process 'Set US-CCN-KEY from Message Data' is invoked, and assuming that the system has processed message data containing cargo identification information, when preparing to search for cargo records in the database, the desired outcome is that the cargo search key (gcusrt-us-ccn-key) should be set to the message data value (work-m10-12-data).
💻 Technical Criteria
Given The system has processed message data containing cargo identification information
When Preparing to search for cargo records in the database
Then The cargo search key (GCUSRT-US-CCN-KEY) should be set to the message data value (WORK-M10-12-DATA)
R-GCX015-cbl-00155 Add Error Message to Report
Process Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Add Error Message to Report', assuming that the cargo record was not found in the database, when handling the cargo record not found condition, the desired outcome is that an error message 'this us-ccn-key was not found: ' should be added to the report lines and the line count should be incremented by 1.
💻 Technical Criteria
EXCLUDING The cargo record was not found in the database
When Handling the cargo record not found condition
Then An error message 'THIS US-CCN-KEY WAS NOT FOUND: ' should be added to the report lines and the line count should be incremented by 1

💰 Bond & Financial Auth 14 logic blocks
R-GCX015-cbl-00030 Load Default Merlin ID
Definitional Rules
📊 Business Logic Narrative
When the process 'Load Default Merlin ID' is invoked, and assuming that administrative configuration retrieval failed, when default configuration is applied, the desired outcome is that merlin id is set to 'om01247' as the default value.
💻 Technical Criteria
Given Administrative configuration retrieval failed
When Default configuration is applied
Then Merlin ID is set to 'OM01247' as the default value
R-GCX015-cbl-00043 Check Message Backout Count
Decision Rules
📊 Business Logic Narrative
When the process 'Check Message Backout Count' is invoked, and assuming that message is successfully retrieved and has valid length, when message backout count is evaluated, the desired outcome is that message processing eligibility is determined based on backout count value.
💻 Technical Criteria
Given Message is successfully retrieved and has valid length
When Message backout count is evaluated
Then Message processing eligibility is determined based on backout count value
R-GCX015-cbl-00075 End of Message?
Decision Rules
📊 Business Logic Narrative
When the process 'End of Message?' is invoked, and assuming that message segments are being processed sequentially, when a segment with table id containing only spaces or low-values is encountered, the desired outcome is that the end found flag is set to true and segment processing terminates.
💻 Technical Criteria
Given Message segments are being processed sequentially
When A segment with table ID containing only spaces or low-values is encountered
Then The end found flag is set to true and segment processing terminates
R-GCX015-cbl-00284 C4 Code Available?
Validation Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'C4 Code Available?', assuming that message number 242 requires c4 code processing, when the c4 code holder is not spaces and not low-values, the desired outcome is that the system proceeds with c4 code message construction.
💻 Technical Criteria
EXCLUDING Message number 242 requires C4 code processing
When The C4 code holder is not spaces and not low-values
Then The system proceeds with C4 code message construction
R-GCX015-cbl-00285 Build C4 Code Message
Process Rules
📊 Business Logic Narrative
When the process 'Build C4 Code Message' is invoked, and assuming that c4 code data is available for message 242, when the system builds the c4 code message, the desired outcome is that a message is constructed with format 'c4 code=' followed by the c4 code value.
💻 Technical Criteria
Given C4 code data is available for message 242
When The system builds the C4 code message
Then A message is constructed with format 'C4 CODE=' followed by the C4 code value
R-GCX015-cbl-00143 C4 Code Available?
Validation Rules
📊 Business Logic Narrative
When the process 'C4 Code Available?' is invoked, and assuming that message number '242' has been detected, when the system checks for c4 code availability, the desired outcome is that if ws-hold-n1009 is not spaces and not low-values then proceed with c4 code message building, otherwise skip c4 processing.
💻 Technical Criteria
Given Message number '242' has been detected
When The system checks for C4 code availability
Then If WS-HOLD-N1009 is not spaces and not low-values then proceed with C4 code message building, otherwise skip C4 processing
R-GCX015-cbl-00144 Build C4 Code Message
Computation Rules
📊 Business Logic Narrative
When the process 'Build C4 Code Message' is invoked, and assuming that c4 code is available in ws-hold-n1009 for message 242, when the system builds the c4 code message, the desired outcome is that the message should be constructed by concatenating 'c4 code=' with ws-hold-n1009 value and stored in work-message.
💻 Technical Criteria
Given C4 code is available in WS-HOLD-N1009 for message 242
When The system builds the C4 code message
Then The message should be constructed by concatenating 'C4 CODE=' with WS-HOLD-N1009 value and stored in WORK-MESSAGE
R-GCX015-cbl-00297 Set Current Status from Message
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set Current Status from Message', assuming that a train record exists that is not deleted and not delete pending, when the message processing completes with a status update, the desired outcome is that the train current status is updated with the message status value.
💻 Technical Criteria
EXCLUDING A train record exists that is not deleted and not delete pending
When The message processing completes with a status update
Then The train current status is updated with the message status value
R-GCX015-cbl-00181 Set Up Customs Transaction Data
Action Rules
📊 Business Logic Narrative
When the process 'Set Up Customs Transaction Data' is invoked, and assuming that a train qualifies for aei processing with all validation criteria met, when the system sets up customs transaction data, the desired outcome is that the system must populate transaction code as 'gct1461e', security as high-values, customer code as 'a', and map train details to customs fields including train id, stations, consist number, date and time.
💻 Technical Criteria
Given A train qualifies for AEI processing with all validation criteria met
When The system sets up customs transaction data
Then The system must populate transaction code as 'GCT1461E', security as HIGH-VALUES, customer code as 'A', and map train details to customs fields including train ID, stations, consist number, date and time
R-GCX015-cbl-00314 Set Security Level to High
Policy Rules
📊 Business Logic Narrative
When the process 'Set Security Level to High' is invoked, and assuming that a customs transaction is being prepared for aei processing, when setting security parameters, the desired outcome is that the security level is set to high values (high-values).
💻 Technical Criteria
Given A customs transaction is being prepared for AEI processing
When Setting security parameters
Then The security level is set to high values (HIGH-VALUES)
R-GCX015-cbl-00319 Set Event Date from Train Data
Process Rules
📊 Business Logic Narrative
When the process 'Set Event Date from Train Data' is invoked, and assuming that a train record with estimated departure date (eda), when configuring customs transaction timing, the desired outcome is that the event date is set to the train's p402 eda value.
💻 Technical Criteria
Given A train record with estimated departure date (EDA)
When Configuring customs transaction timing
Then The event date is set to the train's P402 EDA value
R-GCX015-cbl-00320 Set Event Time from Train Data
Process Rules
📊 Business Logic Narrative
When the process 'Set Event Time from Train Data' is invoked, and assuming that a train record with estimated time of arrival (eta), when configuring customs transaction timing, the desired outcome is that the event time is set to the train's p405 eta value.
💻 Technical Criteria
Given A train record with estimated time of arrival (ETA)
When Configuring customs transaction timing
Then The event time is set to the train's P405 ETA value
R-GCX015-cbl-00219 Set Security Byte to High-Value
Policy Rules
📊 Business Logic Narrative
When the process 'Set Security Byte to High-Value' is invoked, and assuming that a train arrival transaction is being created, when the system sets the security configuration, the desired outcome is that the security byte is set to high-value to indicate maximum security level.
💻 Technical Criteria
Given A train arrival transaction is being created
When The system sets the security configuration
Then The security byte is set to high-value to indicate maximum security level
R-GCX015-cbl-00242 Set Administrative Recipients
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Administrative Recipients' is invoked, and assuming that primary merlin transmission processing is complete, when setting up administrative recipients for secondary transmission, the desired outcome is that clear existing recipient codes, set primary administrative recipient to gcstbrt-ad-dc-p-merlin-1 value, and set copy recipient to gcstbrt-ad-dc-p-merlin-5 value.
💻 Technical Criteria
Given Primary Merlin transmission processing is complete
When Setting up administrative recipients for secondary transmission
Then Clear existing recipient codes, set primary administrative recipient to GCSTBRT-AD-DC-P-MERLIN-1 value, and set copy recipient to GCSTBRT-AD-DC-P-MERLIN-5 value

📍 Routing, Border & Port 57 logic blocks
R-GCX015-cbl-00016 19:Check AEI Train Qualification
Decision Rules
📊 Business Logic Narrative
When the process '19:Check AEI Train Qualification' is invoked, and assuming that train status has been updated, when train has ack status and aei-send flag and enroute-not-reported flag and train id position 23 equals 't', the desired outcome is that the system should qualify train for aei processing and prepare customs transaction data.
💻 Technical Criteria
Given Train status has been updated
When Train has ACK status and AEI-SEND flag and ENROUTE-NOT-REPORTED flag and train ID position 23 equals 'T'
Then The system should qualify train for AEI processing and prepare customs transaction data
R-GCX015-cbl-00019 22:Send Terminal Status Messages
Action Rules
📊 Business Logic Narrative
When the process '22:Send Terminal Status Messages' is invoked, and assuming that train status processing is complete, when train has ack status and aei-send flag and enroute-reported flag, the desired outcome is that the system should send enroute message to aei merlin recipients.
💻 Technical Criteria
Given Train status processing is complete
When Train has ACK status and AEI-SEND flag and ENROUTE-REPORTED flag
Then The system should send enroute message to AEI Merlin recipients
R-GCX015-cbl-00022 26:Send Merlin Reports
Action Rules
📊 Business Logic Narrative
When the process '26:Send Merlin Reports' is invoked, and assuming that processing activities require reporting, when sending merlin reports, the desired outcome is that the system should send reports to primary recipients and copy to administrative recipients with appropriate error handling.
💻 Technical Criteria
Given Processing activities require reporting
When Sending Merlin reports
Then The system should send reports to primary recipients and copy to administrative recipients with appropriate error handling
R-GCX015-cbl-00037 Connect to MQ Manager
Action Rules
📊 Business Logic Narrative
When the process 'Connect to MQ Manager' is invoked, and assuming that system needs to process us customs messages from message queue, when connection to mq manager is attempted, the desired outcome is that if connection fails, system generates error message and terminates processing with mq connection failure.
💻 Technical Criteria
Given System needs to process US Customs messages from message queue
When Connection to MQ manager is attempted
Then If connection fails, system generates error message and terminates processing with MQ connection failure
R-GCX015-cbl-00281 Add Error Message to Report Lines
Process Rules
📊 Business Logic Narrative
When the process 'Add Error Message to Report Lines' is invoked, and assuming that an error message text has been selected (either from ms table or k1 free form), when the system adds the message to the report, the desired outcome is that the error message is added to the report lines and the line counter is incremented.
💻 Technical Criteria
Given An error message text has been selected (either from MS table or K1 free form)
When The system adds the message to the report
Then The error message is added to the report lines and the line counter is incremented
R-GCX015-cbl-00286 Add C4 Code to Report Lines
Process Rules
📊 Business Logic Narrative
When the process 'Add C4 Code to Report Lines' is invoked, and assuming that a c4 code message has been constructed, when the system adds the c4 message to the report, the desired outcome is that the c4 code message is added to the report lines and the line counter is incremented.
💻 Technical Criteria
Given A C4 code message has been constructed
When The system adds the C4 message to the report
Then The C4 code message is added to the report lines and the line counter is incremented
R-GCX015-cbl-00287 Store C4 Message in Array
Process Rules
📊 Business Logic Narrative
When the process 'Store C4 Message in Array' is invoked, and assuming that a c4 code message has been added to the report, when the system stores the c4 message for logging, the desired outcome is that the c4 code log message is stored in the k1 message array and the counter is incremented.
💻 Technical Criteria
Given A C4 code message has been added to the report
When The system stores the C4 message for logging
Then The C4 code log message is stored in the K1 message array and the counter is incremented
R-GCX015-cbl-00112 Include Merlin Error Report with Message Details
Process Rules
📊 Business Logic Narrative
When the process 'Include Merlin Error Report with Message Details' is invoked, and assuming that error notification recipients are configured, when preparing error message content for transmission, the desired outcome is that the system includes the merlin subject as the message subject and the complete merlin error report as the message content.
💻 Technical Criteria
Given Error notification recipients are configured
When Preparing error message content for transmission
Then The system includes the Merlin subject as the message subject and the complete Merlin error report as the message content
R-GCX015-cbl-00113 Call EMCSEND2 for Primary Notification
Action Rules
📊 Business Logic Narrative
When the process 'Call EMCSEND2 for Primary Notification' is invoked, and assuming that error message content is prepared with primary recipients configured, when transmitting the primary error notification, the desired outcome is that the system calls emcsend2 service with sender, destination filename, recipients, subject, and error report content.
💻 Technical Criteria
Given Error message content is prepared with primary recipients configured
When Transmitting the primary error notification
Then The system calls EMCSEND2 service with sender, destination filename, recipients, subject, and error report content
R-GCX015-cbl-00138 Use English Text from GCSTBRT-MS-ENG-TEXT
Process Rules
📊 Business Logic Narrative
When the process 'Use English Text from GCSTBRT-MS-ENG-TEXT' is invoked, and assuming that the table lookup was successful with return flag '0', when the system processes the message text, the desired outcome is that the english text from gcstbrt-ms-eng-text should be moved to both report lines and work message fields.
💻 Technical Criteria
Given The table lookup was successful with return flag '0'
When The system processes the message text
Then The English text from GCSTBRT-MS-ENG-TEXT should be moved to both report lines and work message fields
R-GCX015-cbl-00139 Use Free-Form Message from K1-02-FREE-FORM-MESSAGE
Process Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Use Free-Form Message from K1-02-FREE-FORM-MESSAGE', assuming that the table lookup failed with return flag not equal to '0', when the system processes the message text, the desired outcome is that the free-form message from k1-02-free-form-message should be moved to both report lines and work message fields.
💻 Technical Criteria
EXCLUDING The table lookup failed with return flag not equal to '0'
When The system processes the message text
Then The free-form message from K1-02-FREE-FORM-MESSAGE should be moved to both report lines and work message fields
R-GCX015-cbl-00140 Add Message to Report Lines
Process Rules
📊 Business Logic Narrative
When the process 'Add Message to Report Lines' is invoked, and assuming that message text has been determined from either table lookup or free-form source, when the system adds the message to the report, the desired outcome is that the message should be added to mrln-lines at the current line count position and the line counter should be incremented by 1.
💻 Technical Criteria
Given Message text has been determined from either table lookup or free-form source
When The system adds the message to the report
Then The message should be added to MRLN-LINES at the current line count position and the line counter should be incremented by 1
R-GCX015-cbl-00145 Add C4 Code to Report
Process Rules
📊 Business Logic Narrative
When the process 'Add C4 Code to Report' is invoked, and assuming that a c4 code message has been constructed, when the system adds the c4 message to the report, the desired outcome is that the c4 message should be moved to mrln-lines at the current line count position and the line counter should be incremented by 1.
💻 Technical Criteria
Given A C4 code message has been constructed
When The system adds the C4 message to the report
Then The C4 message should be moved to MRLN-LINES at the current line count position and the line counter should be incremented by 1
R-GCX015-cbl-00146 Store C4 Message in Array
Process Rules
📊 Business Logic Narrative
When the process 'Store C4 Message in Array' is invoked, and assuming that a c4 code message has been added to the report, when the system stores the c4 message for logging, the desired outcome is that the work log message should be moved to hold-k1-message array at the current k1-cnt position, k1-cnt should be incremented, and ws-hold-n1009 should be cleared to spaces.
💻 Technical Criteria
Given A C4 code message has been added to the report
When The system stores the C4 message for logging
Then The work log message should be moved to HOLD-K1-MESSAGE array at the current K1-CNT position, K1-CNT should be incremented, and WS-HOLD-N1009 should be cleared to spaces
R-GCX015-cbl-00164 Log Train ID Not Found Error
Process Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Log Train ID Not Found Error', assuming that a train record lookup has failed, when the train id is not found in the database, the desired outcome is that the system should move the message 'this us-train-id was not found: ' to the error report line and increment the line counter.
💻 Technical Criteria
EXCLUDING A train record lookup has failed
When The train ID is not found in the database
Then The system should move the message 'THIS US-TRAIN-ID WAS NOT FOUND: ' to the error report line and increment the line counter
R-GCX015-cbl-00179 Train Enroute Not Yet Reported?
Validation Rules
📊 Business Logic Narrative
When the process 'Train Enroute Not Yet Reported?' is invoked, and assuming that a train with ack status and aei send configuration enabled, when the system checks if the train's enroute status has been reported, the desired outcome is that the train must have enroute-not-reported status to qualify for customs transaction processing.
💻 Technical Criteria
Given A train with ACK status and AEI send configuration enabled
When The system checks if the train's enroute status has been reported
Then The train must have ENROUTE-NOT-REPORTED status to qualify for customs transaction processing
R-GCX015-cbl-00180 Train ID Suffix = 'T'?
Validation Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Train ID Suffix = 'T'?', assuming that a train with ack status, aei send enabled, and enroute not reported, when the system examines the train id suffix at position 23, the desired outcome is that the train id must end with 't' to qualify for full aei customs transaction processing.
💻 Technical Criteria
EXCLUDING A train with ACK status, AEI send enabled, and enroute not reported
When The system examines the train ID suffix at position 23
Then The train ID must end with 'T' to qualify for full AEI customs transaction processing
R-GCX015-cbl-00184 Send AEI Status Message Only
Action Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Send AEI Status Message Only', assuming that a train has aei-send configuration enabled but does not meet all qualification criteria for customs processing, when the system processes aei status messaging, the desired outcome is that the system must retrieve aei merlin id, format status message with train id and current status, and send via merlin messaging system.
💻 Technical Criteria
EXCLUDING A train has AEI-SEND configuration enabled but does not meet all qualification criteria for customs processing
When The system processes AEI status messaging
Then The system must retrieve AEI Merlin ID, format status message with train ID and current status, and send via Merlin messaging system
R-GCX015-cbl-00185 Send AEI Status Message Only
Action Rules
📊 Business Logic Narrative
When the process 'Send AEI Status Message Only' is invoked, and assuming that a train has ack status, aei send enabled, and enroute already reported, when the system processes terminal enroute notifications, the desired outcome is that the system must retrieve aei merlin id, format enroute message with train id, and send notification via merlin messaging system.
💻 Technical Criteria
Given A train has ACK status, AEI send enabled, and enroute already reported
When The system processes terminal enroute notifications
Then The system must retrieve AEI Merlin ID, format enroute message with train ID, and send notification via Merlin messaging system
R-GCX015-cbl-00312 Train Qualifies for AEI?
Decision Rules
📊 Business Logic Narrative
When the process 'Train Qualifies for AEI?' is invoked, and assuming that a train record exists with status, aei send flag, enroute reporting status, and train identifier, when the system evaluates aei processing eligibility, the desired outcome is that the train qualifies for aei processing if it has ack status and aei send flag is enabled and enroute is not yet reported and train identifier ends with 't'.
💻 Technical Criteria
Given A train record exists with status, AEI send flag, enroute reporting status, and train identifier
When The system evaluates AEI processing eligibility
Then The train qualifies for AEI processing if it has ACK status AND AEI send flag is enabled AND enroute is not yet reported AND train identifier ends with 'T'
R-GCX015-cbl-00313 Set Transaction Code to GCT1461E
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Transaction Code to GCT1461E' is invoked, and assuming that a train qualifies for aei processing, when setting up customs transaction data, the desired outcome is that the customs transaction code is set to 'gct1461e'.
💻 Technical Criteria
Given A train qualifies for AEI processing
When Setting up customs transaction data
Then The customs transaction code is set to 'GCT1461E'
R-GCX015-cbl-00315 Set Customs Code to 'A'
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Customs Code to 'A'' is invoked, and assuming that a customs transaction is being configured, when setting the customs processing code, the desired outcome is that the customs code is set to 'a'.
💻 Technical Criteria
Given A customs transaction is being configured
When Setting the customs processing code
Then The customs code is set to 'A'
R-GCX015-cbl-00316 Copy Train ID to Customs Train ID
Process Rules
📊 Business Logic Narrative
When the process 'Copy Train ID to Customs Train ID' is invoked, and assuming that a train record with a valid train identifier, when building the customs transaction, the desired outcome is that the train identifier is copied to the customs train id field.
💻 Technical Criteria
Given A train record with a valid train identifier
When Building the customs transaction
Then The train identifier is copied to the customs train ID field
R-GCX015-cbl-00317 Set Station Information
Process Rules
📊 Business Logic Narrative
When the process 'Set Station Information' is invoked, and assuming that a train record with station routing information, when setting up customs transaction routing data, the desired outcome is that both origin and destination stations are set to the train's from station.
💻 Technical Criteria
Given A train record with station routing information
When Setting up customs transaction routing data
Then Both origin and destination stations are set to the train's from station
R-GCX015-cbl-00318 Copy Train Consist Number
Process Rules
📊 Business Logic Narrative
When the process 'Copy Train Consist Number' is invoked, and assuming that a train record with a consist number, when building customs transaction data, the desired outcome is that the train consist number is copied to the customs consist field.
💻 Technical Criteria
Given A train record with a consist number
When Building customs transaction data
Then The train consist number is copied to the customs consist field
R-GCX015-cbl-00330 Write Message to Queue
Action Rules
📊 Business Logic Narrative
When the process 'Write Message to Queue' is invoked, and assuming that a customs transaction ready for queue processing, when submitting the message to the queue, the desired outcome is that call writmsgl with send message code, customs transaction data, message length, and module name.
💻 Technical Criteria
Given A customs transaction ready for queue processing
When Submitting the message to the queue
Then Call WRITMSGL with send message code, customs transaction data, message length, and module name
R-GCX015-cbl-00331 Purge Transaction
Action Rules
📊 Business Logic Narrative
When the process 'Purge Transaction' is invoked, and assuming that a customs transaction has been successfully submitted, when completing the aei processing, the desired outcome is that call cims with purge operation to clean up the transaction.
💻 Technical Criteria
Given A customs transaction has been successfully submitted
When Completing the AEI processing
Then Call CIMS with purge operation to clean up the transaction
R-GCX015-cbl-00197 Get AEI Merlin Recipients
Action Rules
📊 Business Logic Narrative
When the process 'Get AEI Merlin Recipients' is invoked, and assuming that a train requires aei status notification and train has a port location in secx field, when system queries aei email database using the train's port location as the key, the desired outcome is that system retrieves list of email recipients associated with that port location.
💻 Technical Criteria
Given A train requires AEI status notification and train has a port location in SECX field
When System queries AEI email database using the train's port location as the key
Then System retrieves list of email recipients associated with that port location
R-GCX015-cbl-00332 Extract Port from Train Security Code
Computation Rules
📊 Business Logic Narrative
When the process 'Extract Port from Train Security Code' is invoked, and assuming that a train record with security code (secx) is available, when the system needs to determine the port for aei email lookup, the desired outcome is that the system extracts the first 4 characters of the security code as the port identifier.
💻 Technical Criteria
Given A train record with security code (SECX) is available
When The system needs to determine the port for AEI email lookup
Then The system extracts the first 4 characters of the security code as the port identifier
R-GCX015-cbl-00333 Set Record Type to CUSEMAIL
Process Rules
📊 Business Logic Narrative
When the process 'Set Record Type to CUSEMAIL' is invoked, and assuming that the system needs to query aei email database for distribution list, when setting up database query parameters, the desired outcome is that the system sets record type to 'cusemail' and uses extracted port as the record key.
💻 Technical Criteria
Given The system needs to query AEI email database for distribution list
When Setting up database query parameters
Then The system sets record type to 'CUSEMAIL' and uses extracted port as the record key
R-GCX015-cbl-00334 Call AEI Email Database Query
Action Rules
📊 Business Logic Narrative
When the process 'Call AEI Email Database Query' is invoked, and assuming that database query parameters are set with port and record type, when the system executes the aei email database query, the desired outcome is that the system calls aecwrktb program to retrieve email distribution information.
💻 Technical Criteria
Given Database query parameters are set with port and record type
When The system executes the AEI email database query
Then The system calls AECWRKTB program to retrieve email distribution information
R-GCX015-cbl-00338 Use Default Merlin ID as Recipient
Decision Rules
📊 Business Logic Narrative
When the process 'Use Default Merlin ID as Recipient' is invoked, and assuming that aei email database query returns no entry found status, when the specified port has no email distribution configuration, the desired outcome is that the system uses the default merlin id as both sender and recipient.
💻 Technical Criteria
Given AEI email database query returns no entry found status
When The specified port has no email distribution configuration
Then The system uses the default Merlin ID as both sender and recipient
R-GCX015-cbl-00362 Extract Train Port from Security Code
Computation Rules
📊 Business Logic Narrative
When the process 'Extract Train Port from Security Code' is invoked, and assuming that a train record with security code gcwtl-secx exists, when the system needs to identify the train port for email lookup, the desired outcome is that the train port is extracted from ws-train-secx and moved to the first 4 positions of record-key.
💻 Technical Criteria
Given a train record with security code GCWTL-SECX exists
When the system needs to identify the train port for email lookup
Then the train port is extracted from WS-TRAIN-SECX and moved to the first 4 positions of RECORD-KEY
R-GCX015-cbl-00364 Call AECWRKTB Database Function
Action Rules
📊 Business Logic Narrative
When the process 'Call AECWRKTB Database Function' is invoked, and assuming that database lookup parameters are configured with train port and cusemail record type, when the system executes the database query, the desired outcome is that aecwrktb is called with work area, return code, and db2 sql code parameters.
💻 Technical Criteria
Given database lookup parameters are configured with train port and CUSEMAIL record type
When the system executes the database query
Then AECWRKTB is called with work area, return code, and DB2 SQL code parameters
R-GCX015-cbl-00204 Check Terminal Status Conditions
Decision Rules
📊 Business Logic Narrative
When the process 'Check Terminal Status Conditions' is invoked, and assuming that a train record exists in the system, when the system evaluates terminal status message requirements, the desired outcome is that the train must have ack status and aei send qualification and enroute already reported status to proceed with terminal messaging.
💻 Technical Criteria
Given A train record exists in the system
When The system evaluates terminal status message requirements
Then The train must have ACK status AND AEI send qualification AND enroute already reported status to proceed with terminal messaging
R-GCX015-cbl-00207 Enroute Already Reported?
Validation Rules
📊 Business Logic Narrative
When the process 'Enroute Already Reported?' is invoked, and assuming that a train has ack status and aei send qualification, when the system checks the enroute reporting status, the desired outcome is that the train must have enroute already reported status to proceed with terminal status messaging.
💻 Technical Criteria
Given A train has ACK status and AEI send qualification
When The system checks the enroute reporting status
Then The train must have enroute already reported status to proceed with terminal status messaging
R-GCX015-cbl-00208 Get AEI Merlin Distribution List
Action Rules
📊 Business Logic Narrative
When the process 'Get AEI Merlin Distribution List' is invoked, and assuming that a train qualifies for terminal status messaging, when the system needs to determine message recipients, the desired outcome is that the system retrieves the aei merlin distribution list using the train's security port information, defaulting to standard recipients if no specific list is found.
💻 Technical Criteria
Given A train qualifies for terminal status messaging
When The system needs to determine message recipients
Then The system retrieves the AEI Merlin distribution list using the train's security port information, defaulting to standard recipients if no specific list is found
R-GCX015-cbl-00209 Format Enroute Status Message
Process Rules
📊 Business Logic Narrative
When the process 'Format Enroute Status Message' is invoked, and assuming that a train qualifies for terminal status messaging and distribution list is retrieved, when the system formats the enroute status message, the desired outcome is that the system creates a standardized enroute message format using the predefined enroute message template.
💻 Technical Criteria
Given A train qualifies for terminal status messaging and distribution list is retrieved
When The system formats the enroute status message
Then The system creates a standardized enroute message format using the predefined enroute message template
R-GCX015-cbl-00210 Set Train ID in Message
Process Rules
📊 Business Logic Narrative
When the process 'Set Train ID in Message' is invoked, and assuming that an enroute status message is formatted, when the system assigns train identification to the message, the desired outcome is that the system sets the train's customer train id as the subject identifier in the enroute status message.
💻 Technical Criteria
Given An enroute status message is formatted
When The system assigns train identification to the message
Then The system sets the train's customer train ID as the subject identifier in the enroute status message
R-GCX015-cbl-00211 Send Status Message to Terminal Systems
Action Rules
📊 Business Logic Narrative
When the process 'Send Status Message to Terminal Systems' is invoked, and assuming that an enroute status message is formatted with train id and distribution list is available, when the system transmits the terminal status message, the desired outcome is that the system sends the enroute status message through the merlin messaging system to the designated recipients.
💻 Technical Criteria
Given An enroute status message is formatted with train ID and distribution list is available
When The system transmits the terminal status message
Then The system sends the enroute status message through the Merlin messaging system to the designated recipients
R-GCX015-cbl-00232 Manifest Type?
Decision Rules
📊 Business Logic Narrative
When the process 'Manifest Type?' is invoked, and assuming that a manifest message is being processed for administrative table updates, when the system evaluates the manifest type code from the message, the desired outcome is that the system must identify whether it is p-type, h-type, or s-type manifest to route to appropriate timestamp update.
💻 Technical Criteria
Given A manifest message is being processed for administrative table updates
When The system evaluates the manifest type code from the message
Then The system must identify whether it is P-type, H-type, or S-type manifest to route to appropriate timestamp update
R-GCX015-cbl-00237 Prepare Error Report Message
Process Rules
📊 Business Logic Narrative
When the process 'Prepare Error Report Message' is invoked, and assuming that an error condition has been detected during message processing, when the system needs to send error notifications, the desired outcome is that prepare error report message with processing results and error information for transmission to merlin system.
💻 Technical Criteria
Given An error condition has been detected during message processing
When The system needs to send error notifications
Then Prepare error report message with processing results and error information for transmission to Merlin system
R-GCX015-cbl-00238 Set Primary Merlin Recipients
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Primary Merlin Recipients' is invoked, and assuming that error report message is prepared for transmission, when setting up primary merlin recipients, the desired outcome is that set from user code to 'om01247', set primary recipient to 'om01247', and configure subject line with merlin subject information.
💻 Technical Criteria
Given Error report message is prepared for transmission
When Setting up primary Merlin recipients
Then Set from user code to 'OM01247', set primary recipient to 'OM01247', and configure subject line with Merlin subject information
R-GCX015-cbl-00239 Send to Primary Merlin Destination
Action Rules
📊 Business Logic Narrative
When the process 'Send to Primary Merlin Destination' is invoked, and assuming that primary merlin recipients are configured and error report is prepared, when transmitting to primary merlin destination, the desired outcome is that call emcsend2 service with configured parameters including from user code, destination, recipients, subject, and error report content.
💻 Technical Criteria
Given Primary Merlin recipients are configured and error report is prepared
When Transmitting to primary Merlin destination
Then Call EMCSEND2 service with configured parameters including from user code, destination, recipients, subject, and error report content
R-GCX015-cbl-00243 Send to Administrative Destination
Action Rules
📊 Business Logic Narrative
When the process 'Send to Administrative Destination' is invoked, and assuming that administrative recipients are configured, when transmitting to administrative merlin destination, the desired outcome is that call emcsend2 service with administrative destination filename (emi-destination-filename2) and configured administrative recipients.
💻 Technical Criteria
Given Administrative recipients are configured
When Transmitting to administrative Merlin destination
Then Call EMCSEND2 service with administrative destination filename (EMI-DESTINATION-FILENAME2) and configured administrative recipients
R-GCX015-cbl-00247 Get AEI Merlin Recipients
Action Rules
📊 Business Logic Narrative
When the process 'Get AEI Merlin Recipients' is invoked, and assuming that aei status message is prepared for transmission, when retrieving aei merlin recipients, the desired outcome is that extract port information from train security data, call aecwrktb with 'cusemail' record type to get email recipients; if successful, set default merlin id as from user and populate recipient list from database results; if no entry found, use default merlin id for both from and to users; if database error occurs, perform db2 abend processing.
💻 Technical Criteria
Given AEI status message is prepared for transmission
When Retrieving AEI Merlin recipients
Then Extract port information from train security data, call AECWRKTB with 'CUSEMAIL' record type to get email recipients; If successful, set default Merlin ID as from user and populate recipient list from database results; If no entry found, use default Merlin ID for both from and to users; If database error occurs, perform DB2 abend processing
R-GCX015-cbl-00340 Set Merlin From User Code to OM01247
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Merlin From User Code to OM01247' is invoked, and assuming that an error report needs to be transmitted via merlin system, when setting up primary transmission parameters, the desired outcome is that the from user code should be set to om01247 for sender identification.
💻 Technical Criteria
Given An error report needs to be transmitted via Merlin system
When Setting up primary transmission parameters
Then The from user code should be set to OM01247 for sender identification
R-GCX015-cbl-00341 Set Primary To User Code to OM01247
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Primary To User Code to OM01247' is invoked, and assuming that error report transmission is being configured, when setting primary recipient information, the desired outcome is that the primary to user code should be set to om01247.
💻 Technical Criteria
Given Error report transmission is being configured
When Setting primary recipient information
Then The primary to user code should be set to OM01247
R-GCX015-cbl-00342 Set Subject from Merlin Subject
Process Rules
📊 Business Logic Narrative
When the process 'Set Subject from Merlin Subject' is invoked, and assuming that error report is being prepared for transmission, when setting the message subject, the desired outcome is that the subject should be assigned from the merlin subject field.
💻 Technical Criteria
Given Error report is being prepared for transmission
When Setting the message subject
Then The subject should be assigned from the Merlin subject field
R-GCX015-cbl-00343 Call EMCSEND2 for Primary Send
Action Rules
📊 Business Logic Narrative
When the process 'Call EMCSEND2 for Primary Send' is invoked, and assuming that error report is formatted and ready for transmission, when initiating primary send operation, the desired outcome is that emcsend2 should be called with configured parameters to transmit the error report.
💻 Technical Criteria
Given Error report is formatted and ready for transmission
When Initiating primary send operation
Then EMCSEND2 should be called with configured parameters to transmit the error report
R-GCX015-cbl-00344 Primary Send Successful?
Validation Rules
📊 Business Logic Narrative
When the process 'Primary Send Successful?' is invoked, and assuming that primary error report transmission has been attempted, when checking transmission result status, the desired outcome is that if emi-no-errors condition is true, the transmission is considered successful.
💻 Technical Criteria
Given Primary error report transmission has been attempted
When Checking transmission result status
Then If EMI-NO-ERRORS condition is true, the transmission is considered successful
R-GCX015-cbl-00347 Use Alternative Destination Filename
Process Rules
📊 Business Logic Narrative
When the process 'Use Alternative Destination Filename' is invoked, and assuming that secondary transmission is being set up, when configuring destination parameters, the desired outcome is that the destination filename should be set to emi-destination-filename2.
💻 Technical Criteria
Given Secondary transmission is being set up
When Configuring destination parameters
Then The destination filename should be set to EMI-DESTINATION-FILENAME2
R-GCX015-cbl-00348 Call EMCSEND2 for Secondary Send
Action Rules
📊 Business Logic Narrative
When the process 'Call EMCSEND2 for Secondary Send' is invoked, and assuming that secondary transmission parameters are configured, when initiating secondary send operation, the desired outcome is that emcsend2 should be called with alternative destination and recipient configuration.
💻 Technical Criteria
Given Secondary transmission parameters are configured
When Initiating secondary send operation
Then EMCSEND2 should be called with alternative destination and recipient configuration
R-GCX015-cbl-00349 Secondary Send Successful?
Validation Rules
📊 Business Logic Narrative
When the process 'Secondary Send Successful?' is invoked, and assuming that secondary error report transmission has been attempted, when checking secondary transmission result status, the desired outcome is that if emi-no-errors condition is true, the secondary transmission is considered successful.
💻 Technical Criteria
Given Secondary error report transmission has been attempted
When Checking secondary transmission result status
Then If EMI-NO-ERRORS condition is true, the secondary transmission is considered successful
R-GCX015-cbl-00350 Handle Send Failure Error
Decision Rules
📊 Business Logic Narrative
When the process 'Handle Send Failure Error' is invoked, and assuming that error report transmission has failed, when evaluating the failure type, the desired outcome is that if emi-from-not-found then set error message to 'emi - invalid merlin from', if emi-to-or-copy-not-found then set error message to 'emi - invalid merlin to or copy', if emi-filename-invalid then set error message to 'emi - invalid merlin filename', and perform abend procedure.
💻 Technical Criteria
Given Error report transmission has failed
When Evaluating the failure type
Then If EMI-FROM-NOT-FOUND then set error message to 'EMI - INVALID MERLIN FROM', if EMI-TO-OR-COPY-NOT-FOUND then set error message to 'EMI - INVALID MERLIN TO OR COPY', if EMI-FILENAME-INVALID then set error message to 'EMI - INVALID MERLIN FILENAME', and perform abend procedure
R-GCX015-cbl-00380 Set Secondary Destination File
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Secondary Destination File' is invoked, and assuming that secondary merlin send is being configured, when destination file needs to be specified, the desired outcome is that the secondary destination filename (emi-destination-filename2) is used for message delivery.
💻 Technical Criteria
Given Secondary Merlin send is being configured
When Destination file needs to be specified
Then The secondary destination filename (EMI-DESTINATION-FILENAME2) is used for message delivery
R-GCX015-cbl-00381 Call EMCSEND2 for Secondary Send
Action Rules
📊 Business Logic Narrative
When the process 'Call EMCSEND2 for Secondary Send' is invoked, and assuming that all secondary send parameters are configured, when the secondary merlin send is executed, the desired outcome is that emcsend2 service is called with configured parameters including from user, destination file, recipients, subject, and message content.
💻 Technical Criteria
Given All secondary send parameters are configured
When The secondary Merlin send is executed
Then EMCSEND2 service is called with configured parameters including from user, destination file, recipients, subject, and message content

🔁 EDI, Status & Database 188 logic blocks
R-GCX015-cbl-00001 1:Initialize System Configuration
Action Rules
📊 Business Logic Narrative
When the process '1:Initialize System Configuration' is invoked, and assuming that the system is starting message processing, when administrative configuration is being initialized, the desired outcome is that the system should retrieve admin segment with table id 'ad' and sequence id 'adminid', and if not found, set default merlin id to 'om01247'.
💻 Technical Criteria
Given The system is starting message processing
When Administrative configuration is being initialized
Then The system should retrieve admin segment with table ID 'AD' and sequence ID 'ADMINID', and if not found, set default Merlin ID to 'OM01247'
R-GCX015-cbl-00002 2:Load Incoming Messages
Action Rules
📊 Business Logic Narrative
When the process '2:Load Incoming Messages' is invoked, and assuming that the system has initialized configuration, when loading messages from the queue, the desired outcome is that the system should connect to mq manager, open the queue, and get messages with conversion options enabled.
💻 Technical Criteria
Given The system has initialized configuration
When Loading messages from the queue
Then The system should connect to MQ manager, open the queue, and get messages with conversion options enabled
R-GCX015-cbl-00003 Message Available?
Validation Rules
📊 Business Logic Narrative
When the process 'Message Available?' is invoked, and assuming that a message retrieval attempt has been made, when the completion code is mqcc-ok and message entries are greater than 1 and backout count equals 0, the desired outcome is that the message should be marked as good for processing, otherwise skip or terminate based on specific conditions.
💻 Technical Criteria
Given A message retrieval attempt has been made
When The completion code is MQCC-OK and message entries are greater than 1 and backout count equals 0
Then The message should be marked as good for processing, otherwise skip or terminate based on specific conditions
R-GCX015-cbl-00007 16:Retrieve Train Records
Action Rules
📊 Business Logic Narrative
When the process '16:Retrieve Train Records' is invoked, and assuming that a message has been classified as train type, when retrieving train records using the train id from m10 data, the desired outcome is that the system should call train i/o module with get function for root record only, and if not found, log error message indicating train id was not found.
💻 Technical Criteria
Given A message has been classified as Train type
When Retrieving train records using the train ID from M10 data
Then The system should call train I/O module with GET function for root record only, and if not found, log error message indicating train ID was not found
R-GCX015-cbl-00009 6:Process Message Segments
Process Rules
📊 Business Logic Narrative
When the process '6:Process Message Segments' is invoked, and assuming that message segments are available for processing, when processing segments by type where m10 contains manifest data, p4 contains additional data, n10 contains line release number, k1 contains message text, and k3 contains acceptance data, the desired outcome is that the system should process each segment type appropriately and continue until end marker or spaces are encountered.
💻 Technical Criteria
Given Message segments are available for processing
When Processing segments by type where M10 contains manifest data, P4 contains additional data, N10 contains line release number, K1 contains message text, and K3 contains acceptance data
Then The system should process each segment type appropriately and continue until end marker or spaces are encountered
R-GCX015-cbl-00011 9:Process Rejection Information
Decision Rules
📊 Business Logic Narrative
When the process '9:Process Rejection Information' is invoked, and assuming that a k3 segment is being processed, when k3 total reject count equals zero and total accept count is greater than zero, the desired outcome is that the system should set ack status, but if total reject count is greater than zero, set error status, and if both counts are zero, set ack status with warning message.
💻 Technical Criteria
Given A K3 segment is being processed
When K3 total reject count equals zero and total accept count is greater than zero
Then The system should set ACK status, but if total reject count is greater than zero, set ERROR status, and if both counts are zero, set ACK status with warning message
R-GCX015-cbl-00012 10:Determine Final Status
Decision Rules
📊 Business Logic Narrative
When the process '10:Determine Final Status' is invoked, and assuming that k3 acceptance data has been processed with zero rejections and positive acceptances, when train is in pre-arrived status, the desired outcome is that the system should set pre-arrival status, or if train review is complete, set review-completed status, otherwise set standard ack status.
💻 Technical Criteria
Given K3 acceptance data has been processed with zero rejections and positive acceptances
When Train is in pre-arrived status
Then The system should set pre-arrival status, or if train review is complete, set review-completed status, otherwise set standard ACK status
R-GCX015-cbl-00013 12:Send Error Messages
Action Rules
📊 Business Logic Narrative
When the process '12:Send Error Messages' is invoked, and assuming that an error status has been determined, when error status flag is set, the desired outcome is that the system should send error notification message via emcsend to configured merlin recipients.
💻 Technical Criteria
Given An error status has been determined
When Error status flag is set
Then The system should send error notification message via EMCSEND to configured Merlin recipients
R-GCX015-cbl-00014 17:Update Train Status
Decision Rules
📊 Business Logic Narrative
When the process '17:Update Train Status' is invoked, and assuming that train processing requires status update, when train is deleted and status is ack, or train is delete-pending and status is ack, the desired outcome is that the system should set status to 'deleted', or if train is not deleted or delete-pending, update with current status.
💻 Technical Criteria
Given Train processing requires status update
When Train is deleted and status is ACK, or train is delete-pending and status is ACK
Then The system should set status to 'DELETED', or if train is not deleted or delete-pending, update with current status
R-GCX015-cbl-00018 21:Send AEI Status Messages
Action Rules
📊 Business Logic Narrative
When the process '21:Send AEI Status Messages' is invoked, and assuming that train has aei-send flag set, when sending aei status messages, the desired outcome is that the system should retrieve aei merlin recipients from database, format train and status information, and send via emcsend3.
💻 Technical Criteria
Given Train has AEI-SEND flag set
When Sending AEI status messages
Then The system should retrieve AEI Merlin recipients from database, format train and status information, and send via EMCSEND3
R-GCX015-cbl-00020 23:Process Automatic Train Arrival
Action Rules
📊 Business Logic Narrative
When the process '23:Process Automatic Train Arrival' is invoked, and assuming that train status has been updated, when train has ack status and arrived-pending flag, the desired outcome is that the system should trigger automatic train arrival processing with current date and time.
💻 Technical Criteria
Given Train status has been updated
When Train has ACK status and ARRIVED-PENDING flag
Then The system should trigger automatic train arrival processing with current date and time
R-GCX015-cbl-00023 25:Update Administrative Tables
Process Rules
📊 Business Logic Narrative
When the process '25:Update Administrative Tables' is invoked, and assuming that special test message is being processed, when manifest type is 'p', the desired outcome is that the system should update t1-309-ack timestamp, or if manifest type is 'h', update t1-353-ack timestamp, or if manifest type is 's', update t1-358-ack timestamp.
💻 Technical Criteria
Given Special test message is being processed
When Manifest type is 'P'
Then The system should update T1-309-ACK timestamp, or if manifest type is 'H', update T1-353-ACK timestamp, or if manifest type is 'S', update T1-358-ACK timestamp
R-GCX015-cbl-00024 27:Close MQ Connections
Action Rules
📊 Business Logic Narrative
When the process '27:Close MQ Connections' is invoked, and assuming that message processing is complete or terminated, when closing mq resources, the desired outcome is that the system should close queue handle and disconnect from mq manager with appropriate error handling.
💻 Technical Criteria
Given Message processing is complete or terminated
When Closing MQ resources
Then The system should close queue handle and disconnect from MQ manager with appropriate error handling
R-GCX015-cbl-00026 Initialize Message Counters and Tables
Process Rules
📊 Business Logic Narrative
When the process 'Initialize Message Counters and Tables' is invoked, and assuming that working storage fields have been cleared, when counter and table initialization is performed, the desired outcome is that k1 counter is set to 1, k1 table is initialized, message line counter is set to 1, and all segment found flags are set to not found status.
💻 Technical Criteria
Given Working storage fields have been cleared
When Counter and table initialization is performed
Then K1 counter is set to 1, K1 table is initialized, message line counter is set to 1, and all segment found flags are set to not found status
R-GCX015-cbl-00027 Set Administrative Table Parameters
Process Rules
📊 Business Logic Narrative
When the process 'Set Administrative Table Parameters' is invoked, and assuming that message counters and tables are initialized, when administrative table parameters are configured, the desired outcome is that function code is set to 'gu', table id is set to 'ad', sequence id is set to 'adminid', and accept status is set to 'ge'.
💻 Technical Criteria
Given Message counters and tables are initialized
When Administrative table parameters are configured
Then Function code is set to 'GU', table ID is set to 'AD', sequence ID is set to 'ADMINID', and accept status is set to 'GE'
R-GCX015-cbl-00028 Get Administrative Configuration
Action Rules
📊 Business Logic Narrative
When the process 'Get Administrative Configuration' is invoked, and assuming that administrative table parameters are configured, when table segment retrieval is performed, the desired outcome is that system calls table i/o function to get administrative segment data.
💻 Technical Criteria
Given Administrative table parameters are configured
When Table segment retrieval is performed
Then System calls table I/O function to get administrative segment data
R-GCX015-cbl-00029 Admin Config Found?
Decision Rules
📊 Business Logic Narrative
When the process 'Admin Config Found?' is invoked, and assuming that administrative configuration retrieval has been attempted, when return flag indicates successful retrieval (flag equals '0'), the desired outcome is that administrative segment data is loaded from table segment, otherwise default merlin id 'om01247' is set.
💻 Technical Criteria
Given Administrative configuration retrieval has been attempted
When Return flag indicates successful retrieval (flag equals '0')
Then Administrative segment data is loaded from table segment, otherwise default Merlin ID 'OM01247' is set
R-GCX015-cbl-00031 Initialize Message Queue Parameters
Computation Rules
📊 Business Logic Narrative
When the process 'Initialize Message Queue Parameters' is invoked, and assuming that administrative configuration is complete, when message queue parameters are initialized, the desired outcome is that header length, unused entry length, and single entry length are calculated and stored for message processing.
💻 Technical Criteria
Given Administrative configuration is complete
When Message queue parameters are initialized
Then Header length, unused entry length, and single entry length are calculated and stored for message processing
R-GCX015-cbl-00032 Connect to MQ Manager
Action Rules
📊 Business Logic Narrative
When the process 'Connect to MQ Manager' is invoked, and assuming that message queue parameters are initialized, when mq connection is attempted, the desired outcome is that system calls mqconnc to establish connection with mq manager.
💻 Technical Criteria
Given Message queue parameters are initialized
When MQ connection is attempted
Then System calls MQCONNC to establish connection with MQ manager
R-GCX015-cbl-00033 MQ Connection OK?
Validation Rules
📊 Business Logic Narrative
When the process 'MQ Connection OK?' is invoked, and assuming that mq connection attempt has been made, when connection completion code is evaluated, the desired outcome is that if completion code equals mqcc-ok then connection is successful, otherwise connection failed and error handling is triggered.
💻 Technical Criteria
Given MQ connection attempt has been made
When Connection completion code is evaluated
Then If completion code equals MQCC-OK then connection is successful, otherwise connection failed and error handling is triggered
R-GCX015-cbl-00034 Open Message Queue for Input
Action Rules
📊 Business Logic Narrative
When the process 'Open Message Queue for Input' is invoked, and assuming that mq manager connection is successful, when queue open operation is performed, the desired outcome is that system calls mqopen with object type set to queue, object name from configuration, and input options.
💻 Technical Criteria
Given MQ manager connection is successful
When Queue open operation is performed
Then System calls MQOPEN with object type set to queue, object name from configuration, and input options
R-GCX015-cbl-00035 Queue Open OK?
Validation Rules
📊 Business Logic Narrative
When the process 'Queue Open OK?' is invoked, and assuming that message queue open attempt has been made, when queue open completion code is evaluated, the desired outcome is that if completion code equals mqcc-ok then queue is ready for processing, if reason code is 2085 then program exits, otherwise error handling is triggered.
💻 Technical Criteria
Given Message queue open attempt has been made
When Queue open completion code is evaluated
Then If completion code equals MQCC-OK then queue is ready for processing, if reason code is 2085 then program exits, otherwise error handling is triggered
R-GCX015-cbl-00036 System Ready for Processing
Process Rules
📊 Business Logic Narrative
When the process 'System Ready for Processing' is invoked, and assuming that message queue is successfully opened, when all initialization steps are validated, the desired outcome is that system is ready to begin processing messages from the queue.
💻 Technical Criteria
Given Message queue is successfully opened
When All initialization steps are validated
Then System is ready to begin processing messages from the queue
R-GCX015-cbl-00038 Open Message Queue
Action Rules
📊 Business Logic Narrative
When the process 'Open Message Queue' is invoked, and assuming that mq manager connection is established, when system attempts to open the message queue, the desired outcome is that if queue opening fails, system generates error message and terminates processing with mq open failure.
💻 Technical Criteria
Given MQ manager connection is established
When System attempts to open the message queue
Then If queue opening fails, system generates error message and terminates processing with MQ open failure
R-GCX015-cbl-00039 Queue Available?
Decision Rules
📊 Business Logic Narrative
When the process 'Queue Available?' is invoked, and assuming that system attempts to open message queue, when queue open operation returns reason code 2085, the desired outcome is that system exits processing normally without error.
💻 Technical Criteria
Given System attempts to open message queue
When Queue open operation returns reason code 2085
Then System exits processing normally without error
R-GCX015-cbl-00040 Get Message from Queue
Action Rules
📊 Business Logic Narrative
When the process 'Get Message from Queue' is invoked, and assuming that message queue is open and available, when system attempts to get message from queue, the desired outcome is that message is retrieved and completion code is set based on operation result.
💻 Technical Criteria
Given Message queue is open and available
When System attempts to get message from queue
Then Message is retrieved and completion code is set based on operation result
R-GCX015-cbl-00041 Message Retrieved Successfully?
Validation Rules
📊 Business Logic Narrative
When the process 'Message Retrieved Successfully?' is invoked, and assuming that message retrieval operation is completed, when completion code equals mqcc-ok, the desired outcome is that message is considered successfully retrieved for further processing.
💻 Technical Criteria
Given Message retrieval operation is completed
When Completion code equals MQCC-OK
Then Message is considered successfully retrieved for further processing
R-GCX015-cbl-00042 Message Too Short?
Validation Rules
📊 Business Logic Narrative
When the process 'Message Too Short?' is invoked, and assuming that message is successfully retrieved from queue, when completion code is mqcc-ok and calculated message entries count is less than 1, the desired outcome is that system terminates processing with user error 355 indicating message is too short.
💻 Technical Criteria
Given Message is successfully retrieved from queue
When Completion code is MQCC-OK and calculated message entries count is less than 1
Then System terminates processing with user error 355 indicating message is too short
R-GCX015-cbl-00044 Mark as Good Message
Decision Rules
📊 Business Logic Narrative
When the process 'Mark as Good Message' is invoked, and assuming that message is successfully retrieved with valid length, when completion code is mqcc-ok and message backout count equals 0, the desired outcome is that message is marked as good message for processing.
💻 Technical Criteria
Given Message is successfully retrieved with valid length
When Completion code is MQCC-OK and message backout count equals 0
Then Message is marked as good message for processing
R-GCX015-cbl-00045 Mark as Skip Message
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Mark as Skip Message', assuming that message is successfully retrieved with valid length, when completion code is mqcc-ok and message backout count is not equal to 0, the desired outcome is that message is marked as skip message and not processed further.
💻 Technical Criteria
EXCLUDING Message is successfully retrieved with valid length
When Completion code is MQCC-OK and message backout count is not equal to 0
Then Message is marked as skip message and not processed further
R-GCX015-cbl-00046 No Messages Available?
Decision Rules
📊 Business Logic Narrative
When the process 'No Messages Available?' is invoked, and assuming that message retrieval operation fails, when completion code is mqcc-failed and reason code is mqrc-no-msg-available, the desired outcome is that system generates mq error message and terminates processing with error code 355.
💻 Technical Criteria
Given Message retrieval operation fails
When Completion code is MQCC-FAILED and reason code is MQRC-NO-MSG-AVAILABLE
Then System generates MQ error message and terminates processing with error code 355
R-GCX015-cbl-00047 Set End of Queue Flag
Decision Rules
📊 Business Logic Narrative
When the process 'Set End of Queue Flag' is invoked, and assuming that message retrieval operation fails, when completion code and reason code indicate other mq failure conditions, the desired outcome is that system sets end of message queue flag and generates error message before terminating with error code 355.
💻 Technical Criteria
Given Message retrieval operation fails
When Completion code and reason code indicate other MQ failure conditions
Then System sets end of message queue flag and generates error message before terminating with error code 355
R-GCX015-cbl-00049 Generate MQ Error Message
Action Rules
📊 Business Logic Narrative
When the process 'Generate MQ Error Message' is invoked, and assuming that mq operation fails with specific reason code, when error condition is detected, the desired outcome is that system calls error message routine to generate descriptive error text and formats complete error message with reason code.
💻 Technical Criteria
Given MQ operation fails with specific reason code
When Error condition is detected
Then System calls error message routine to generate descriptive error text and formats complete error message with reason code
R-GCX015-cbl-00050 Abend with Error Code 355
Action Rules
📊 Business Logic Narrative
When the process 'Abend with Error Code 355' is invoked, and assuming that critical mq error condition is detected, when error message is generated and transaction code 355 is set, the desired outcome is that system calls error handling routine to terminate processing abnormally.
💻 Technical Criteria
Given Critical MQ error condition is detected
When Error message is generated and transaction code 355 is set
Then System calls error handling routine to terminate processing abnormally
R-GCX015-cbl-00057 Manifest Type = 'H' and TRAIN?
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Manifest Type = 'H' and TRAIN?', assuming that the message type is train and manifest type is not 'p', 'x', 'y', 't', or 's', when the manifest type code (m10-09-manifest-typ-cde) is 'h', the desired outcome is that the system sets the flag to delete status during processing.
💻 Technical Criteria
EXCLUDING The message type is TRAIN and manifest type is not 'P', 'X', 'Y', 'T', or 'S'
When The manifest type code (M10-09-MANIFEST-TYP-CDE) is 'H'
Then The system sets the flag to delete status during processing
R-GCX015-cbl-00058 Set Should Not Update Status
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set Should Not Update Status', assuming that a message type has been determined, when the manifest type code is not 'p', 'x', 'y', 't', 's' and is not 'h' for train messages, the desired outcome is that the system sets the flag to not update status during processing.
💻 Technical Criteria
EXCLUDING A message type has been determined
When The manifest type code is not 'P', 'X', 'Y', 'T', 'S' and is not 'H' for TRAIN messages
Then The system sets the flag to not update status during processing
R-GCX015-cbl-00268 Extract Manifest Type Code from M10-09
Process Rules
📊 Business Logic Narrative
When the process 'Extract Manifest Type Code from M10-09' is invoked, and assuming that an m10 segment is received for processing, when the system processes the m10 segment, the desired outcome is that the manifest type code is extracted from m10-09-manifest-typ-cde field for action determination.
💻 Technical Criteria
Given An M10 segment is received for processing
When The system processes the M10 segment
Then The manifest type code is extracted from M10-09-MANIFEST-TYP-CDE field for action determination
R-GCX015-cbl-00269 Set Update Status Action Types: P, X, Y, T, S
Decision Rules
📊 Business Logic Narrative
When the process 'Set Update Status Action Types: P, X, Y, T, S' is invoked, and assuming that an m10 segment with manifest type code is processed, when the manifest type code is p, x, y, t, or s, the desired outcome is that the system sets should-update-status flag to true indicating status should be updated.
💻 Technical Criteria
Given An M10 segment with manifest type code is processed
When The manifest type code is P, X, Y, T, or S
Then The system sets SHOULD-UPDATE-STATUS flag to true indicating status should be updated
R-GCX015-cbl-00270 Set Delete Status Action Type: H for Trains
Decision Rules
📊 Business Logic Narrative
When the process 'Set Delete Status Action Type: H for Trains' is invoked, and assuming that an m10 segment with manifest type code h is processed and the transaction is identified as train, when the manifest type code is h, the desired outcome is that the system sets should-delete-status flag to true indicating the train status should be deleted.
💻 Technical Criteria
Given An M10 segment with manifest type code H is processed and the transaction is identified as TRAIN
When The manifest type code is H
Then The system sets SHOULD-DELETE-STATUS flag to true indicating the train status should be deleted
R-GCX015-cbl-00271 Set No Update Action Other Types
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set No Update Action Other Types', assuming that an m10 segment with manifest type code is processed, when the manifest type code is not p, x, y, t, s, or h, the desired outcome is that the system sets should-not-update-status flag to true indicating no status update should occur.
💻 Technical Criteria
EXCLUDING An M10 segment with manifest type code is processed
When The manifest type code is not P, X, Y, T, S, or H
Then The system sets SHOULD-NOT-UPDATE-STATUS flag to true indicating no status update should occur
R-GCX015-cbl-00272 Identify as TRAIN Processing Prefix: 'TRAIN'
Definitional Rules
📊 Business Logic Narrative
When the process 'Identify as TRAIN Processing Prefix: 'TRAIN'' is invoked, and assuming that an m10 segment reference number is extracted, when the reference number prefix equals 'train', the desired outcome is that the system sets ws-train flag to true and identifies the transaction for train processing.
💻 Technical Criteria
Given An M10 segment reference number is extracted
When The reference number prefix equals 'TRAIN'
Then The system sets WS-TRAIN flag to true and identifies the transaction for train processing
R-GCX015-cbl-00275 Store M10 Data for Processing
Process Rules
📊 Business Logic Narrative
When the process 'Store M10 Data for Processing' is invoked, and assuming that m10 segment data has been extracted and transaction type identified, when the system completes m10 segment analysis, the desired outcome is that the reference number data is moved to work-m10-12-data field for use in database operations and logging.
💻 Technical Criteria
Given M10 segment data has been extracted and transaction type identified
When The system completes M10 segment analysis
Then The reference number data is moved to WORK-M10-12-DATA field for use in database operations and logging
R-GCX015-cbl-00065 Set UPDATE Status Action Types: P, X, Y, T, S
Decision Rules
📊 Business Logic Narrative
When the process 'Set UPDATE Status Action Types: P, X, Y, T, S' is invoked, and assuming that an m10 segment is being processed with a manifest type code, when the manifest type code is p, x, y, t, or s, the desired outcome is that the system should set the status update action to allow status updates.
💻 Technical Criteria
Given An M10 segment is being processed with a manifest type code
When The manifest type code is P, X, Y, T, or S
Then The system should set the status update action to allow status updates
R-GCX015-cbl-00066 Set NO UPDATE Status Action Other Types
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set NO UPDATE Status Action Other Types', assuming that an m10 segment is being processed with a manifest type code, when the manifest type code is not p, x, y, t, or s, the desired outcome is that the system should set the status update action to prevent status updates.
💻 Technical Criteria
EXCLUDING An M10 segment is being processed with a manifest type code
When The manifest type code is not P, X, Y, T, or S
Then The system should set the status update action to prevent status updates
R-GCX015-cbl-00067 Set DELETE Status Action Type: H for Trains
Decision Rules
📊 Business Logic Narrative
When the process 'Set DELETE Status Action Type: H for Trains' is invoked, and assuming that a train is being processed with an m10 segment containing manifest type code, when the manifest type code is h, the desired outcome is that the system should set the delete status action to allow status deletion.
💻 Technical Criteria
Given A train is being processed with an M10 segment containing manifest type code
When The manifest type code is H
Then The system should set the delete status action to allow status deletion
R-GCX015-cbl-00068 Set NO DELETE Status Action Other Types for Trains
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set NO DELETE Status Action Other Types for Trains', assuming that a train is being processed with an m10 segment containing manifest type code, when the manifest type code is not h, the desired outcome is that the system should set the delete status action to prevent status deletion.
💻 Technical Criteria
EXCLUDING A train is being processed with an M10 segment containing manifest type code
When The manifest type code is not H
Then The system should set the delete status action to prevent status deletion
R-GCX015-cbl-00071 Process N10 Segment
Process Rules
📊 Business Logic Narrative
When the process 'Process N10 Segment' is invoked, and assuming that a message segment with table id 'n10' is encountered during message processing, when the system processes the n10 segment, the desired outcome is that the line release number from position 09 is extracted and stored in the hold area.
💻 Technical Criteria
Given A message segment with table ID 'N10' is encountered during message processing
When The system processes the N10 segment
Then The line release number from position 09 is extracted and stored in the hold area
R-GCX015-cbl-00073 Build Error Description
Decision Rules
📊 Business Logic Narrative
When the process 'Build Error Description' is invoked, and assuming that a k1 segment with message number '242' is processed and n10 line release number data exists, when the system builds the error description, the desired outcome is that an additional message line with 'c4 code=' followed by the line release number is added to the processing log.
💻 Technical Criteria
Given A K1 segment with message number '242' is processed and N10 line release number data exists
When The system builds the error description
Then An additional message line with 'C4 CODE=' followed by the line release number is added to the processing log
R-GCX015-cbl-00076 Add Segment to Processing Log
Process Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Add Segment to Processing Log', assuming that a message segment has been processed (except k1 segments which handle their own logging), when the segment processing is complete, the desired outcome is that the segment data from positions 1-69 is added to the processing log and the line counter is incremented.
💻 Technical Criteria
EXCLUDING A message segment has been processed (except K1 segments which handle their own logging)
When The segment processing is complete
Then The segment data from positions 1-69 is added to the processing log and the line counter is incremented
R-GCX015-cbl-00079 Update Administrative Timestamps
Action Rules
📊 Business Logic Narrative
When the process 'Update Administrative Timestamps' is invoked, and assuming that a test message has been identified with manifest type code, when the manifest type code is 'p', 'h', or 's', the desired outcome is that the system updates the corresponding acknowledgment timestamp field in the t1 administrative table with current machine date, century, and time.
💻 Technical Criteria
Given A test message has been identified with manifest type code
When The manifest type code is 'P', 'H', or 'S'
Then The system updates the corresponding acknowledgment timestamp field in the T1 administrative table with current machine date, century, and time
R-GCX015-cbl-00080 Clear Message Array
Process Rules
📊 Business Logic Narrative
When the process 'Clear Message Array' is invoked, and assuming that a test message has been processed and administrative timestamps updated, when the special check processing is completed, the desired outcome is that the system moves spaces to the message array and sets the end found flag to true.
💻 Technical Criteria
Given A test message has been processed and administrative timestamps updated
When The special check processing is completed
Then The system moves spaces to the message array and sets the end found flag to true
R-GCX015-cbl-00082 M10 Segment Found?
Validation Rules
📊 Business Logic Narrative
When the process 'M10 Segment Found?' is invoked, and assuming that a message is being processed for segment validation, when the system checks for m10 segment presence using the m10 segment found flag, the desired outcome is that if m10 segment is not found, generate error message 'm10 segment not found on 355 transaction' and increment line counter.
💻 Technical Criteria
Given A message is being processed for segment validation
When The system checks for M10 segment presence using the M10 segment found flag
Then If M10 segment is not found, generate error message 'M10 SEGMENT NOT FOUND ON 355 TRANSACTION' and increment line counter
R-GCX015-cbl-00083 P4 Segment Found?
Validation Rules
📊 Business Logic Narrative
When the process 'P4 Segment Found?' is invoked, and assuming that a message is being processed for segment validation and m10 validation is complete, when the system checks for p4 segment presence using the p4 segment found flag, the desired outcome is that if p4 segment is not found, generate error message 'p4 segment not found on 355 transaction' and increment line counter.
💻 Technical Criteria
Given A message is being processed for segment validation and M10 validation is complete
When The system checks for P4 segment presence using the P4 segment found flag
Then If P4 segment is not found, generate error message 'P4 SEGMENT NOT FOUND ON 355 TRANSACTION' and increment line counter
R-GCX015-cbl-00084 K3 Segment Found?
Validation Rules
📊 Business Logic Narrative
When the process 'K3 Segment Found?' is invoked, and assuming that a message is being processed for segment validation and m10 and p4 validations are complete, when the system checks for k3 segment presence using the k3 segment found flag, the desired outcome is that if k3 segment is not found, generate error message 'k3 segment not found on 355 transaction' and increment line counter.
💻 Technical Criteria
Given A message is being processed for segment validation and M10 and P4 validations are complete
When The system checks for K3 segment presence using the K3 segment found flag
Then If K3 segment is not found, generate error message 'K3 SEGMENT NOT FOUND ON 355 TRANSACTION' and increment line counter
R-GCX015-cbl-00085 Create Default K3 Segment with Current Date/Time
Process Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Create Default K3 Segment with Current Date/Time', assuming that k3 segment is not found in the message, when the system processes the missing k3 segment condition, the desired outcome is that create a default k3 segment by setting k3 segment found flag to true, populate k3-03-date with current machine date, populate k3-04-time with current machine time first 6 positions, and move the constructed k3 data to k3-segment.
💻 Technical Criteria
EXCLUDING K3 segment is not found in the message
When The system processes the missing K3 segment condition
Then Create a default K3 segment by setting K3 segment found flag to true, populate K3-03-DATE with current machine date, populate K3-04-TIME with current machine time first 6 positions, and move the constructed K3 data to K3-SEGMENT
R-GCX015-cbl-00086 Set Final Status Based on Default K3
Decision Rules
📊 Business Logic Narrative
When the process 'Set Final Status Based on Default K3' is invoked, and assuming that a default k3 segment has been created with current date and time, when the system processes the default k3 segment for status determination, the desired outcome is that if k3 total reject count equals zero and k3 total accept count is greater than zero, set ack status, else if both counts are zero, set ack status and add warning message 'uscs k3 record has zero counts' to hold messages and increment k1 counter, else set error status.
💻 Technical Criteria
Given A default K3 segment has been created with current date and time
When The system processes the default K3 segment for status determination
Then If K3 total reject count equals zero and K3 total accept count is greater than zero, set ACK status, else if both counts are zero, set ACK status and add warning message 'USCS K3 RECORD HAS ZERO COUNTS' to hold messages and increment K1 counter, else set ERROR status
R-GCX015-cbl-00087 Total Reject = 0?
Validation Rules
📊 Business Logic Narrative
When the process 'Total Reject = 0?' is invoked, and assuming that a k3 segment has been received with rejection and acceptance counts, when the total rejection count (k3-11-total-reject) is greater than zero, the desired outcome is that set the status to error and generate error processing.
💻 Technical Criteria
Given A K3 segment has been received with rejection and acceptance counts
When The total rejection count (K3-11-TOTAL-REJECT) is greater than zero
Then Set the status to ERROR and generate error processing
R-GCX015-cbl-00088 Total Accept > 0?
Validation Rules
📊 Business Logic Narrative
When the process 'Total Accept > 0?' is invoked, and assuming that a k3 segment has zero rejection counts, when the total acceptance count (k3-12-total-accept) is greater than zero, the desired outcome is that proceed to evaluate train-specific status conditions for final status determination.
💻 Technical Criteria
Given A K3 segment has zero rejection counts
When The total acceptance count (K3-12-TOTAL-ACCEPT) is greater than zero
Then Proceed to evaluate train-specific status conditions for final status determination
R-GCX015-cbl-00089 Log Zero Counts Message
Process Rules
📊 Business Logic Narrative
When the process 'Log Zero Counts Message' is invoked, and assuming that a k3 segment has zero rejection counts, when the total acceptance count (k3-12-total-accept) is also zero, the desired outcome is that log warning message 'uscs k3 record has zero counts' and set ack status.
💻 Technical Criteria
Given A K3 segment has zero rejection counts
When The total acceptance count (K3-12-TOTAL-ACCEPT) is also zero
Then Log warning message 'USCS K3 RECORD HAS ZERO COUNTS' and set ACK status
R-GCX015-cbl-00090 Set PRE-ARRIVAL Status
Decision Rules
📊 Business Logic Narrative
When the process 'Set PRE-ARRIVAL Status' is invoked, and assuming that a train record exists with valid acceptance counts and zero rejections, when the train status indicates pre-arrived condition (gcwtl-pre-arrived is true), the desired outcome is that set the processing status to pre-arrival.
💻 Technical Criteria
Given A train record exists with valid acceptance counts and zero rejections
When The train status indicates PRE-ARRIVED condition (GCWTL-PRE-ARRIVED is true)
Then Set the processing status to PRE-ARRIVAL
R-GCX015-cbl-00091 Set REVIEW-COMPLETED Status
Decision Rules
📊 Business Logic Narrative
When the process 'Set REVIEW-COMPLETED Status' is invoked, and assuming that a train record exists with valid acceptance counts and zero rejections, when the train status indicates review-cmpl condition (gcwtl-review-cmpl is true), the desired outcome is that set the processing status to review-completed.
💻 Technical Criteria
Given A train record exists with valid acceptance counts and zero rejections
When The train status indicates REVIEW-CMPL condition (GCWTL-REVIEW-CMPL is true)
Then Set the processing status to REVIEW-COMPLETED
R-GCX015-cbl-00092 Set ACK Status
Decision Rules
📊 Business Logic Narrative
When the process 'Set ACK Status' is invoked, and assuming that a train record exists with valid acceptance counts and zero rejections, when the train is neither in pre-arrived nor review-cmpl state, the desired outcome is that set the processing status to ack (acknowledgment).
💻 Technical Criteria
Given A train record exists with valid acceptance counts and zero rejections
When The train is neither in PRE-ARRIVED nor REVIEW-CMPL state
Then Set the processing status to ACK (acknowledgment)
R-GCX015-cbl-00093 Set ERROR Status
Decision Rules
📊 Business Logic Narrative
When the process 'Set ERROR Status' is invoked, and assuming that a k3 segment has been processed, when the total rejection count (k3-11-total-reject) is greater than zero, the desired outcome is that set the processing status to error.
💻 Technical Criteria
Given A K3 segment has been processed
When The total rejection count (K3-11-TOTAL-REJECT) is greater than zero
Then Set the processing status to ERROR
R-GCX015-cbl-00289 Extract Total Reject Count
Validation Rules
📊 Business Logic Narrative
When the process 'Extract Total Reject Count' is invoked, and assuming that a k3 segment is being processed from the message queue, when the total rejection count in the k3 segment is greater than zero, the desired outcome is that the system should set error status for the transaction.
💻 Technical Criteria
Given A K3 segment is being processed from the message queue
When The total rejection count in the K3 segment is greater than zero
Then The system should set ERROR status for the transaction
R-GCX015-cbl-00290 Accept Count > 0?
Validation Rules
📊 Business Logic Narrative
When the process 'Accept Count > 0?' is invoked, and assuming that a k3 segment has zero rejection count, when the total acceptance count is greater than zero, the desired outcome is that the system should proceed to evaluate train status conditions for appropriate status assignment.
💻 Technical Criteria
Given A K3 segment has zero rejection count
When The total acceptance count is greater than zero
Then The system should proceed to evaluate train status conditions for appropriate status assignment
R-GCX015-cbl-00291 Record Zero Counts Message
Decision Rules
📊 Business Logic Narrative
When the process 'Record Zero Counts Message' is invoked, and assuming that a k3 segment has zero rejection count, when the total acceptance count is also zero, the desired outcome is that the system should record a warning message 'uscs k3 record has zero counts' and set ack status.
💻 Technical Criteria
Given A K3 segment has zero rejection count
When The total acceptance count is also zero
Then The system should record a warning message 'USCS K3 RECORD HAS ZERO COUNTS' and set ACK status
R-GCX015-cbl-00292 Set PRE-ARRIVAL Status
Decision Rules
📊 Business Logic Narrative
When the process 'Set PRE-ARRIVAL Status' is invoked, and assuming that a k3 segment has valid acceptance counts (zero rejections and positive acceptances) and the entity is a train, when the train status indicates pre-arrived condition, the desired outcome is that the system should set pre-arrival status for the train.
💻 Technical Criteria
Given A K3 segment has valid acceptance counts (zero rejections and positive acceptances) and the entity is a train
When The train status indicates PRE-ARRIVED condition
Then The system should set PRE-ARRIVAL status for the train
R-GCX015-cbl-00293 Set REVIEW-COMPLETED Status
Decision Rules
📊 Business Logic Narrative
When the process 'Set REVIEW-COMPLETED Status' is invoked, and assuming that a k3 segment has valid acceptance counts (zero rejections and positive acceptances) and the entity is a train, when the train status indicates review-cmpl condition, the desired outcome is that the system should set review-completed status for the train.
💻 Technical Criteria
Given A K3 segment has valid acceptance counts (zero rejections and positive acceptances) and the entity is a train
When The train status indicates REVIEW-CMPL condition
Then The system should set REVIEW-COMPLETED status for the train
R-GCX015-cbl-00294 Set ACK Status
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set ACK Status', assuming that a k3 segment has valid acceptance counts (zero rejections and positive acceptances), when the entity is not in pre-arrived or review-cmpl status conditions, the desired outcome is that the system should set standard ack status.
💻 Technical Criteria
EXCLUDING A K3 segment has valid acceptance counts (zero rejections and positive acceptances)
When The entity is not in PRE-ARRIVED or REVIEW-CMPL status conditions
Then The system should set standard ACK status
R-GCX015-cbl-00094 Total Rejects = 0?
Validation Rules
📊 Business Logic Narrative
When the process 'Total Rejects = 0?' is invoked, and assuming that a k3 segment has been processed with total reject and accept counts, when the system evaluates the total reject count, the desired outcome is that if total rejects equal zero, proceed to acceptance validation; otherwise set error status.
💻 Technical Criteria
Given A K3 segment has been processed with total reject and accept counts
When The system evaluates the total reject count
Then If total rejects equal zero, proceed to acceptance validation; otherwise set error status
R-GCX015-cbl-00095 Total Accepts > 0?
Validation Rules
📊 Business Logic Narrative
When the process 'Total Accepts > 0?' is invoked, and assuming that a k3 segment has zero total rejects, when the system evaluates the total accept count, the desired outcome is that if total accepts are greater than zero, proceed to train status evaluation; if total accepts equal zero, log zero counts message and set ack status.
💻 Technical Criteria
Given A K3 segment has zero total rejects
When The system evaluates the total accept count
Then If total accepts are greater than zero, proceed to train status evaluation; if total accepts equal zero, log zero counts message and set ACK status
R-GCX015-cbl-00096 Train Status Check
Decision Rules
📊 Business Logic Narrative
When the process 'Train Status Check' is invoked, and assuming that a train transaction has zero rejects and positive accepts, when the system evaluates the current train status flags, the desired outcome is that if train is in pre-arrived state, set pre-arrival status; if train is in review-cmpl state, set review-completed status; otherwise set standard ack status.
💻 Technical Criteria
Given A train transaction has zero rejects and positive accepts
When The system evaluates the current train status flags
Then If train is in PRE-ARRIVED state, set PRE-ARRIVAL status; if train is in REVIEW-CMPL state, set REVIEW-COMPLETED status; otherwise set standard ACK status
R-GCX015-cbl-00097 Set PRE-ARRIVAL Status
Action Rules
📊 Business Logic Narrative
When the process 'Set PRE-ARRIVAL Status' is invoked, and assuming that a train transaction has zero rejects, positive accepts, and train is in pre-arrived state, when the system sets the final processing status, the desired outcome is that the status is set to pre-arrival to indicate successful pre-clearance processing.
💻 Technical Criteria
Given A train transaction has zero rejects, positive accepts, and train is in PRE-ARRIVED state
When The system sets the final processing status
Then The status is set to PRE-ARRIVAL to indicate successful pre-clearance processing
R-GCX015-cbl-00098 Set REVIEW-COMPLETED Status
Action Rules
📊 Business Logic Narrative
When the process 'Set REVIEW-COMPLETED Status' is invoked, and assuming that a train transaction has zero rejects, positive accepts, and train is in review-cmpl state, when the system sets the final processing status, the desired outcome is that the status is set to review-completed to indicate successful completion of review process.
💻 Technical Criteria
Given A train transaction has zero rejects, positive accepts, and train is in REVIEW-CMPL state
When The system sets the final processing status
Then The status is set to REVIEW-COMPLETED to indicate successful completion of review process
R-GCX015-cbl-00100 Log Zero Counts Message
Action Rules
📊 Business Logic Narrative
When the process 'Log Zero Counts Message' is invoked, and assuming that a k3 segment has zero total rejects and zero total accepts, when the system processes the transaction, the desired outcome is that a warning message 'uscs k3 record has zero counts' is logged and ack status is still assigned.
💻 Technical Criteria
Given A K3 segment has zero total rejects and zero total accepts
When The system processes the transaction
Then A warning message 'USCS K3 RECORD HAS ZERO COUNTS' is logged and ACK status is still assigned
R-GCX015-cbl-00101 Set ERROR Status
Action Rules
📊 Business Logic Narrative
When the process 'Set ERROR Status' is invoked, and assuming that a k3 segment has total rejects greater than zero, when the system evaluates the transaction results, the desired outcome is that the status is set to error to indicate transaction processing failures.
💻 Technical Criteria
Given A K3 segment has total rejects greater than zero
When The system evaluates the transaction results
Then The status is set to ERROR to indicate transaction processing failures
R-GCX015-cbl-00103 Total Accepts > 0?
Validation Rules
📊 Business Logic Narrative
When the process 'Total Accepts > 0?' is invoked, and assuming that a k3 segment has zero rejection records, when the k3 total accept count is greater than zero, the desired outcome is that the system proceeds to evaluate train status conditions for appropriate status assignment.
💻 Technical Criteria
Given A K3 segment has zero rejection records
When The K3 total accept count is greater than zero
Then The system proceeds to evaluate train status conditions for appropriate status assignment
R-GCX015-cbl-00104 Log Zero Counts Message
Process Rules
📊 Business Logic Narrative
When the process 'Log Zero Counts Message' is invoked, and assuming that a k3 segment has zero rejection records, when the k3 total accept count is also zero, the desired outcome is that the system logs 'uscs k3 record has zero counts' message and sets status to ack.
💻 Technical Criteria
Given A K3 segment has zero rejection records
When The K3 total accept count is also zero
Then The system logs 'USCS K3 RECORD HAS ZERO COUNTS' message and sets status to ACK
R-GCX015-cbl-00105 Train Current Status?
Decision Rules
📊 Business Logic Narrative
When the process 'Train Current Status?' is invoked, and assuming that a k3 segment has zero rejections and positive acceptance count, when the system evaluates the current train status condition, the desired outcome is that the system branches to set pre-arrival, review-completed, or ack status based on current train state.
💻 Technical Criteria
Given A K3 segment has zero rejections and positive acceptance count
When The system evaluates the current train status condition
Then The system branches to set PRE-ARRIVAL, REVIEW-COMPLETED, or ACK status based on current train state
R-GCX015-cbl-00106 Set PRE-ARRIVAL Status
Action Rules
📊 Business Logic Narrative
When the process 'Set PRE-ARRIVAL Status' is invoked, and assuming that a train has positive acceptance count and zero rejections, when the train current status is pre-arrived (gcwtl-pre-arrived is true), the desired outcome is that the system sets the working status to pre-arrival-status.
💻 Technical Criteria
Given A train has positive acceptance count and zero rejections
When The train current status is PRE-ARRIVED (GCWTL-PRE-ARRIVED is true)
Then The system sets the working status to PRE-ARRIVAL-STATUS
R-GCX015-cbl-00107 Set REVIEW-COMPLETED Status
Action Rules
📊 Business Logic Narrative
When the process 'Set REVIEW-COMPLETED Status' is invoked, and assuming that a train has positive acceptance count and zero rejections, when the train current status is review-cmpl (gcwtl-review-cmpl is true), the desired outcome is that the system sets the working status to review-completed-status.
💻 Technical Criteria
Given A train has positive acceptance count and zero rejections
When The train current status is REVIEW-CMPL (GCWTL-REVIEW-CMPL is true)
Then The system sets the working status to REVIEW-COMPLETED-STATUS
R-GCX015-cbl-00108 Set ACK Status
Action Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set ACK Status', assuming that a train has positive acceptance count and zero rejections, when the train is not in pre-arrived or review-cmpl status, the desired outcome is that the system sets the working status to ack-status.
💻 Technical Criteria
EXCLUDING A train has positive acceptance count and zero rejections
When The train is not in PRE-ARRIVED or REVIEW-CMPL status
Then The system sets the working status to ACK-STATUS
R-GCX015-cbl-00109 Set ERROR Status
Action Rules
📊 Business Logic Narrative
When the process 'Set ERROR Status' is invoked, and assuming that a k3 segment is being processed for status determination, when the k3 total reject count is greater than zero, the desired outcome is that the system sets the working status to error-status.
💻 Technical Criteria
Given A K3 segment is being processed for status determination
When The K3 total reject count is greater than zero
Then The system sets the working status to ERROR-STATUS
R-GCX015-cbl-00110 Set Primary Recipients - OM01247 as FROM and TO
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Primary Recipients - OM01247 as FROM and TO' is invoked, and assuming that an error condition has been detected and requires notification, when setting up primary error notification recipients, the desired outcome is that the system sets om01247 as both the sender (from) and primary recipient (to) for error messages.
💻 Technical Criteria
Given An error condition has been detected and requires notification
When Setting up primary error notification recipients
Then The system sets OM01247 as both the sender (FROM) and primary recipient (TO) for error messages
R-GCX015-cbl-00111 Set Secondary Recipients - From Admin Table Configuration
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Secondary Recipients - From Admin Table Configuration' is invoked, and assuming that primary error notification setup is complete, when configuring secondary error notification recipients, the desired outcome is that the system retrieves recipient identifiers from administrative table segment ad-dc-p-merlin-1 for to recipient and ad-dc-p-merlin-5 for copy recipient.
💻 Technical Criteria
Given Primary error notification setup is complete
When Configuring secondary error notification recipients
Then The system retrieves recipient identifiers from administrative table segment AD-DC-P-MERLIN-1 for TO recipient and AD-DC-P-MERLIN-5 for COPY recipient
R-GCX015-cbl-00114 Primary Send Successful?
Validation Rules
📊 Business Logic Narrative
When the process 'Primary Send Successful?' is invoked, and assuming that primary error notification has been transmitted via emcsend2, when checking the transmission result status, the desired outcome is that the system evaluates if the notification was successful based on emi-no-errors status and proceeds to secondary notification if successful.
💻 Technical Criteria
Given Primary error notification has been transmitted via EMCSEND2
When Checking the transmission result status
Then The system evaluates if the notification was successful based on EMI-NO-ERRORS status and proceeds to secondary notification if successful
R-GCX015-cbl-00115 Call EMCSEND2 for Secondary Notification
Action Rules
📊 Business Logic Narrative
When the process 'Call EMCSEND2 for Secondary Notification' is invoked, and assuming that primary error notification was successful and secondary recipients are configured from administrative table, when transmitting the secondary error notification, the desired outcome is that the system calls emcsend2 service with administrative table recipients and the same error message content.
💻 Technical Criteria
Given Primary error notification was successful and secondary recipients are configured from administrative table
When Transmitting the secondary error notification
Then The system calls EMCSEND2 service with administrative table recipients and the same error message content
R-GCX015-cbl-00116 Secondary Send Successful?
Validation Rules
📊 Business Logic Narrative
When the process 'Secondary Send Successful?' is invoked, and assuming that secondary error notification has been transmitted via emcsend2, when checking the secondary transmission result status, the desired outcome is that the system evaluates if the secondary notification was successful based on emi-no-errors status and completes the error notification process if successful.
💻 Technical Criteria
Given Secondary error notification has been transmitted via EMCSEND2
When Checking the secondary transmission result status
Then The system evaluates if the secondary notification was successful based on EMI-NO-ERRORS status and completes the error notification process if successful
R-GCX015-cbl-00117 Handle Primary Send Failure
Action Rules
📊 Business Logic Narrative
When the process 'Handle Primary Send Failure' is invoked, and assuming that primary error notification transmission has failed, when the emcsend2 service returns a failure status for primary notification, the desired outcome is that the system triggers an abend process due to critical send failure for invalid sender, recipient, or filename conditions.
💻 Technical Criteria
Given Primary error notification transmission has failed
When The EMCSEND2 service returns a failure status for primary notification
Then The system triggers an abend process due to critical send failure for invalid sender, recipient, or filename conditions
R-GCX015-cbl-00118 Handle Secondary Send Failure
Action Rules
📊 Business Logic Narrative
When the process 'Handle Secondary Send Failure' is invoked, and assuming that secondary error notification transmission has failed, when the emcsend2 service returns a failure status for secondary notification, the desired outcome is that the system triggers an abend process due to critical send failure for invalid sender, recipient, or filename conditions.
💻 Technical Criteria
Given Secondary error notification transmission has failed
When The EMCSEND2 service returns a failure status for secondary notification
Then The system triggers an abend process due to critical send failure for invalid sender, recipient, or filename conditions
R-GCX015-cbl-00119 Send Error Message via EMCSEND
Action Rules
📊 Business Logic Narrative
When the process 'Send Error Message via EMCSEND' is invoked, and assuming that a message processing operation has completed, when the processing resulted in an error status condition, the desired outcome is that the system sends an error notification message via emcsend service.
💻 Technical Criteria
Given A message processing operation has completed
When The processing resulted in an error status condition
Then The system sends an error notification message via EMCSEND service
R-GCX015-cbl-00120 Move Log Information to GCX105
Process Rules
📊 Business Logic Narrative
When the process 'Move Log Information to GCX105' is invoked, and assuming that a message processing operation requires logging, when log information needs to be recorded, the desired outcome is that the system populates gcx105 structure with security byte, sending transaction code, acf2 user id, processing date from machine century and k3 date, and processing time from k3 segment.
💻 Technical Criteria
Given A message processing operation requires logging
When Log information needs to be recorded
Then The system populates GCX105 structure with security byte, sending transaction code, ACF2 user ID, processing date from machine century and K3 date, and processing time from K3 segment
R-GCX015-cbl-00124 Set Action Code to 'ZZZ'
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Action Code to 'ZZZ'' is invoked, and assuming that a log entry is being prepared for transmission, when the action code needs to be set, the desired outcome is that the system sets the gcx105-action-code to 'zzz'.
💻 Technical Criteria
Given A log entry is being prepared for transmission
When The action code needs to be set
Then The system sets the GCX105-ACTION-CODE to 'ZZZ'
R-GCX015-cbl-00125 Move Status to Message Fields
Process Rules
📊 Business Logic Narrative
When the process 'Move Status to Message Fields' is invoked, and assuming that status information needs to be included in log messages, when message fields are being populated, the desired outcome is that the system moves the current ws-status to uscs-message1, uscs-message2, and uscs-message3 fields.
💻 Technical Criteria
Given Status information needs to be included in log messages
When Message fields are being populated
Then The system moves the current WS-STATUS to USCS-MESSAGE1, USCS-MESSAGE2, and USCS-MESSAGE3 fields
R-GCX015-cbl-00127 Use Train Reply Message Format
Decision Rules
📊 Business Logic Narrative
When the process 'Use Train Reply Message Format' is invoked, and assuming that a train entity is being processed and status should be updated, when the message format needs to be determined for logging, the desired outcome is that the system uses uscs-log-message2 format and moves it to gcx105-message.
💻 Technical Criteria
Given A train entity is being processed and status should be updated
When The message format needs to be determined for logging
Then The system uses USCS-LOG-MESSAGE2 format and moves it to GCX105-MESSAGE
R-GCX015-cbl-00128 Use Other Reply Message Format
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Use Other Reply Message Format', assuming that an entity is being processed but status should not be updated, when the message format needs to be determined for logging, the desired outcome is that the system uses uscs-log-message3 format, moves it to gcx105-message, and if the entity is a train with aei-send flag, performs aei status message processing.
💻 Technical Criteria
EXCLUDING An entity is being processed but status should not be updated
When The message format needs to be determined for logging
Then The system uses USCS-LOG-MESSAGE3 format, moves it to GCX105-MESSAGE, and if the entity is a train with AEI-SEND flag, performs AEI status message processing
R-GCX015-cbl-00129 Send Log via GCT1051E Transaction
Action Rules
📊 Business Logic Narrative
When the process 'Send Log via GCT1051E Transaction' is invoked, and assuming that a log entry has been prepared with all required information, when the primary log needs to be transmitted, the desired outcome is that the system calls z300-spawn-gct1051e to send the log entry using gct1051e transaction.
💻 Technical Criteria
Given A log entry has been prepared with all required information
When The primary log needs to be transmitted
Then The system calls Z300-SPAWN-GCT1051E to send the log entry using GCT1051E transaction
R-GCX015-cbl-00132 Send K1 Log Entry via GCT1051E
Action Rules
📊 Business Logic Narrative
When the process 'Send K1 Log Entry via GCT1051E' is invoked, and assuming that a k1 error log entry has been prepared, when the k1 error log needs to be transmitted, the desired outcome is that the system calls z300-spawn-gct1051e to send the k1 error log entry using gct1051e transaction.
💻 Technical Criteria
Given A K1 error log entry has been prepared
When The K1 error log needs to be transmitted
Then The system calls Z300-SPAWN-GCT1051E to send the K1 error log entry using GCT1051E transaction
R-GCX015-cbl-00136 Look Up Message in MS Table
Action Rules
📊 Business Logic Narrative
When the process 'Look Up Message in MS Table' is invoked, and assuming that a table key has been constructed for message lookup, when the system performs the table lookup, the desired outcome is that the system should set table id to 'ms', function code to 'gu', accept status to 'ge', clear return flags, and call the table lookup service.
💻 Technical Criteria
Given A table key has been constructed for message lookup
When The system performs the table lookup
Then The system should set table ID to 'MS', function code to 'GU', accept status to 'GE', clear return flags, and call the table lookup service
R-GCX015-cbl-00141 Store Message in K1 Message Array
Process Rules
📊 Business Logic Narrative
When the process 'Store Message in K1 Message Array' is invoked, and assuming that a work log message has been formatted from the processed message text, when the system stores the message for logging, the desired outcome is that the work log message should be moved to hold-k1-message array at the current k1-cnt position.
💻 Technical Criteria
Given A work log message has been formatted from the processed message text
When The system stores the message for logging
Then The work log message should be moved to HOLD-K1-MESSAGE array at the current K1-CNT position
R-GCX015-cbl-00157 Start Train Record Retrieval
Process Rules
📊 Business Logic Narrative
When the process 'Start Train Record Retrieval' is invoked, and assuming that a train record retrieval process needs to be started, when the train record retrieval section is invoked, the desired outcome is that the system should set the train found flag to true and initialize database access parameters.
💻 Technical Criteria
Given A train record retrieval process needs to be started
When The train record retrieval section is invoked
Then The system should set the train found flag to true and initialize database access parameters
R-GCX015-cbl-00158 Set Train Found Flag
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Train Found Flag' is invoked, and assuming that a train record lookup is about to be performed, when the train retrieval process begins, the desired outcome is that the system should set the train found flag to true as the default state.
💻 Technical Criteria
Given A train record lookup is about to be performed
When The train retrieval process begins
Then The system should set the train found flag to true as the default state
R-GCX015-cbl-00159 Configure Database Access Parameters
Process Rules
📊 Business Logic Narrative
When the process 'Configure Database Access Parameters' is invoked, and assuming that a train record needs to be retrieved from the database, when database access parameters are being configured, the desired outcome is that the system should set the function code to get, set root-only access, set equal search criteria, and assign the appropriate pcb.
💻 Technical Criteria
Given A train record needs to be retrieved from the database
When Database access parameters are being configured
Then The system should set the function code to GET, set root-only access, set equal search criteria, and assign the appropriate PCB
R-GCX015-cbl-00160 Set US-CUST-TRAIN-ID from Message Data
Action Rules
📊 Business Logic Narrative
When the process 'Set US-CUST-TRAIN-ID from Message Data' is invoked, and assuming that message data contains a train identifier, when setting up the database search criteria, the desired outcome is that the system should move the work message data to the train list us customer train id field.
💻 Technical Criteria
Given Message data contains a train identifier
When Setting up the database search criteria
Then The system should move the work message data to the train list US customer train ID field
R-GCX015-cbl-00161 Call Database to Get Train Record
Action Rules
📊 Business Logic Narrative
When the process 'Call Database to Get Train Record' is invoked, and assuming that database access parameters are configured and train id is set, when the database lookup is executed, the desired outcome is that the system should call the database utility program with the common communication area, database parameters, and train list structure.
💻 Technical Criteria
Given Database access parameters are configured and train ID is set
When The database lookup is executed
Then The system should call the database utility program with the common communication area, database parameters, and train list structure
R-GCX015-cbl-00162 Train Record Found?
Validation Rules
📊 Business Logic Narrative
When the process 'Train Record Found?' is invoked, and assuming that a database lookup for a train record has been executed, when checking the result of the database call, the desired outcome is that the system should evaluate if the status code is not spaces to determine if the record was found.
💻 Technical Criteria
Given A database lookup for a train record has been executed
When Checking the result of the database call
Then The system should evaluate if the status code is not spaces to determine if the record was found
R-GCX015-cbl-00163 Set Train Not Found Flag
Definitional Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set Train Not Found Flag', assuming that a train database lookup has been performed, when the database status code indicates the record was not found, the desired outcome is that the system should set the train not found flag to true.
💻 Technical Criteria
EXCLUDING A train database lookup has been performed
When The database status code indicates the record was not found
Then The system should set the train not found flag to true
R-GCX015-cbl-00165 Set Merlin Keys for Logging
Action Rules
📊 Business Logic Narrative
When the process 'Set Merlin Keys for Logging' is invoked, and assuming that a train record has been successfully retrieved from the database, when setting up logging information, the desired outcome is that the system should move the work message data to the merlin key and move the train id to the merlin sub-key.
💻 Technical Criteria
Given A train record has been successfully retrieved from the database
When Setting up logging information
Then The system should move the work message data to the Merlin key and move the train ID to the Merlin sub-key
R-GCX015-cbl-00166 Set Status to DELETED
Decision Rules
📊 Business Logic Narrative
When the process 'Set Status to DELETED' is invoked, and assuming that a train record exists with deleted status and the message contains ack status, when the train status update process is executed, the desired outcome is that the train current status should be set to deleted, security fields should be cleared, and the train record should be updated.
💻 Technical Criteria
Given A train record exists with DELETED status and the message contains ACK status
When The train status update process is executed
Then The train current status should be set to DELETED, security fields should be cleared, and the train record should be updated
R-GCX015-cbl-00167 Set Status to DELETED
Decision Rules
📊 Business Logic Narrative
When the process 'Set Status to DELETED' is invoked, and assuming that a train record exists with delete-pending status and the message contains ack status, when the train status update process is executed, the desired outcome is that the train current status should be set to deleted and the train record should be updated.
💻 Technical Criteria
Given A train record exists with DELETE-PENDING status and the message contains ACK status
When The train status update process is executed
Then The train current status should be set to DELETED and the train record should be updated
R-GCX015-cbl-00168 Set Status from Message
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set Status from Message', assuming that a train record exists that is not deleted and not delete-pending, when the train status update process is executed, the desired outcome is that the train current status should be updated with the status from the message and the train record should be updated.
💻 Technical Criteria
EXCLUDING A train record exists that is not DELETED and not DELETE-PENDING
When The train status update process is executed
Then The train current status should be updated with the status from the message and the train record should be updated
R-GCX015-cbl-00169 Process Automatic Arrival
Process Rules
📊 Business Logic Narrative
When the process 'Process Automatic Arrival' is invoked, and assuming that a train record has ack status and arrived-pending flag is set, when the train status update process completes, the desired outcome is that the automatic train arrival process should be triggered.
💻 Technical Criteria
Given A train record has ACK status and ARRIVED-PENDING flag is set
When The train status update process completes
Then The automatic train arrival process should be triggered
R-GCX015-cbl-00170 Check AEI Qualification
Action Rules
📊 Business Logic Narrative
When the process 'Check AEI Qualification' is invoked, and assuming that a train record has been updated with normal status (not deleted or delete pending), when the train status update process continues, the desired outcome is that the system should check if the train meets aei send requirements and process accordingly.
💻 Technical Criteria
Given A train record has been updated with normal status (not deleted or delete pending)
When The train status update process continues
Then The system should check if the train meets AEI send requirements and process accordingly
R-GCX015-cbl-00295 Set Status to DELETED
Decision Rules
📊 Business Logic Narrative
When the process 'Set Status to DELETED' is invoked, and assuming that a train record exists with gcwtl-deleted flag set to true, when the message processing results in ws-ack-status being true, the desired outcome is that the train current status is set to 'deleted' and security fields are cleared.
💻 Technical Criteria
Given A train record exists with GCWTL-DELETED flag set to true
When The message processing results in WS-ACK-STATUS being true
Then The train current status is set to 'DELETED' and security fields are cleared
R-GCX015-cbl-00296 Set Status to DELETED
Decision Rules
📊 Business Logic Narrative
When the process 'Set Status to DELETED' is invoked, and assuming that a train record exists with gcwtl-delete-pending flag set to true, when the message processing results in ws-ack-status being true, the desired outcome is that the train current status is set to 'deleted' and security fields are cleared.
💻 Technical Criteria
Given A train record exists with GCWTL-DELETE-PENDING flag set to true
When The message processing results in WS-ACK-STATUS being true
Then The train current status is set to 'DELETED' and security fields are cleared
R-GCX015-cbl-00298 Clear Security Fields
Process Rules
📊 Business Logic Narrative
When the process 'Clear Security Fields' is invoked, and assuming that a train record is being updated to deleted status, when the status update operation is executed, the desired outcome is that the gcwtl-secx security field is initialized to spaces.
💻 Technical Criteria
Given A train record is being updated to DELETED status
When The status update operation is executed
Then The GCWTL-SECX security field is initialized to spaces
R-GCX015-cbl-00299 Execute Database Update
Action Rules
📊 Business Logic Narrative
When the process 'Execute Database Update' is invoked, and assuming that a train record requires status or field updates, when the update operation is initiated, the desired outcome is that the system calls gccutrio with replacement function and root-only scope using the train pcb.
💻 Technical Criteria
Given A train record requires status or field updates
When The update operation is initiated
Then The system calls GCCUTRIO with replacement function and root-only scope using the train PCB
R-GCX015-cbl-00300 Check AEI Train Qualification
Action Rules
📊 Business Logic Narrative
When the process 'Check AEI Train Qualification' is invoked, and assuming that a train record has been updated successfully, when the update operation completes, the desired outcome is that the system performs aei train send qualification check to determine if additional aei processing is required.
💻 Technical Criteria
Given A train record has been updated successfully
When The update operation completes
Then The system performs AEI train send qualification check to determine if additional AEI processing is required
R-GCX015-cbl-00301 Process Automatic Train Arrival
Decision Rules
📊 Business Logic Narrative
When the process 'Process Automatic Train Arrival' is invoked, and assuming that a train record has gcwtl-ack status set to true and gcwtl-arrived-pending status set to true, when the train record update is completed, the desired outcome is that the system automatically triggers train arrival processing.
💻 Technical Criteria
Given A train record has GCWTL-ACK status set to true and GCWTL-ARRIVED-PENDING status set to true
When The train record update is completed
Then The system automatically triggers train arrival processing
R-GCX015-cbl-00177 Train Status = ACK?
Validation Rules
📊 Business Logic Narrative
When the process 'Train Status = ACK?' is invoked, and assuming that a train record exists in the system, when the system checks the train's current status for aei qualification, the desired outcome is that the train must have ack status to qualify for aei processing, otherwise it does not qualify.
💻 Technical Criteria
Given A train record exists in the system
When The system checks the train's current status for AEI qualification
Then The train must have ACK status to qualify for AEI processing, otherwise it does not qualify
R-GCX015-cbl-00178 Train Configured for AEI Send?
Decision Rules
📊 Business Logic Narrative
When the process 'Train Configured for AEI Send?' is invoked, and assuming that a train record with ack status exists, when the system evaluates the train's aei send configuration, the desired outcome is that the train must have aei-send flag set to true to proceed with full aei processing.
💻 Technical Criteria
Given A train record with ACK status exists
When The system evaluates the train's AEI send configuration
Then The train must have AEI-SEND flag set to true to proceed with full AEI processing
R-GCX015-cbl-00199 Format Train Status Message
Process Rules
📊 Business Logic Narrative
When the process 'Format Train Status Message' is invoked, and assuming that a train has a valid train id and current status that needs to be communicated, when system prepares aei status message, the desired outcome is that system formats message subject as 'train: [train-id] status: [current-status]' and clears message text content.
💻 Technical Criteria
Given A train has a valid train ID and current status that needs to be communicated
When System prepares AEI status message
Then System formats message subject as 'TRAIN: [train-id] STATUS: [current-status]' and clears message text content
R-GCX015-cbl-00200 Send Message via Merlin System
Action Rules
📊 Business Logic Narrative
When the process 'Send Message via Merlin System' is invoked, and assuming that a formatted train status message with designated recipients, when system calls merlin send service with message details, the desired outcome is that system transmits message and receives confirmation of delivery status.
💻 Technical Criteria
Given A formatted train status message with designated recipients
When System calls Merlin send service with message details
Then System transmits message and receives confirmation of delivery status
R-GCX015-cbl-00201 Retry Send to Backup Recipients
Process Rules
📊 Business Logic Narrative
When the process 'Retry Send to Backup Recipients' is invoked, and assuming that primary merlin message send has failed, when system detects send failure, the desired outcome is that system retries send operation using backup recipient list including aei9999 and om01247 as fallback recipients.
💻 Technical Criteria
Given Primary Merlin message send has failed
When System detects send failure
Then System retries send operation using backup recipient list including AEI9999 and OM01247 as fallback recipients
R-GCX015-cbl-00202 Log Send Failure Error
Process Rules
📊 Business Logic Narrative
When the process 'Log Send Failure Error' is invoked, and assuming that both primary and backup merlin message sends have failed, when system detects final send failure, the desired outcome is that system logs error message 'send to file of om01247 failed' for operational review.
💻 Technical Criteria
Given Both primary and backup Merlin message sends have failed
When System detects final send failure
Then System logs error message 'SEND TO FILE OF OM01247 FAILED' for operational review
R-GCX015-cbl-00203 Get AEI Merlin Recipients
Process Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Get AEI Merlin Recipients', assuming that aei email database query fails due to database connection or system error, when system receives database error response that is not a simple no-entry condition, the desired outcome is that system logs database error with sql code information and continues processing using default merlin id.
💻 Technical Criteria
EXCLUDING AEI email database query fails due to database connection or system error
When System receives database error response that is not a simple no-entry condition
Then System logs database error with SQL code information and continues processing using default Merlin ID
R-GCX015-cbl-00335 Set Default Merlin ID as Sender
Decision Rules
📊 Business Logic Narrative
When the process 'Set Default Merlin ID as Sender' is invoked, and assuming that aei email database query returns success status, when processing the successful query response, the desired outcome is that the system sets the default merlin id as the message sender.
💻 Technical Criteria
Given AEI email database query returns success status
When Processing the successful query response
Then The system sets the default Merlin ID as the message sender
R-GCX015-cbl-00336 Load Retrieved Email Recipients
Process Rules
📊 Business Logic Narrative
When the process 'Load Retrieved Email Recipients' is invoked, and assuming that database query was successful and returned email data, when processing the retrieved email information, the desired outcome is that the system iterates through up to 10 email addresses and loads non-blank user ids into the recipient list.
💻 Technical Criteria
Given Database query was successful and returned email data
When Processing the retrieved email information
Then The system iterates through up to 10 email addresses and loads non-blank user IDs into the recipient list
R-GCX015-cbl-00339 Send DB2 Error Alert
Decision Rules
📊 Business Logic Narrative
When the process 'Send DB2 Error Alert' is invoked, and assuming that aei email database query returns an error status other than no entry found, when a database error occurs during email lookup, the desired outcome is that the system sends a db2 error alert message and uses the default merlin id as recipient.
💻 Technical Criteria
Given AEI email database query returns an error status other than no entry found
When A database error occurs during email lookup
Then The system sends a DB2 error alert message and uses the default Merlin ID as recipient
R-GCX015-cbl-00361 Initialize Database Work Area
Process Rules
📊 Business Logic Narrative
When the process 'Initialize Database Work Area' is invoked, and assuming that aei email database query is requested, when the system begins the database lookup process, the desired outcome is that the database work area aelwrktb is initialized to clear any previous data.
💻 Technical Criteria
Given AEI email database query is requested
When the system begins the database lookup process
Then the database work area AELWRKTB is initialized to clear any previous data
R-GCX015-cbl-00363 Set Record Type to CUSEMAIL
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Record Type to CUSEMAIL' is invoked, and assuming that aei email database query is being prepared, when the system configures the database lookup parameters, the desired outcome is that the record-type is set to 'cusemail' to specify customer email record lookup.
💻 Technical Criteria
Given AEI email database query is being prepared
When the system configures the database lookup parameters
Then the RECORD-TYPE is set to 'CUSEMAIL' to specify customer email record lookup
R-GCX015-cbl-00365 Set Default Merlin ID as From User
Decision Rules
📊 Business Logic Narrative
When the process 'Set Default Merlin ID as From User' is invoked, and assuming that aei email database query returns success code cst-aei-success, when the system processes the successful query result, the desired outcome is that cst-default-merlin-id is set as emi-from-usercode and email recipients are loaded from cusemail-user-id array.
💻 Technical Criteria
Given AEI email database query returns success code CST-AEI-SUCCESS
When the system processes the successful query result
Then CST-DEFAULT-MERLIN-ID is set as EMI-FROM-USERCODE and email recipients are loaded from CUSEMAIL-USER-ID array
R-GCX015-cbl-00366 Load Email Recipients from Database
Process Rules
📊 Business Logic Narrative
When the process 'Load Email Recipients from Database' is invoked, and assuming that database query returned successfully with email user ids, when the system processes the email recipient list, the desired outcome is that up to 10 non-blank cusemail-user-id entries are moved to emi-to-usercodes array.
💻 Technical Criteria
Given database query returned successfully with email user IDs
When the system processes the email recipient list
Then up to 10 non-blank CUSEMAIL-USER-ID entries are moved to EMI-TO-USERCODES array
R-GCX015-cbl-00367 Use Default Merlin ID for To-User
Decision Rules
📊 Business Logic Narrative
When the process 'Use Default Merlin ID for To-User' is invoked, and assuming that aei email database query returns cst-aei-no-entry, when the system handles the no entry found condition, the desired outcome is that cst-default-merlin-id is set as both emi-from-usercode and emi-to-usercode.
💻 Technical Criteria
Given AEI email database query returns CST-AEI-NO-ENTRY
When the system handles the no entry found condition
Then CST-DEFAULT-MERLIN-ID is set as both EMI-FROM-USERCODE and EMI-TO-USERCODE
R-GCX015-cbl-00368 Send DB2 Error Alert
Decision Rules
📊 Business Logic Narrative
When the process 'Send DB2 Error Alert' is invoked, and assuming that aei email database query returns error code other than cst-aei-success or cst-aei-no-entry, when the system encounters a database error, the desired outcome is that b700-db2-abend procedure is performed and cst-default-merlin-id is set as emi-to-usercode.
💻 Technical Criteria
Given AEI email database query returns error code other than CST-AEI-SUCCESS or CST-AEI-NO-ENTRY
When the system encounters a database error
Then B700-DB2-ABEND procedure is performed and CST-DEFAULT-MERLIN-ID is set as EMI-TO-USERCODE
R-GCX015-cbl-00205 Train ACK Status?
Validation Rules
📊 Business Logic Narrative
When the process 'Train ACK Status?' is invoked, and assuming that a train record is being evaluated for terminal status messaging, when the system checks the train's acknowledgment status, the desired outcome is that the train must have ack status to continue with terminal status processing, otherwise terminate the process.
💻 Technical Criteria
Given A train record is being evaluated for terminal status messaging
When The system checks the train's acknowledgment status
Then The train must have ACK status to continue with terminal status processing, otherwise terminate the process
R-GCX015-cbl-00206 AEI Send Qualified?
Validation Rules
📊 Business Logic Narrative
When the process 'AEI Send Qualified?' is invoked, and assuming that a train has ack status, when the system evaluates aei send qualification, the desired outcome is that the train must have aei send flag enabled to proceed with terminal status messaging.
💻 Technical Criteria
Given A train has ACK status
When The system evaluates AEI send qualification
Then The train must have AEI send flag enabled to proceed with terminal status messaging
R-GCX015-cbl-00212 Check Train Status Conditions
Decision Rules
📊 Business Logic Narrative
When the process 'Check Train Status Conditions' is invoked, and assuming that a train record exists in the system, when the system checks the train's status for arrival processing eligibility, the desired outcome is that the train is eligible for arrival processing only if it has both ack status and arrived-pending flag set to true.
💻 Technical Criteria
Given A train record exists in the system
When The system checks the train's status for arrival processing eligibility
Then The train is eligible for arrival processing only if it has both ACK status and ARRIVED-PENDING flag set to true
R-GCX015-cbl-00213 Initialize Train Arrival Transaction
Process Rules
📊 Business Logic Narrative
When the process 'Initialize Train Arrival Transaction' is invoked, and assuming that a train is eligible for arrival processing, when the system begins creating the arrival transaction, the desired outcome is that the train arrival transaction data structure is cleared and prepared for population.
💻 Technical Criteria
Given A train is eligible for arrival processing
When The system begins creating the arrival transaction
Then The train arrival transaction data structure is cleared and prepared for population
R-GCX015-cbl-00214 Set Action Code to 'TAR'
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Action Code to 'TAR'' is invoked, and assuming that a train arrival transaction is being created, when the system sets the transaction type, the desired outcome is that the action code is set to 'tar' to indicate train arrival processing.
💻 Technical Criteria
Given A train arrival transaction is being created
When The system sets the transaction type
Then The action code is set to 'TAR' to indicate train arrival processing
R-GCX015-cbl-00215 Get Current System Date and Time
Computation Rules
📊 Business Logic Narrative
When the process 'Get Current System Date and Time' is invoked, and assuming that a train arrival transaction is being created, when the system needs to timestamp the arrival event, the desired outcome is that the current machine date and time are captured from the system.
💻 Technical Criteria
Given A train arrival transaction is being created
When The system needs to timestamp the arrival event
Then The current machine date and time are captured from the system
R-GCX015-cbl-00216 Set Event Date from Machine Date
Process Rules
📊 Business Logic Narrative
When the process 'Set Event Date from Machine Date' is invoked, and assuming that the current system date has been captured, when the system assigns the event date for the arrival transaction, the desired outcome is that the event date is set to the current machine date in yymmdd format.
💻 Technical Criteria
Given The current system date has been captured
When The system assigns the event date for the arrival transaction
Then The event date is set to the current machine date in YYMMDD format
R-GCX015-cbl-00217 Set Event Time from Machine Time
Process Rules
📊 Business Logic Narrative
When the process 'Set Event Time from Machine Time' is invoked, and assuming that the current system time has been captured, when the system assigns the event time for the arrival transaction, the desired outcome is that the event time is set to the first 4 digits of the current machine time (hhmm format).
💻 Technical Criteria
Given The current system time has been captured
When The system assigns the event time for the arrival transaction
Then The event time is set to the first 4 digits of the current machine time (HHMM format)
R-GCX015-cbl-00218 Set Train ID from US-CUST-TRAIN-ID
Process Rules
📊 Business Logic Narrative
When the process 'Set Train ID from US-CUST-TRAIN-ID' is invoked, and assuming that a train record contains a us customer train id, when the system creates the arrival transaction, the desired outcome is that the train identifier in the transaction is set to the us customer train id from the train record.
💻 Technical Criteria
Given A train record contains a US customer train ID
When The system creates the arrival transaction
Then The train identifier in the transaction is set to the US customer train ID from the train record
R-GCX015-cbl-00221 Build GCT1121E Message
Process Rules
📊 Business Logic Narrative
When the process 'Build GCT1121E Message' is invoked, and assuming that all train arrival transaction data has been populated, when the system prepares the message for transmission, the desired outcome is that the complete gct1121e message structure is built with all transaction data.
💻 Technical Criteria
Given All train arrival transaction data has been populated
When The system prepares the message for transmission
Then The complete GCT1121E message structure is built with all transaction data
R-GCX015-cbl-00223 Purge Message Queue
Process Rules
📊 Business Logic Narrative
When the process 'Purge Message Queue' is invoked, and assuming that a train arrival message has been sent to the queue, when the system completes the message transmission, the desired outcome is that the message queue is purged to clean up any temporary message data.
💻 Technical Criteria
Given A train arrival message has been sent to the queue
When The system completes the message transmission
Then The message queue is purged to clean up any temporary message data
R-GCX015-cbl-00224 Get T1 Administrative Table
Action Rules
📊 Business Logic Narrative
When the process 'Get T1 Administrative Table' is invoked, and assuming that a manifest acknowledgment needs to be processed, when the system attempts to retrieve the t1 administrative table using table id 't1', the desired outcome is that the t1 administrative table segment should be loaded for timestamp updates.
💻 Technical Criteria
Given A manifest acknowledgment needs to be processed
When The system attempts to retrieve the T1 administrative table using table ID 'T1'
Then The T1 administrative table segment should be loaded for timestamp updates
R-GCX015-cbl-00225 Send Error - Table Not Found
Validation Rules
📊 Business Logic Narrative
When the process 'Send Error - Table Not Found' is invoked, and assuming that the system is attempting to update acknowledgment timestamps, when the t1 administrative table retrieval fails with a non-zero return flag, the desired outcome is that an error message 't1 check table entry not found' should be sent and processing should terminate.
💻 Technical Criteria
Given The system is attempting to update acknowledgment timestamps
When The T1 administrative table retrieval fails with a non-zero return flag
Then An error message 'T1 CHECK TABLE ENTRY NOT FOUND' should be sent and processing should terminate
R-GCX015-cbl-00226 Update P-Type Manifest Timestamp Record Current Date/Time in T1-309-ACK
Process Rules
📊 Business Logic Narrative
When the process 'Update P-Type Manifest Timestamp Record Current Date/Time in T1-309-ACK' is invoked, and assuming that a manifest acknowledgment is being processed and the t1 administrative table is available, when the manifest type code equals 'p', the desired outcome is that the current machine date should be recorded in positions 3-6 of t1-309-ack field, the current machine century should be recorded in positions 1-2 of t1-309-ack field, and the current machine time (first 4 digits) should be recorded in positions 9-4 of t1-309-ack field.
💻 Technical Criteria
Given A manifest acknowledgment is being processed and the T1 administrative table is available
When The manifest type code equals 'P'
Then The current machine date should be recorded in positions 3-6 of T1-309-ACK field, the current machine century should be recorded in positions 1-2 of T1-309-ACK field, and the current machine time (first 4 digits) should be recorded in positions 9-4 of T1-309-ACK field
R-GCX015-cbl-00227 Update H-Type Manifest Timestamp Record Current Date/Time in T1-353-ACK
Process Rules
📊 Business Logic Narrative
When the process 'Update H-Type Manifest Timestamp Record Current Date/Time in T1-353-ACK' is invoked, and assuming that a manifest acknowledgment is being processed and the t1 administrative table is available, when the manifest type code equals 'h', the desired outcome is that the current machine date should be recorded in positions 3-6 of t1-353-ack field, the current machine century should be recorded in positions 1-2 of t1-353-ack field, and the current machine time (first 4 digits) should be recorded in positions 9-4 of t1-353-ack field.
💻 Technical Criteria
Given A manifest acknowledgment is being processed and the T1 administrative table is available
When The manifest type code equals 'H'
Then The current machine date should be recorded in positions 3-6 of T1-353-ACK field, the current machine century should be recorded in positions 1-2 of T1-353-ACK field, and the current machine time (first 4 digits) should be recorded in positions 9-4 of T1-353-ACK field
R-GCX015-cbl-00228 Update S-Type Manifest Timestamp Record Current Date/Time in T1-358-ACK
Process Rules
📊 Business Logic Narrative
When the process 'Update S-Type Manifest Timestamp Record Current Date/Time in T1-358-ACK' is invoked, and assuming that a manifest acknowledgment is being processed and the t1 administrative table is available, when the manifest type code equals 's', the desired outcome is that the current machine date should be recorded in positions 3-6 of t1-358-ack field, the current machine century should be recorded in positions 1-2 of t1-358-ack field, and the current machine time (first 4 digits) should be recorded in positions 9-4 of t1-358-ack field.
💻 Technical Criteria
Given A manifest acknowledgment is being processed and the T1 administrative table is available
When The manifest type code equals 'S'
Then The current machine date should be recorded in positions 3-6 of T1-358-ACK field, the current machine century should be recorded in positions 1-2 of T1-358-ACK field, and the current machine time (first 4 digits) should be recorded in positions 9-4 of T1-358-ACK field
R-GCX015-cbl-00229 Save Updated Administrative Table
Action Rules
📊 Business Logic Narrative
When the process 'Save Updated Administrative Table' is invoked, and assuming that acknowledgment timestamps have been updated in the t1 administrative table segment, when the timestamp update process is complete, the desired outcome is that the updated t1 administrative table segment should be saved using the repl function code to persist the changes.
💻 Technical Criteria
Given Acknowledgment timestamps have been updated in the T1 administrative table segment
When The timestamp update process is complete
Then The updated T1 administrative table segment should be saved using the REPL function code to persist the changes
R-GCX015-cbl-00230 Get T1 Table Segment
Validation Rules
📊 Business Logic Narrative
When the process 'Get T1 Table Segment' is invoked, and assuming that a request to update administrative table t1 is initiated, when the system attempts to retrieve the t1 table segment, the desired outcome is that the system must verify the table is found and accessible for updates.
💻 Technical Criteria
Given A request to update administrative table T1 is initiated
When The system attempts to retrieve the T1 table segment
Then The system must verify the table is found and accessible for updates
R-GCX015-cbl-00231 Send Error - Table Not Found
Action Rules
📊 Business Logic Narrative
When the process 'Send Error - Table Not Found' is invoked, and assuming that a request to update administrative table t1 is made, when the t1 table segment cannot be found or accessed, the desired outcome is that the system must send an error message indicating the table entry was not found and terminate the update process.
💻 Technical Criteria
Given A request to update administrative table T1 is made
When The T1 table segment cannot be found or accessed
Then The system must send an error message indicating the table entry was not found and terminate the update process
R-GCX015-cbl-00233 Update P-Type Manifest Timestamp
Process Rules
📊 Business Logic Narrative
When the process 'Update P-Type Manifest Timestamp' is invoked, and assuming that a p-type manifest message has been processed successfully, when the system updates the t1 administrative table, the desired outcome is that the system must set the t1-309-ack field with the current system date and time (century, date, and time components).
💻 Technical Criteria
Given A P-type manifest message has been processed successfully
When The system updates the T1 administrative table
Then The system must set the T1-309-ACK field with the current system date and time (century, date, and time components)
R-GCX015-cbl-00234 Update H-Type Manifest Timestamp
Process Rules
📊 Business Logic Narrative
When the process 'Update H-Type Manifest Timestamp' is invoked, and assuming that an h-type manifest message has been processed successfully, when the system updates the t1 administrative table, the desired outcome is that the system must set the t1-353-ack field with the current system date and time (century, date, and time components).
💻 Technical Criteria
Given An H-type manifest message has been processed successfully
When The system updates the T1 administrative table
Then The system must set the T1-353-ACK field with the current system date and time (century, date, and time components)
R-GCX015-cbl-00235 Update S-Type Manifest Timestamp
Process Rules
📊 Business Logic Narrative
When the process 'Update S-Type Manifest Timestamp' is invoked, and assuming that an s-type manifest message has been processed successfully, when the system updates the t1 administrative table, the desired outcome is that the system must set the t1-358-ack field with the current system date and time (century, date, and time components).
💻 Technical Criteria
Given An S-type manifest message has been processed successfully
When The system updates the T1 administrative table
Then The system must set the T1-358-ACK field with the current system date and time (century, date, and time components)
R-GCX015-cbl-00236 Save Updated T1 Table Segment
Action Rules
📊 Business Logic Narrative
When the process 'Save Updated T1 Table Segment' is invoked, and assuming that the t1 administrative table segment has been updated with manifest acknowledgment timestamps, when the system completes the timestamp update process, the desired outcome is that the system must save the modified t1 table segment back to the administrative table storage.
💻 Technical Criteria
Given The T1 administrative table segment has been updated with manifest acknowledgment timestamps
When The system completes the timestamp update process
Then The system must save the modified T1 table segment back to the administrative table storage
R-GCX015-cbl-00240 Send Successful?
Validation Rules
📊 Business Logic Narrative
When the process 'Send Successful?' is invoked, and assuming that primary merlin transmission has been attempted, when checking transmission success status, the desired outcome is that if emi-no-errors condition is true, consider transmission successful, otherwise handle as failure.
💻 Technical Criteria
Given Primary Merlin transmission has been attempted
When Checking transmission success status
Then If EMI-NO-ERRORS condition is true, consider transmission successful, otherwise handle as failure
R-GCX015-cbl-00241 Handle Send Failure
Decision Rules
📊 Business Logic Narrative
When the process 'Handle Send Failure' is invoked, and assuming that primary merlin transmission has failed, when handling send failure conditions, the desired outcome is that if emi-from-not-found, set error message 'emi - invalid merlin from' and perform abend; if emi-to-or-copy-not-found, set error message 'emi - invalid merlin to or copy' and perform abend; if emi-filename-invalid, set error message 'emi - invalid merlin filename' and perform abend.
💻 Technical Criteria
Given Primary Merlin transmission has failed
When Handling send failure conditions
Then If EMI-FROM-NOT-FOUND, set error message 'EMI - INVALID MERLIN FROM' and perform abend; If EMI-TO-OR-COPY-NOT-FOUND, set error message 'EMI - INVALID MERLIN TO OR COPY' and perform abend; If EMI-FILENAME-INVALID, set error message 'EMI - INVALID MERLIN FILENAME' and perform abend
R-GCX015-cbl-00244 Admin Send Successful?
Validation Rules
📊 Business Logic Narrative
When the process 'Admin Send Successful?' is invoked, and assuming that administrative merlin transmission has been attempted, when checking administrative transmission success status, the desired outcome is that if emi-no-errors condition is true, consider administrative transmission successful, otherwise handle as failure.
💻 Technical Criteria
Given Administrative Merlin transmission has been attempted
When Checking administrative transmission success status
Then If EMI-NO-ERRORS condition is true, consider administrative transmission successful, otherwise handle as failure
R-GCX015-cbl-00245 Retry with Fallback Recipients
Decision Rules
📊 Business Logic Narrative
When the process 'Retry with Fallback Recipients' is invoked, and assuming that administrative merlin transmission has failed, when handling administrative send failure conditions, the desired outcome is that if emi-from-not-found, set error message 'emi - invalid merlin from' and perform abend; if emi-to-or-copy-not-found, set error message 'emi - invalid merlin to or copy' and perform abend; if emi-filename-invalid, set error message 'emi - invalid merlin filename' and perform abend.
💻 Technical Criteria
Given Administrative Merlin transmission has failed
When Handling administrative send failure conditions
Then If EMI-FROM-NOT-FOUND, set error message 'EMI - INVALID MERLIN FROM' and perform abend; If EMI-TO-OR-COPY-NOT-FOUND, set error message 'EMI - INVALID MERLIN TO OR COPY' and perform abend; If EMI-FILENAME-INVALID, set error message 'EMI - INVALID MERLIN FILENAME' and perform abend
R-GCX015-cbl-00246 Prepare AEI Status Message
Process Rules
📊 Business Logic Narrative
When the process 'Prepare AEI Status Message' is invoked, and assuming that train processing is complete and aei send flag is set, when preparing aei status message, the desired outcome is that format subject line with 'train: ' followed by train id and ' status: ' followed by current status, then prepare message for merlin transmission.
💻 Technical Criteria
Given Train processing is complete and AEI send flag is set
When Preparing AEI status message
Then Format subject line with 'TRAIN: ' followed by train ID and ' STATUS: ' followed by current status, then prepare message for Merlin transmission
R-GCX015-cbl-00248 Send AEI Status to Merlin
Action Rules
📊 Business Logic Narrative
When the process 'Send AEI Status to Merlin' is invoked, and assuming that aei merlin recipients are retrieved and status message is prepared, when transmitting aei status to merlin, the desired outcome is that call emcsend3 service with aei recipients, formatted subject line, and message content for transmission.
💻 Technical Criteria
Given AEI Merlin recipients are retrieved and status message is prepared
When Transmitting AEI status to Merlin
Then Call EMCSEND3 service with AEI recipients, formatted subject line, and message content for transmission
R-GCX015-cbl-00249 AEI Send Successful?
Validation Rules
📊 Business Logic Narrative
When the process 'AEI Send Successful?' is invoked, and assuming that aei status transmission has been attempted, when checking aei transmission success status, the desired outcome is that if emi-no-errors condition is true, consider aei transmission successful, otherwise handle as failure.
💻 Technical Criteria
Given AEI status transmission has been attempted
When Checking AEI transmission success status
Then If EMI-NO-ERRORS condition is true, consider AEI transmission successful, otherwise handle as failure
R-GCX015-cbl-00250 Retry AEI Send with Fallbacks
Decision Rules
📊 Business Logic Narrative
When the process 'Retry AEI Send with Fallbacks' is invoked, and assuming that aei status transmission has failed, when retrying aei send with fallback recipients, the desired outcome is that clear existing recipients, set fallback recipients to 'aei9999' and 'om01247', retry emcsend3 call with fallback configuration.
💻 Technical Criteria
Given AEI status transmission has failed
When Retrying AEI send with fallback recipients
Then Clear existing recipients, set fallback recipients to 'AEI9999' and 'OM01247', retry EMCSEND3 call with fallback configuration
R-GCX015-cbl-00251 AEI Retry Successful?
Validation Rules
📊 Business Logic Narrative
When the process 'AEI Retry Successful?' is invoked, and assuming that aei retry transmission has been attempted with fallback recipients, when checking aei retry success status, the desired outcome is that if emi-no-errors condition is true, consider retry successful; if still failing, set error message 'send to file of om01247 failed' and call cerr for error handling.
💻 Technical Criteria
Given AEI retry transmission has been attempted with fallback recipients
When Checking AEI retry success status
Then If EMI-NO-ERRORS condition is true, consider retry successful; If still failing, set error message 'SEND TO FILE OF OM01247 FAILED' and call CERR for error handling
R-GCX015-cbl-00345 Set To User Code from Admin Table MERLIN-1
Definitional Rules
📊 Business Logic Narrative
When the process 'Set To User Code from Admin Table MERLIN-1' is invoked, and assuming that primary transmission was successful and secondary transmission is required, when setting up secondary recipient information, the desired outcome is that the to user code should be retrieved from admin table field gcstbrt-ad-dc-p-merlin-1.
💻 Technical Criteria
Given Primary transmission was successful and secondary transmission is required
When Setting up secondary recipient information
Then The to user code should be retrieved from admin table field GCSTBRT-AD-DC-P-MERLIN-1
R-GCX015-cbl-00346 Set Copy User Code from Admin Table MERLIN-5
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Copy User Code from Admin Table MERLIN-5' is invoked, and assuming that secondary transmission is being configured, when setting copy recipient information, the desired outcome is that the copy user code should be retrieved from admin table field gcstbrt-ad-dc-p-merlin-5.
💻 Technical Criteria
Given Secondary transmission is being configured
When Setting copy recipient information
Then The copy user code should be retrieved from admin table field GCSTBRT-AD-DC-P-MERLIN-5
R-GCX015-cbl-00369 Set From User to OM01247
Definitional Rules
📊 Business Logic Narrative
When the process 'Set From User to OM01247' is invoked, and assuming that a merlin message needs to be sent, when setting up the primary message transmission, the desired outcome is that the from user code should be set to om01247.
💻 Technical Criteria
Given A Merlin message needs to be sent
When Setting up the primary message transmission
Then The from user code should be set to OM01247
R-GCX015-cbl-00372 Call EMCSEND2 for Primary Send
Action Rules
📊 Business Logic Narrative
When the process 'Call EMCSEND2 for Primary Send' is invoked, and assuming that a merlin message has been fully configured with sender, recipient, and subject, when executing the message transmission, the desired outcome is that the emcsend2 service should be called with all message parameters.
💻 Technical Criteria
Given A Merlin message has been fully configured with sender, recipient, and subject
When Executing the message transmission
Then The EMCSEND2 service should be called with all message parameters
R-GCX015-cbl-00373 Purge Message Queue
Process Rules
📊 Business Logic Narrative
When the process 'Purge Message Queue' is invoked, and assuming that a merlin message has been successfully transmitted, when the transmission completes without errors, the desired outcome is that the message queue should be purged to clean up resources.
💻 Technical Criteria
Given A Merlin message has been successfully transmitted
When The transmission completes without errors
Then The message queue should be purged to clean up resources
R-GCX015-cbl-00374 Send Invalid From User Error
Validation Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Send Invalid From User Error', assuming that a merlin message transmission has failed, when the failure is due to an invalid sender user identification, the desired outcome is that an invalid merlin sender error message should be generated and the process should terminate abnormally.
💻 Technical Criteria
EXCLUDING A Merlin message transmission has failed
When The failure is due to an invalid sender user identification
Then An invalid Merlin sender error message should be generated and the process should terminate abnormally
R-GCX015-cbl-00375 Send Invalid To/Copy User Error
Validation Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Send Invalid To/Copy User Error', assuming that a merlin message transmission has failed, when the failure is due to an invalid recipient or copy user identification, the desired outcome is that an invalid merlin recipient or copy user error message should be generated and the process should terminate abnormally.
💻 Technical Criteria
EXCLUDING A Merlin message transmission has failed
When The failure is due to an invalid recipient or copy user identification
Then An invalid Merlin recipient or copy user error message should be generated and the process should terminate abnormally
R-GCX015-cbl-00376 Send Invalid Filename Error
Validation Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Send Invalid Filename Error', assuming that a merlin message transmission has failed, when the failure is due to an invalid filename, the desired outcome is that an invalid merlin filename error message should be generated and the process should terminate abnormally.
💻 Technical Criteria
EXCLUDING A Merlin message transmission has failed
When The failure is due to an invalid filename
Then An invalid Merlin filename error message should be generated and the process should terminate abnormally
R-GCX015-cbl-00379 Get Admin Table Recipients
Action Rules
📊 Business Logic Narrative
When the process 'Get Admin Table Recipients' is invoked, and assuming that secondary merlin send requires recipient configuration, when administrative table recipients need to be assigned, the desired outcome is that primary recipient is set from admin table dc-p-merlin-1 field and copy recipient is set from admin table dc-p-merlin-5 field.
💻 Technical Criteria
Given Secondary Merlin send requires recipient configuration
When Administrative table recipients need to be assigned
Then Primary recipient is set from admin table DC-P-MERLIN-1 field and copy recipient is set from admin table DC-P-MERLIN-5 field
R-GCX015-cbl-00382 Purge Message Queue
Process Rules
📊 Business Logic Narrative
When the process 'Purge Message Queue' is invoked, and assuming that secondary merlin send has been executed, when the send operation completes without errors (emi-no-errors), the desired outcome is that the message queue is purged using cims with purg function.
💻 Technical Criteria
Given Secondary Merlin send has been executed
When The send operation completes without errors (EMI-NO-ERRORS)
Then The message queue is purged using CIMS with PURG function
R-GCX015-cbl-00253 Handle Queue Close Error
Decision Rules
📊 Business Logic Narrative
When the process 'Handle Queue Close Error' is invoked, and assuming that message queue closure is attempted, when queue closure fails with error condition, the desired outcome is that system captures error details and initiates error handling process.
💻 Technical Criteria
Given Message queue closure is attempted
When Queue closure fails with error condition
Then System captures error details and initiates error handling process
R-GCX015-cbl-00254 Disconnect from MQ Manager
Process Rules
📊 Business Logic Narrative
When the process 'Disconnect from MQ Manager' is invoked, and assuming that message queue handle has been closed successfully, when system initiates disconnection from mq manager, the desired outcome is that connection to mq manager is terminated and messaging resources are freed.
💻 Technical Criteria
Given Message queue handle has been closed successfully
When System initiates disconnection from MQ manager
Then Connection to MQ manager is terminated and messaging resources are freed
R-GCX015-cbl-00255 Handle Disconnect Error
Decision Rules
📊 Business Logic Narrative
When the process 'Handle Disconnect Error' is invoked, and assuming that mq manager disconnection is attempted, when disconnection fails with error condition, the desired outcome is that system captures error details and initiates error handling process.
💻 Technical Criteria
Given MQ manager disconnection is attempted
When Disconnection fails with error condition
Then System captures error details and initiates error handling process
R-GCX015-cbl-00256 System Abend
Action Rules
📊 Business Logic Narrative
When the process 'System Abend' is invoked, and assuming that mq close or disconnect operation has failed, when error handling determines the error is unrecoverable, the desired outcome is that system performs abnormal termination with error details.
💻 Technical Criteria
Given MQ close or disconnect operation has failed
When Error handling determines the error is unrecoverable
Then System performs abnormal termination with error details
R-GCX015-cbl-00259 Clear Message Array
Action Rules
📊 Business Logic Narrative
When the process 'Clear Message Array' is invoked, and assuming that a special test message has been detected and administrative timestamps have been updated, when the special check processing is executed, the desired outcome is that the system should move spaces to the mqs-msg-array to clear all message data.
💻 Technical Criteria
Given A special test message has been detected and administrative timestamps have been updated
When The special check processing is executed
Then The system should move spaces to the MQS-MSG-ARRAY to clear all message data
R-GCX015-cbl-00261 Get T1 Administrative Table
Action Rules
📊 Business Logic Narrative
When the process 'Get T1 Administrative Table' is invoked, and assuming that the system needs to update administrative timestamps for acknowledgment processing, when the system attempts to retrieve the t1 administrative table using table id 't1', the desired outcome is that the t1 administrative table segment should be retrieved and made available for timestamp updates.
💻 Technical Criteria
Given The system needs to update administrative timestamps for acknowledgment processing
When The system attempts to retrieve the T1 administrative table using table ID 'T1'
Then The T1 administrative table segment should be retrieved and made available for timestamp updates
R-GCX015-cbl-00262 Table Found? -> Log Error - Table Not Found
Validation Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Table Found? -> Log Error - Table Not Found', assuming that the system is attempting to retrieve the t1 administrative table for timestamp updates, when the t1 administrative table retrieval fails and return flag is not equal to '0', the desired outcome is that the system should log an error message 't1 check table entry not found' and terminate the timestamp update process.
💻 Technical Criteria
EXCLUDING The system is attempting to retrieve the T1 administrative table for timestamp updates
When The T1 administrative table retrieval fails and return flag is not equal to '0'
Then The system should log an error message 'T1 CHECK TABLE ENTRY NOT FOUND' and terminate the timestamp update process
R-GCX015-cbl-00263 Manifest Type = 'P'? -> Update 309 ACK Timestamp
Process Rules
📊 Business Logic Narrative
When the process 'Manifest Type = 'P'? -> Update 309 ACK Timestamp' is invoked, and assuming that the t1 administrative table is available and a manifest transaction is being processed, when the manifest type code equals 'p', the desired outcome is that the system should update the 309 ack timestamp with current system date (positions 3-6), current century (positions 1-2), and current system time (positions 9-4).
💻 Technical Criteria
Given The T1 administrative table is available and a manifest transaction is being processed
When The manifest type code equals 'P'
Then The system should update the 309 ACK timestamp with current system date (positions 3-6), current century (positions 1-2), and current system time (positions 9-4)
R-GCX015-cbl-00264 Manifest Type = 'H'? -> Update 353 ACK Timestamp
Process Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Manifest Type = 'H'? -> Update 353 ACK Timestamp', assuming that the t1 administrative table is available and a manifest transaction is being processed with manifest type not equal to 'p', when the manifest type code equals 'h', the desired outcome is that the system should update the 353 ack timestamp with current system date (positions 3-6), current century (positions 1-2), and current system time (positions 9-4).
💻 Technical Criteria
EXCLUDING The T1 administrative table is available and a manifest transaction is being processed with manifest type not equal to 'P'
When The manifest type code equals 'H'
Then The system should update the 353 ACK timestamp with current system date (positions 3-6), current century (positions 1-2), and current system time (positions 9-4)
R-GCX015-cbl-00265 Manifest Type = 'S'? -> Update 358 ACK Timestamp
Process Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Manifest Type = 'S'? -> Update 358 ACK Timestamp', assuming that the t1 administrative table is available and a manifest transaction is being processed with manifest type not equal to 'p' or 'h', when the manifest type code equals 's', the desired outcome is that the system should update the 358 ack timestamp with current system date (positions 3-6), current century (positions 1-2), and current system time (positions 9-4).
💻 Technical Criteria
EXCLUDING The T1 administrative table is available and a manifest transaction is being processed with manifest type not equal to 'P' or 'H'
When The manifest type code equals 'S'
Then The system should update the 358 ACK timestamp with current system date (positions 3-6), current century (positions 1-2), and current system time (positions 9-4)
R-GCX015-cbl-00266 Save Updated Timestamps to T1 Table
Action Rules
📊 Business Logic Narrative
When the process 'Save Updated Timestamps to T1 Table' is invoked, and assuming that the t1 administrative table has been retrieved and acknowledgment timestamps have been updated based on manifest type, when all timestamp updates are complete, the desired outcome is that the system should save the updated t1 table segment back to the administrative table using replace function.
💻 Technical Criteria
Given The T1 administrative table has been retrieved and acknowledgment timestamps have been updated based on manifest type
When All timestamp updates are complete
Then The system should save the updated T1 table segment back to the administrative table using replace function

🚂 Equipment & Cargo Specs 87 logic blocks
R-GCX015-cbl-00004 3:Determine Message Type
Decision Rules
📊 Business Logic Narrative
When the process '3:Determine Message Type' is invoked, and assuming that a valid message is being processed, when m10 segment reference number starts with 'train', the desired outcome is that the message should be classified as train type, or if m10 reference number starts with 'cargo' then classify as cargo type, or if neither but m11 segment exists then extract cargo information from m11.
💻 Technical Criteria
Given A valid message is being processed
When M10 segment reference number starts with 'TRAIN'
Then The message should be classified as Train type, or if M10 reference number starts with 'CARGO' then classify as Cargo type, or if neither but M11 segment exists then extract cargo information from M11
R-GCX015-cbl-00005 Test Message?
Decision Rules
📊 Business Logic Narrative
When the process 'Test Message?' is invoked, and assuming that an m10 segment is being processed, when the table reference number equals 'traincprstesttrain0000000000' or 'cargocprs940000000000', the desired outcome is that the message should be processed as a special test case with timestamp updates to t1 table segment.
💻 Technical Criteria
Given An M10 segment is being processed
When The table reference number equals 'TRAINCPRSTESTTRAIN0000000000' or 'CARGOCPRS940000000000'
Then The message should be processed as a special test case with timestamp updates to T1 table segment
R-GCX015-cbl-00006 Train or Cargo?
Decision Rules
📊 Business Logic Narrative
When the process 'Train or Cargo?' is invoked, and assuming that a message has been classified as train or cargo, when m10 manifest type code is 'p', 'x', 'y', 't', or 's', the desired outcome is that the system should set status update flag to true, and if manifest type code is 'h' for trains, set delete status flag to true.
💻 Technical Criteria
Given A message has been classified as Train or Cargo
When M10 manifest type code is 'P', 'X', 'Y', 'T', or 'S'
Then The system should set status update flag to true, and if manifest type code is 'H' for trains, set delete status flag to true
R-GCX015-cbl-00015 18:Update Cargo Status
Decision Rules
📊 Business Logic Narrative
When the process '18:Update Cargo Status' is invoked, and assuming that cargo processing requires status update, when status is ack and saved status description is spaces, the desired outcome is that the system should set cargo ack flags, or if saved status exists, restore saved status and description, or if status is error, save current status and set error flags.
💻 Technical Criteria
Given Cargo processing requires status update
When Status is ACK and saved status description is spaces
Then The system should set cargo ACK flags, or if saved status exists, restore saved status and description, or if status is error, save current status and set error flags
R-GCX015-cbl-00017 20:Load Train Car Information
Process Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process '20:Load Train Car Information', assuming that train qualifies for aei processing, when loading car information where container indicator is not 'c', the desired outcome is that the system should load car initials, numbers, and equipment types, and determine loaded/empty status based on next car's container indicator.
💻 Technical Criteria
EXCLUDING Train qualifies for AEI processing
When Loading car information where container indicator is not 'C'
Then The system should load car initials, numbers, and equipment types, and determine loaded/empty status based on next car's container indicator
R-GCX015-cbl-00021 13:Log Message Processing
Process Rules
📊 Business Logic Narrative
When the process '13:Log Message Processing' is invoked, and assuming that message processing activities need to be logged, when creating log entries, the desired outcome is that the system should format different log messages for cargo versus train operations, and use special format when status should not be updated.
💻 Technical Criteria
Given Message processing activities need to be logged
When Creating log entries
Then The system should format different log messages for cargo versus train operations, and use special format when status should not be updated
R-GCX015-cbl-00025 Clear Working Storage Fields
Process Rules
📊 Business Logic Narrative
When the process 'Clear Working Storage Fields' is invoked, and assuming that the system is starting message processing initialization, when the initialization process begins, the desired outcome is that all working storage fields including train/cargo switches, message counters, key tables, and processing flags are cleared to spaces or initial values.
💻 Technical Criteria
Given The system is starting message processing initialization
When The initialization process begins
Then All working storage fields including train/cargo switches, message counters, key tables, and processing flags are cleared to spaces or initial values
R-GCX015-cbl-00053 Reference Number Prefix = 'CARGO'?
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Reference Number Prefix = 'CARGO'?', assuming that an m10 segment has been extracted and the reference number does not start with 'train', when the reference number (m10-12-ref-num) starts with 'cargo', the desired outcome is that the system sets the message type as cargo for processing.
💻 Technical Criteria
EXCLUDING An M10 segment has been extracted and the reference number does not start with 'TRAIN'
When The reference number (M10-12-REF-NUM) starts with 'CARGO'
Then The system sets the message type as CARGO for processing
R-GCX015-cbl-00054 Extract SCAC and Bill Number from M11
Process Rules
📊 Business Logic Narrative
When the process 'Extract SCAC and Bill Number from M11' is invoked, and assuming that the message type is unknown after checking m10 segment and an m11 segment is available, when the system processes the m11 segment, the desired outcome is that the system extracts scac code and bill number from m11 segment to build cargo identification key.
💻 Technical Criteria
Given The message type is unknown after checking M10 segment and an M11 segment is available
When The system processes the M11 segment
Then The system extracts SCAC code and bill number from M11 segment to build cargo identification key
R-GCX015-cbl-00055 Build Cargo Key from M11 Data
Computation Rules
📊 Business Logic Narrative
When the process 'Build Cargo Key from M11 Data' is invoked, and assuming that scac code and bill number have been extracted from m11 segment, when the system needs to create a cargo identification key, the desired outcome is that the system combines the scac code and bill number into a work cargo key and sets message type as cargo.
💻 Technical Criteria
Given SCAC code and bill number have been extracted from M11 segment
When The system needs to create a cargo identification key
Then The system combines the SCAC code and bill number into a work cargo key and sets message type as CARGO
R-GCX015-cbl-00056 Manifest Type = 'P', 'X', 'Y', 'T', 'S'?
Decision Rules
📊 Business Logic Narrative
When the process 'Manifest Type = 'P', 'X', 'Y', 'T', 'S'?' is invoked, and assuming that a message type has been determined (train or cargo), when the manifest type code (m10-09-manifest-typ-cde) is 'p', 'x', 'y', 't', or 's', the desired outcome is that the system sets the flag to update status during processing.
💻 Technical Criteria
Given A message type has been determined (TRAIN or CARGO)
When The manifest type code (M10-09-MANIFEST-TYP-CDE) is 'P', 'X', 'Y', 'T', or 'S'
Then The system sets the flag to update status during processing
R-GCX015-cbl-00273 Identify as CARGO Processing Prefix: 'CARGO'
Definitional Rules
📊 Business Logic Narrative
When the process 'Identify as CARGO Processing Prefix: 'CARGO'' is invoked, and assuming that an m10 segment reference number is extracted, when the reference number prefix equals 'cargo', the desired outcome is that the system sets ws-cargo flag to true and identifies the transaction for cargo processing.
💻 Technical Criteria
Given An M10 segment reference number is extracted
When The reference number prefix equals 'CARGO'
Then The system sets WS-CARGO flag to true and identifies the transaction for cargo processing
R-GCX015-cbl-00274 Mark as Unknown Type Other Prefixes
Definitional Rules
📊 Business Logic Narrative
When the process 'Mark as Unknown Type Other Prefixes' is invoked, and assuming that an m10 segment reference number is extracted, when the reference number prefix is neither 'train' nor 'cargo', the desired outcome is that the system maintains ws-unknown flag as true indicating unknown transaction type.
💻 Technical Criteria
Given An M10 segment reference number is extracted
When The reference number prefix is neither 'TRAIN' nor 'CARGO'
Then The system maintains WS-UNKNOWN flag as true indicating unknown transaction type
R-GCX015-cbl-00059 Message Type Unknown?
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Message Type Unknown?', assuming that a message is being processed for type identification, when the message type has not been determined as train or cargo, the desired outcome is that the system should proceed to check for m11 segment to identify cargo information.
💻 Technical Criteria
EXCLUDING A message is being processed for type identification
When The message type has not been determined as TRAIN or CARGO
Then The system should proceed to check for M11 segment to identify cargo information
R-GCX015-cbl-00060 M11 Segment Found?
Decision Rules
📊 Business Logic Narrative
When the process 'M11 Segment Found?' is invoked, and assuming that a message with unknown type is being processed, when the current message segment has table id equal to 'm11', the desired outcome is that the system should process the m11 segment to extract cargo information.
💻 Technical Criteria
Given A message with unknown type is being processed
When The current message segment has table ID equal to 'M11'
Then The system should process the M11 segment to extract cargo information
R-GCX015-cbl-00061 Extract SCAC Code from M11-12-SCAC
Action Rules
📊 Business Logic Narrative
When the process 'Extract SCAC Code from M11-12-SCAC' is invoked, and assuming that an m11 segment is being processed for cargo identification, when the m11 segment contains scac information in field m11-12-scac, the desired outcome is that the system should extract the scac code and store it in the work scac field.
💻 Technical Criteria
Given An M11 segment is being processed for cargo identification
When The M11 segment contains SCAC information in field M11-12-SCAC
Then The system should extract the SCAC code and store it in the work SCAC field
R-GCX015-cbl-00062 Extract Bill Number from M11-01-BOL-WB-NUM
Action Rules
📊 Business Logic Narrative
When the process 'Extract Bill Number from M11-01-BOL-WB-NUM' is invoked, and assuming that an m11 segment is being processed for cargo identification, when the m11 segment contains bill information in field m11-01-bol-wb-num, the desired outcome is that the system should extract the bill number and store it in the work bill number field.
💻 Technical Criteria
Given An M11 segment is being processed for cargo identification
When The M11 segment contains bill information in field M11-01-BOL-WB-NUM
Then The system should extract the bill number and store it in the work bill number field
R-GCX015-cbl-00063 Build Cargo Key from SCAC and Bill Number
Computation Rules
📊 Business Logic Narrative
When the process 'Build Cargo Key from SCAC and Bill Number' is invoked, and assuming that scac code and bill number have been extracted from m11 segment, when both scac and bill number values are available, the desired outcome is that the system should combine the scac and bill number into a work cargo key and store it as the m10-12 data for processing.
💻 Technical Criteria
Given SCAC code and bill number have been extracted from M11 segment
When Both SCAC and bill number values are available
Then The system should combine the SCAC and bill number into a work cargo key and store it as the M10-12 data for processing
R-GCX015-cbl-00064 Set Message Type as Cargo
Action Rules
📊 Business Logic Narrative
When the process 'Set Message Type as Cargo' is invoked, and assuming that cargo key has been successfully built from m11 segment information, when the cargo identification process is complete, the desired outcome is that the system should set the message type indicator to cargo for subsequent processing.
💻 Technical Criteria
Given Cargo key has been successfully built from M11 segment information
When The cargo identification process is complete
Then The system should set the message type indicator to CARGO for subsequent processing
R-GCX015-cbl-00078 Test Cargo Message CARGOCPRS940000000000
Decision Rules
📊 Business Logic Narrative
When the process 'Test Cargo Message CARGOCPRS940000000000' is invoked, and assuming that a message queue entry contains an m10 segment with table id 'm10', when the m10 table reference number equals 'cargocprs940000000000', the desired outcome is that the system performs special check processing, clears the message array, sets end processing flag, and terminates current message processing.
💻 Technical Criteria
Given A message queue entry contains an M10 segment with table ID 'M10'
When The M10 table reference number equals 'CARGOCPRS940000000000'
Then The system performs special check processing, clears the message array, sets end processing flag, and terminates current message processing
R-GCX015-cbl-00081 Continue Normal Processing
Process Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Continue Normal Processing', assuming that a message queue entry contains an m10 segment with table id 'm10', when the m10 table reference number is not 'traincprstesttrain0000000000' and not 'cargocprs940000000000', the desired outcome is that the system proceeds with normal m10 segment processing workflow.
💻 Technical Criteria
EXCLUDING A message queue entry contains an M10 segment with table ID 'M10'
When The M10 table reference number is not 'TRAINCPRSTESTTRAIN0000000000' and not 'CARGOCPRS940000000000'
Then The system proceeds with normal M10 segment processing workflow
R-GCX015-cbl-00099 Set ACK Status
Action Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set ACK Status', assuming that a transaction has zero rejects and positive accepts, and is either cargo or train not in special states, when the system sets the final processing status, the desired outcome is that the status is set to ack to indicate successful transaction acknowledgment.
💻 Technical Criteria
EXCLUDING A transaction has zero rejects and positive accepts, and is either cargo or train not in special states
When The system sets the final processing status
Then The status is set to ACK to indicate successful transaction acknowledgment
R-GCX015-cbl-00102 Total Rejects = 0?
Decision Rules
📊 Business Logic Narrative
When the process 'Total Rejects = 0?' is invoked, and assuming that a k3 segment is being processed for train or cargo status, when the k3 total reject count is greater than zero, the desired outcome is that the system sets the status to error and stops further acceptance processing.
💻 Technical Criteria
Given A K3 segment is being processed for train or cargo status
When The K3 total reject count is greater than zero
Then The system sets the status to ERROR and stops further acceptance processing
R-GCX015-cbl-00121 Set Train or Cargo Identifier
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Train or Cargo Identifier' is invoked, and assuming that a shipment entity needs to be logged, when the entity type needs to be identified for logging purposes, the desired outcome is that the system sets the train or cargo identifier in the gcx105 structure using the work m10-12 data.
💻 Technical Criteria
Given A shipment entity needs to be logged
When The entity type needs to be identified for logging purposes
Then The system sets the train or cargo identifier in the GCX105 structure using the work M10-12 data
R-GCX015-cbl-00123 Set US-CARGO Flag
Action Rules
📊 Business Logic Narrative
When the process 'Set US-CARGO Flag' is invoked, and assuming that the entity being processed is identified as cargo, when the entity type flag needs to be set for logging, the desired outcome is that the system sets the gcx105-us-cargo flag to true.
💻 Technical Criteria
Given The entity being processed is identified as cargo
When The entity type flag needs to be set for logging
Then The system sets the GCX105-US-CARGO flag to true
R-GCX015-cbl-00126 Use Manifest Reply Message Format
Decision Rules
📊 Business Logic Narrative
When the process 'Use Manifest Reply Message Format' is invoked, and assuming that a cargo entity is being processed and status should be updated, when the message format needs to be determined for logging, the desired outcome is that the system uses uscs-log-message1 format and moves it to gcx105-message.
💻 Technical Criteria
Given A cargo entity is being processed and status should be updated
When The message format needs to be determined for logging
Then The system uses USCS-LOG-MESSAGE1 format and moves it to GCX105-MESSAGE
R-GCX015-cbl-00131 Set Message Details for K1 Entry
Process Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set Message Details for K1 Entry', assuming that a k1 error message exists and is not spaces, when an individual k1 log entry needs to be prepared, the desired outcome is that the system moves log information to gcx105, sets the train or cargo identifier, sets the appropriate entity type flag, sets action code to 'zzz', and moves the specific k1 message to gcx105-message.
💻 Technical Criteria
EXCLUDING A K1 error message exists and is not spaces
When An individual K1 log entry needs to be prepared
Then The system moves log information to GCX105, sets the train or cargo identifier, sets the appropriate entity type flag, sets action code to 'ZZZ', and moves the specific K1 message to GCX105-MESSAGE
R-GCX015-cbl-00148 Set Cargo Found Flag
Action Rules
📊 Business Logic Narrative
When the process 'Set Cargo Found Flag' is invoked, and assuming that the system is starting cargo record retrieval process, when the cargo retrieval operation begins, the desired outcome is that the cargo found flag (88-uscargo-train-found) should be set to true.
💻 Technical Criteria
Given The system is starting cargo record retrieval process
When The cargo retrieval operation begins
Then The cargo found flag (88-USCARGO-TRAIN-FOUND) should be set to true
R-GCX015-cbl-00149 Initialize Cargo Segment
Process Rules
📊 Business Logic Narrative
When the process 'Initialize Cargo Segment' is invoked, and assuming that the system needs to retrieve cargo records from the database, when the cargo retrieval process is initiated, the desired outcome is that the cargo segment (gcsusrt-segment) should be initialized with spaces.
💻 Technical Criteria
Given The system needs to retrieve cargo records from the database
When The cargo retrieval process is initiated
Then The cargo segment (GCSUSRT-SEGMENT) should be initialized with spaces
R-GCX015-cbl-00150 Set Database Function to GET
Action Rules
📊 Business Logic Narrative
When the process 'Set Database Function to GET' is invoked, and assuming that the system needs to retrieve cargo records from the database, when setting up the database operation parameters, the desired outcome is that the database function should be set to get (gcwusio-func-gu) and segment type should be set to cargo segment (gcwusio-seg-gcsusrt) and index usage should be set to not used (gcwusio-index-not-used).
💻 Technical Criteria
Given The system needs to retrieve cargo records from the database
When Setting up the database operation parameters
Then The database function should be set to GET (GCWUSIO-FUNC-GU) and segment type should be set to cargo segment (GCWUSIO-SEG-GCSUSRT) and index usage should be set to not used (GCWUSIO-INDEX-NOT-USED)
R-GCX015-cbl-00152 Call Database to Get Cargo Record
Action Rules
📊 Business Logic Narrative
When the process 'Call Database to Get Cargo Record' is invoked, and assuming that the database operation parameters are configured and the search key is set, when executing the cargo record retrieval, the desired outcome is that the system should call the database interface (gccusio) with the communication control block, operation parameters, and cargo segment.
💻 Technical Criteria
Given The database operation parameters are configured and the search key is set
When Executing the cargo record retrieval
Then The system should call the database interface (GCCUSIO) with the communication control block, operation parameters, and cargo segment
R-GCX015-cbl-00153 Cargo Record Found?
Decision Rules
📊 Business Logic Narrative
When the process 'Cargo Record Found?' is invoked, and assuming that the database retrieval operation has been executed, when checking the result of the cargo record retrieval, the desired outcome is that if the status code (cc-status-code) is not spaces, the cargo record was not found, otherwise the cargo record was found successfully.
💻 Technical Criteria
Given The database retrieval operation has been executed
When Checking the result of the cargo record retrieval
Then If the status code (CC-STATUS-CODE) is not spaces, the cargo record was not found, otherwise the cargo record was found successfully
R-GCX015-cbl-00154 Set Cargo Not Found Flag
Action Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set Cargo Not Found Flag', assuming that the cargo record retrieval operation returned a non-space status code indicating record not found, when processing the failed cargo record lookup, the desired outcome is that the cargo not found flag (88-uscargo-train-notfnd) should be set to true.
💻 Technical Criteria
EXCLUDING The cargo record retrieval operation returned a non-space status code indicating record not found
When Processing the failed cargo record lookup
Then The cargo not found flag (88-USCARGO-TRAIN-NOTFND) should be set to true
R-GCX015-cbl-00156 Set Merlin Keys for Reporting
Process Rules
📊 Business Logic Narrative
When the process 'Set Merlin Keys for Reporting' is invoked, and assuming that the cargo record has been successfully retrieved from the database, when setting up reporting keys for the found cargo record, the desired outcome is that the merlin key should be set to the message data value (work-m10-12-data) and the merlin sub-key should be set to the cargo equipment car number (gcusrt-rt081-equipment-car).
💻 Technical Criteria
Given The cargo record has been successfully retrieved from the database
When Setting up reporting keys for the found cargo record
Then The Merlin key should be set to the message data value (WORK-M10-12-DATA) and the Merlin sub-key should be set to the cargo equipment car number (GCUSRT-RT081-EQUIPMENT-CAR)
R-GCX015-cbl-00171 Restore Previous Status from Save Area
Decision Rules
📊 Business Logic Narrative
When the process 'Restore Previous Status from Save Area' is invoked, and assuming that a cargo status update is being processed and the final status is ack and there is a saved status description in the save area, when the cargo status update is executed, the desired outcome is that the saved status is moved to the current uscargo status and the saved status description is moved to the current uscargo short description.
💻 Technical Criteria
Given A cargo status update is being processed AND the final status is ACK AND there is a saved status description in the save area
When The cargo status update is executed
Then The saved status is moved to the current USCARGO status AND the saved status description is moved to the current USCARGO short description
R-GCX015-cbl-00172 Set Status to USCARGO-ACK
Decision Rules
📊 Business Logic Narrative
When the process 'Set Status to USCARGO-ACK' is invoked, and assuming that a cargo status update is being processed and the final status is ack and there is no saved status description in the save area, when the cargo status update is executed, the desired outcome is that the uscargo status flag is set to ack and the uscargo short description flag is set to ack.
💻 Technical Criteria
Given A cargo status update is being processed AND the final status is ACK AND there is no saved status description in the save area
When The cargo status update is executed
Then The USCARGO status flag is set to ACK AND the USCARGO short description flag is set to ACK
R-GCX015-cbl-00173 Save Current Status to Save Area
Process Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Save Current Status to Save Area', assuming that a cargo status update is being processed and the final status is error and the current uscargo short description is not error and not ack and not ack-r, when the cargo status update is executed, the desired outcome is that the current uscargo status is moved to the save status area and the current uscargo short description is moved to the save status description area.
💻 Technical Criteria
EXCLUDING A cargo status update is being processed AND the final status is ERROR AND the current USCARGO short description is not ERROR AND not ACK AND not ACK-R
When The cargo status update is executed
Then The current USCARGO status is moved to the save status area AND the current USCARGO short description is moved to the save status description area
R-GCX015-cbl-00174 Set Cargo Status to ERROR
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set Cargo Status to ERROR', assuming that a cargo status update is being processed and the final status is error and the cpcargo status is not deleted, when the cargo status update is executed, the desired outcome is that the cpcargo status flag is set to error.
💻 Technical Criteria
EXCLUDING A cargo status update is being processed AND the final status is ERROR AND the CPCARGO status is not DELETED
When The cargo status update is executed
Then The CPCARGO status flag is set to ERROR
R-GCX015-cbl-00175 Set US Cargo Status to ERROR
Decision Rules
📊 Business Logic Narrative
When the process 'Set US Cargo Status to ERROR' is invoked, and assuming that a cargo status update is being processed and the final status is error, when the cargo status update is executed, the desired outcome is that the uscargo status flag is set to error and the uscargo short description flag is set to error.
💻 Technical Criteria
Given A cargo status update is being processed AND the final status is ERROR
When The cargo status update is executed
Then The USCARGO status flag is set to ERROR AND the USCARGO short description flag is set to ERROR
R-GCX015-cbl-00176 Update Cargo Record in Database
Action Rules
📊 Business Logic Narrative
When the process 'Update Cargo Record in Database' is invoked, and assuming that cargo status flags have been updated, when the cargo record update is requested, the desired outcome is that the gcsusrt segment is updated using replace function through the gccusio service.
💻 Technical Criteria
Given Cargo status flags have been updated
When The cargo record update is requested
Then The GCSUSRT segment is updated using replace function through the GCCUSIO service
R-GCX015-cbl-00302 Is Status ACK?
Decision Rules
📊 Business Logic Narrative
When the process 'Is Status ACK?' is invoked, and assuming that a cargo record is being processed for status update, when the system evaluates the current status type, the desired outcome is that if the status is ack, the system proceeds to check for previously saved status information, otherwise it processes as an error status.
💻 Technical Criteria
Given A cargo record is being processed for status update
When The system evaluates the current status type
Then If the status is ACK, the system proceeds to check for previously saved status information, otherwise it processes as an error status
R-GCX015-cbl-00303 Previous Status Saved?
Decision Rules
📊 Business Logic Narrative
When the process 'Previous Status Saved?' is invoked, and assuming that a cargo status is being acknowledged, when the system checks the saved status description field, the desired outcome is that if the saved status description is not empty, restore the saved status and description, otherwise set default acknowledgment flags.
💻 Technical Criteria
Given A cargo status is being acknowledged
When The system checks the saved status description field
Then If the saved status description is not empty, restore the saved status and description, otherwise set default acknowledgment flags
R-GCX015-cbl-00304 Set Status to USCARGO-ACK
Action Rules
📊 Business Logic Narrative
When the process 'Set Status to USCARGO-ACK' is invoked, and assuming that a cargo status is being acknowledged and no previous status is saved, when the system processes the acknowledgment, the desired outcome is that set both uscargo status flags to acknowledgment state.
💻 Technical Criteria
Given A cargo status is being acknowledged and no previous status is saved
When The system processes the acknowledgment
Then Set both USCARGO status flags to acknowledgment state
R-GCX015-cbl-00305 Restore Previous Status from Save Fields
Action Rules
📊 Business Logic Narrative
When the process 'Restore Previous Status from Save Fields' is invoked, and assuming that a cargo status is being acknowledged and a previous status description exists in save fields, when the system processes the acknowledgment, the desired outcome is that restore the cargo status from the saved status field and restore the status description from the saved description field.
💻 Technical Criteria
Given A cargo status is being acknowledged and a previous status description exists in save fields
When The system processes the acknowledgment
Then Restore the cargo status from the saved status field and restore the status description from the saved description field
R-GCX015-cbl-00306 Current Status is Error/ACK?
Decision Rules
📊 Business Logic Narrative
When the process 'Current Status is Error/ACK?' is invoked, and assuming that a cargo is being processed with error status, when the system evaluates the current uscargo short description status, the desired outcome is that if the current status is error, ack, or ack-r, skip saving the current status, otherwise save the current status to backup fields.
💻 Technical Criteria
Given A cargo is being processed with error status
When The system evaluates the current USCARGO short description status
Then If the current status is ERROR, ACK, or ACK-R, skip saving the current status, otherwise save the current status to backup fields
R-GCX015-cbl-00307 Save Current Status to Backup Fields
Action Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Save Current Status to Backup Fields', assuming that a cargo is being set to error status and current status is not error, ack, or ack-r, when the system processes the error status, the desired outcome is that move the current uscargo status to the saved status field and move the current uscargo short description to the saved description field.
💻 Technical Criteria
EXCLUDING A cargo is being set to error status and current status is not ERROR, ACK, or ACK-R
When The system processes the error status
Then Move the current USCARGO status to the saved status field and move the current USCARGO short description to the saved description field
R-GCX015-cbl-00308 Cargo Already Deleted?
Decision Rules
📊 Business Logic Narrative
When the process 'Cargo Already Deleted?' is invoked, and assuming that a cargo is being processed with error status, when the system evaluates the cpcargo deletion status, the desired outcome is that if the cargo is already marked as cpcargo-deleted, skip setting cpcargo-error flag, otherwise set the cpcargo-error flag.
💻 Technical Criteria
Given A cargo is being processed with error status
When The system evaluates the CPCARGO deletion status
Then If the cargo is already marked as CPCARGO-DELETED, skip setting CPCARGO-ERROR flag, otherwise set the CPCARGO-ERROR flag
R-GCX015-cbl-00309 Set Status to CPCARGO-ERROR
Action Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set Status to CPCARGO-ERROR', assuming that a cargo is being set to error status and is not already deleted, when the system processes the error status, the desired outcome is that set the cpcargo status flag to error state.
💻 Technical Criteria
EXCLUDING A cargo is being set to error status and is not already deleted
When The system processes the error status
Then Set the CPCARGO status flag to ERROR state
R-GCX015-cbl-00310 Set Status to USCARGO-ERROR
Action Rules
📊 Business Logic Narrative
When the process 'Set Status to USCARGO-ERROR' is invoked, and assuming that a cargo is being processed with error status, when the system applies error status flags, the desired outcome is that set both uscargo status flag and uscargo short description flag to error state.
💻 Technical Criteria
Given A cargo is being processed with error status
When The system applies error status flags
Then Set both USCARGO status flag and USCARGO short description flag to ERROR state
R-GCX015-cbl-00311 Execute Database Update Operation
Action Rules
📊 Business Logic Narrative
When the process 'Execute Database Update Operation' is invoked, and assuming that all cargo status fields have been modified according to business rules, when the system is ready to persist changes, the desired outcome is that execute database update operation using gccusio with segment replacement function for the cargo record.
💻 Technical Criteria
Given All cargo status fields have been modified according to business rules
When The system is ready to persist changes
Then Execute database update operation using GCCUSIO with segment replacement function for the cargo record
R-GCX015-cbl-00182 Load Train Car Information
Process Rules
📊 Business Logic Narrative
When the process 'Load Train Car Information' is invoked, and assuming that customs transaction data is set up for a qualified train, when the system loads car information from the train consist, the desired outcome is that the system must process each car excluding container indicators 'c', extract equipment initials and numbers, determine loaded/empty status based on next car's container indicator, map equipment types (lo to l, et to e), and limit processing to maximum 500 cars.
💻 Technical Criteria
Given Customs transaction data is set up for a qualified train
When The system loads car information from the train consist
Then The system must process each car excluding container indicators 'C', extract equipment initials and numbers, determine loaded/empty status based on next car's container indicator, map equipment types (LO to L, ET to E), and limit processing to maximum 500 cars
R-GCX015-cbl-00183 Send AEI Status Message
Action Rules
📊 Business Logic Narrative
When the process 'Send AEI Status Message' is invoked, and assuming that train car information has been loaded into the customs transaction, when the system submits the customs transaction, the desired outcome is that the system must call cims to change message format, call writmsgl to send the customs transaction with message code 's', and call cims to purge the transaction.
💻 Technical Criteria
Given Train car information has been loaded into the customs transaction
When The system submits the customs transaction
Then The system must call CIMS to change message format, call WRITMSGL to send the customs transaction with message code 'S', and call CIMS to purge the transaction
R-GCX015-cbl-00321 Initialize Car Counter Variables
Process Rules
📊 Business Logic Narrative
When the process 'Initialize Car Counter Variables' is invoked, and assuming that starting car information processing for a train, when initializing processing variables, the desired outcome is that car counter is set to 1, secondary counter is set to 2, and tertiary counter is set to 2.
💻 Technical Criteria
Given Starting car information processing for a train
When Initializing processing variables
Then Car counter is set to 1, secondary counter is set to 2, and tertiary counter is set to 2
R-GCX015-cbl-00322 Clear Customs Output Table
Process Rules
📊 Business Logic Narrative
When the process 'Clear Customs Output Table' is invoked, and assuming that beginning car data processing for customs transaction, when preparing the output data structure, the desired outcome is that the customs output table is cleared to spaces.
💻 Technical Criteria
Given Beginning car data processing for customs transaction
When Preparing the output data structure
Then The customs output table is cleared to spaces
R-GCX015-cbl-00323 More Cars to Process?
Process Rules
📊 Business Logic Narrative
When the process 'More Cars to Process?' is invoked, and assuming that processing cars in a train consist, when determining whether to continue processing, the desired outcome is that continue processing if current car index is within equipment quantity and car counter is 500 or less.
💻 Technical Criteria
Given Processing cars in a train consist
When Determining whether to continue processing
Then Continue processing if current car index is within equipment quantity AND car counter is 500 or less
R-GCX015-cbl-00324 Skip Container Cars
Validation Rules
📊 Business Logic Narrative
When the process 'Skip Container Cars' is invoked, and assuming that a car with container indicator in the train consist, when processing individual cars for customs data, the desired outcome is that skip the car if its container indicator is 'c'.
💻 Technical Criteria
Given A car with container indicator in the train consist
When Processing individual cars for customs data
Then Skip the car if its container indicator is 'C'
R-GCX015-cbl-00325 Copy Car Initials and Numbers
Process Rules
📊 Business Logic Narrative
When the process 'Copy Car Initials and Numbers' is invoked, and assuming that a non-container car with equipment initials and number, when building customs car data, the desired outcome is that copy equipment initials to customs car initials and convert equipment number to 6-digit format for customs car number.
💻 Technical Criteria
Given A non-container car with equipment initials and number
When Building customs car data
Then Copy equipment initials to customs car initials AND convert equipment number to 6-digit format for customs car number
R-GCX015-cbl-00326 Determine Car Load Status
Decision Rules
📊 Business Logic Narrative
When the process 'Determine Car Load Status' is invoked, and assuming that a car being processed with load/empty indicator and information about subsequent cars, when setting the car's load status for customs, the desired outcome is that if processing the last car, use its load/empty indicator; otherwise, if the next car is a container, set status to 'l' (loaded); otherwise, use current car's load/empty indicator.
💻 Technical Criteria
Given A car being processed with load/empty indicator and information about subsequent cars
When Setting the car's load status for customs
Then If processing the last car, use its load/empty indicator; otherwise, if the next car is a container, set status to 'L' (loaded); otherwise, use current car's load/empty indicator
R-GCX015-cbl-00327 Set Car Type Information
Decision Rules
📊 Business Logic Narrative
When the process 'Set Car Type Information' is invoked, and assuming that a car with equipment type designation, when setting customs car type information, the desired outcome is that if equipment type is 'lo', set car kind to 'l'; if equipment type is 'et', set car kind to 'e'; otherwise, set car kind to spaces.
💻 Technical Criteria
Given A car with equipment type designation
When Setting customs car type information
Then If equipment type is 'LO', set car kind to 'L'; if equipment type is 'ET', set car kind to 'E'; otherwise, set car kind to spaces
R-GCX015-cbl-00328 Increment Car Counter
Process Rules
📊 Business Logic Narrative
When the process 'Increment Car Counter' is invoked, and assuming that a non-container car has been processed successfully, when completing car data processing, the desired outcome is that increment the car counter by 1 and increment the tertiary counter by 1.
💻 Technical Criteria
Given A non-container car has been processed successfully
When Completing car data processing
Then Increment the car counter by 1 AND increment the tertiary counter by 1
R-GCX015-cbl-00329 Send Transaction to CIMS
Action Rules
📊 Business Logic Narrative
When the process 'Send Transaction to CIMS' is invoked, and assuming that a completed customs transaction with all car data loaded, when submitting the transaction for processing, the desired outcome is that call cims with change operation using the customs transaction code.
💻 Technical Criteria
Given A completed customs transaction with all car data loaded
When Submitting the transaction for processing
Then Call CIMS with change operation using the customs transaction code
R-GCX015-cbl-00351 Is Car a Container?
Decision Rules
📊 Business Logic Narrative
When the process 'Is Car a Container?' is invoked, and assuming that a train car is being processed for customs reporting, when the car has a container indicator of 'c', the desired outcome is that the car should be skipped and not included in the customs car records.
💻 Technical Criteria
Given A train car is being processed for customs reporting
When The car has a container indicator of 'C'
Then The car should be skipped and not included in the customs car records
R-GCX015-cbl-00352 Extract Car Initials
Process Rules
📊 Business Logic Narrative
When the process 'Extract Car Initials' is invoked, and assuming that a non-container car is being processed for customs, when the car equipment information is available, the desired outcome is that the car initials should be extracted from the equipment initials field and stored in the customs car record.
💻 Technical Criteria
Given A non-container car is being processed for customs
When The car equipment information is available
Then The car initials should be extracted from the equipment initials field and stored in the customs car record
R-GCX015-cbl-00353 Extract Car Number
Process Rules
📊 Business Logic Narrative
When the process 'Extract Car Number' is invoked, and assuming that a non-container car is being processed for customs, when the car equipment number is available, the desired outcome is that the car number should be extracted and converted to a 6-digit format for the customs car record.
💻 Technical Criteria
Given A non-container car is being processed for customs
When The car equipment number is available
Then The car number should be extracted and converted to a 6-digit format for the customs car record
R-GCX015-cbl-00354 Determine Load/Empty Status from Next Car
Decision Rules
📊 Business Logic Narrative
When the process 'Determine Load/Empty Status from Next Car' is invoked, and assuming that a car is being processed and there are more cars in the train sequence, when the next car in sequence has a container indicator of 'c', the desired outcome is that the current car's load/empty status should be set to 'l' (loaded), otherwise use the current car's load/empty status.
💻 Technical Criteria
Given A car is being processed and there are more cars in the train sequence
When The next car in sequence has a container indicator of 'C'
Then The current car's load/empty status should be set to 'L' (Loaded), otherwise use the current car's load/empty status
R-GCX015-cbl-00355 Use Current Car Load/Empty Status
Decision Rules
📊 Business Logic Narrative
When the process 'Use Current Car Load/Empty Status' is invoked, and assuming that a car is being processed and it is the last car in the train sequence, when no next car is available to check container status, the desired outcome is that the current car's own load/empty status indicator should be used for the customs record.
💻 Technical Criteria
Given A car is being processed and it is the last car in the train sequence
When No next car is available to check container status
Then The current car's own load/empty status indicator should be used for the customs record
R-GCX015-cbl-00356 Set Car Kind = 'L' for Locomotive
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Car Kind = 'L' for Locomotive' is invoked, and assuming that a car is being processed for customs reporting, when the equipment type is 'lo', the desired outcome is that the car kind should be set to 'l' to indicate locomotive.
💻 Technical Criteria
Given A car is being processed for customs reporting
When The equipment type is 'LO'
Then The car kind should be set to 'L' to indicate locomotive
R-GCX015-cbl-00357 Set Car Kind = 'E' for Engine
Definitional Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Set Car Kind = 'E' for Engine', assuming that a car is being processed for customs reporting and equipment type is not 'lo', when the equipment type is 'et', the desired outcome is that the car kind should be set to 'e' to indicate engine.
💻 Technical Criteria
EXCLUDING A car is being processed for customs reporting and equipment type is not 'LO'
When The equipment type is 'ET'
Then The car kind should be set to 'E' to indicate engine
R-GCX015-cbl-00358 Set Car Kind = Blank
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Car Kind = Blank' is invoked, and assuming that a car is being processed for customs reporting, when the equipment type is neither 'lo' nor 'et', the desired outcome is that the car kind should be set to blank spaces.
💻 Technical Criteria
Given A car is being processed for customs reporting
When The equipment type is neither 'LO' nor 'ET'
Then The car kind should be set to blank spaces
R-GCX015-cbl-00359 Build Customs Car Record
Process Rules
📊 Business Logic Narrative
When the process 'Build Customs Car Record' is invoked, and assuming that all car information has been extracted and classified, when car initials, number, load/empty status, and car kind have been determined, the desired outcome is that a complete customs car record should be built with all the processed information.
💻 Technical Criteria
Given All car information has been extracted and classified
When Car initials, number, load/empty status, and car kind have been determined
Then A complete customs car record should be built with all the processed information
R-GCX015-cbl-00360 Increment Car Counter
Process Rules
📊 Business Logic Narrative
When the process 'Increment Car Counter' is invoked, and assuming that a car record has been successfully built for customs, when the car processing is complete, the desired outcome is that the car counter should be incremented by 1 and the position counter should be incremented by 1.
💻 Technical Criteria
Given A car record has been successfully built for customs
When The car processing is complete
Then The car counter should be incremented by 1 and the position counter should be incremented by 1
R-GCX015-cbl-00186 Is Current Equipment a Container?
Decision Rules
📊 Business Logic Narrative
When the process 'Is Current Equipment a Container?' is invoked, and assuming that a train equipment record is being processed for aei customs reporting, when the equipment has a container indicator of 'c', the desired outcome is that the equipment should be skipped and the processing should move to the next equipment record.
💻 Technical Criteria
Given A train equipment record is being processed for AEI customs reporting
When The equipment has a container indicator of 'C'
Then The equipment should be skipped and the processing should move to the next equipment record
R-GCX015-cbl-00187 Extract Car Initial from Equipment
Process Rules
📊 Business Logic Narrative
When the process 'Extract Car Initial from Equipment' is invoked, and assuming that a non-container equipment record is being processed, when the equipment initial field contains valid data, the desired outcome is that the equipment initial should be moved to the customs car initial field.
💻 Technical Criteria
Given A non-container equipment record is being processed
When The equipment initial field contains valid data
Then The equipment initial should be moved to the customs car initial field
R-GCX015-cbl-00188 Extract Car Number from Equipment
Computation Rules
📊 Business Logic Narrative
When the process 'Extract Car Number from Equipment' is invoked, and assuming that a non-container equipment record with equipment number is being processed, when the equipment number field contains valid data, the desired outcome is that the equipment number should be extracted and converted to a 6-digit car number format for customs output.
💻 Technical Criteria
Given A non-container equipment record with equipment number is being processed
When The equipment number field contains valid data
Then The equipment number should be extracted and converted to a 6-digit car number format for customs output
R-GCX015-cbl-00189 Is Next Equipment a Container?
Decision Rules
📊 Business Logic Narrative
When the process 'Is Next Equipment a Container?' is invoked, and assuming that a non-container equipment record is being processed and there is a next equipment record in the sequence, when the next equipment record has a container indicator of 'c', the desired outcome is that the current equipment's loaded/empty status should be set to 'l' (loaded).
💻 Technical Criteria
Given A non-container equipment record is being processed and there is a next equipment record in the sequence
When The next equipment record has a container indicator of 'C'
Then The current equipment's loaded/empty status should be set to 'L' (Loaded)
R-GCX015-cbl-00190 Get Loaded/Empty Status from Current Car
Decision Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Get Loaded/Empty Status from Current Car', assuming that a non-container equipment record is being processed, when the next equipment record is not a container or does not exist, the desired outcome is that the current equipment's own loaded/empty status indicator should be used for customs reporting.
💻 Technical Criteria
EXCLUDING A non-container equipment record is being processed
When The next equipment record is not a container or does not exist
Then The current equipment's own loaded/empty status indicator should be used for customs reporting
R-GCX015-cbl-00191 Equipment Type = 'LO'?
Definitional Rules
📊 Business Logic Narrative
When the process 'Equipment Type = 'LO'?' is invoked, and assuming that a non-container equipment record is being processed for customs reporting, when the equipment type is 'lo', the desired outcome is that the car kind should be set to 'l' for locomotive.
💻 Technical Criteria
Given A non-container equipment record is being processed for customs reporting
When The equipment type is 'LO'
Then The car kind should be set to 'L' for locomotive
R-GCX015-cbl-00192 Equipment Type = 'ET'?
Definitional Rules
📊 Business Logic Narrative
<EXCLUSION LOGIC> For the process 'Equipment Type = 'ET'?', assuming that a non-container equipment record is being processed for customs reporting and the equipment type is not 'lo', when the equipment type is 'et', the desired outcome is that the car kind should be set to 'e' for engine.
💻 Technical Criteria
EXCLUDING A non-container equipment record is being processed for customs reporting and the equipment type is not 'LO'
When The equipment type is 'ET'
Then The car kind should be set to 'E' for engine
R-GCX015-cbl-00193 Set Car Kind as Spaces
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Car Kind as Spaces' is invoked, and assuming that a non-container equipment record is being processed for customs reporting, when the equipment type is neither 'lo' nor 'et', the desired outcome is that the car kind should be set to spaces.
💻 Technical Criteria
Given A non-container equipment record is being processed for customs reporting
When The equipment type is neither 'LO' nor 'ET'
Then The car kind should be set to spaces
R-GCX015-cbl-00194 Add Car to Customs Output Table
Process Rules
📊 Business Logic Narrative
When the process 'Add Car to Customs Output Table' is invoked, and assuming that a non-container equipment record has been processed with all required fields populated, when the car initial, number, loaded/empty status, and car kind have been determined, the desired outcome is that the complete car information should be added to the customs output table for transmission.
💻 Technical Criteria
Given A non-container equipment record has been processed with all required fields populated
When The car initial, number, loaded/empty status, and car kind have been determined
Then The complete car information should be added to the customs output table for transmission
R-GCX015-cbl-00195 Increment Car Counter
Process Rules
📊 Business Logic Narrative
When the process 'Increment Car Counter' is invoked, and assuming that a non-container equipment record has been successfully added to the customs output table, when the car information has been stored, the desired outcome is that the car counter should be incremented by 1 to maintain accurate count.
💻 Technical Criteria
Given A non-container equipment record has been successfully added to the customs output table
When The car information has been stored
Then The car counter should be incremented by 1 to maintain accurate count
R-GCX015-cbl-00196 More Equipment to Process?
Process Rules
📊 Business Logic Narrative
When the process 'More Equipment to Process?' is invoked, and assuming that equipment records are being processed for aei customs reporting, when the current equipment record processing is complete and there are more equipment records in the train consist, the desired outcome is that processing should continue with the next equipment record in sequence.
💻 Technical Criteria
Given Equipment records are being processed for AEI customs reporting
When The current equipment record processing is complete and there are more equipment records in the train consist
Then Processing should continue with the next equipment record in sequence
R-GCX015-cbl-00198 Use Default Merlin ID
Decision Rules
📊 Business Logic Narrative
When the process 'Use Default Merlin ID' is invoked, and assuming that aei email database query returns no recipients for the train's port location or database query fails with no-entry status, when system processes the empty or failed query result, the desired outcome is that system assigns default merlin id as both sender and recipient for the status message.
💻 Technical Criteria
Given AEI email database query returns no recipients for the train's port location OR database query fails with no-entry status
When System processes the empty or failed query result
Then System assigns default Merlin ID as both sender and recipient for the status message
R-GCX015-cbl-00337 Use Default Merlin ID as Recipient
Decision Rules
📊 Business Logic Narrative
When the process 'Use Default Merlin ID as Recipient' is invoked, and assuming that database query was successful but no email recipients were found, when all retrieved email addresses are blank or empty, the desired outcome is that the system uses the default merlin id as both sender and recipient.
💻 Technical Criteria
Given Database query was successful but no email recipients were found
When All retrieved email addresses are blank or empty
Then The system uses the default Merlin ID as both sender and recipient
R-GCX015-cbl-00220 Set Train Type Flag
Definitional Rules
📊 Business Logic Narrative
When the process 'Set Train Type Flag' is invoked, and assuming that a train arrival transaction is being created, when the system sets the entity type flag, the desired outcome is that the us-train flag is set to true to distinguish this from cargo processing.
💻 Technical Criteria
Given A train arrival transaction is being created
When The system sets the entity type flag
Then The US-TRAIN flag is set to true to distinguish this from cargo processing
R-GCX015-cbl-00257 Check Reference Number
Decision Rules
📊 Business Logic Narrative
When the process 'Check Reference Number' is invoked, and assuming that a message segment is being processed and it is identified as an m10 segment type, when the m10 segment reference number equals 'traincprstesttrain0000000000' or 'cargocprs940000000000', the desired outcome is that the system should clear the message array, set the end processing flag to true, and terminate message processing.
💻 Technical Criteria
Given A message segment is being processed and it is identified as an M10 segment type
When The M10 segment reference number equals 'TRAINCPRSTESTTRAIN0000000000' or 'CARGOCPRS940000000000'
Then The system should clear the message array, set the end processing flag to true, and terminate message processing
R-GCX015-cbl-00258 Update Administrative Timestamps
Process Rules
📊 Business Logic Narrative
When the process 'Update Administrative Timestamps' is invoked, and assuming that a special test message has been identified with reference number 'traincprstesttrain0000000000' or 'cargocprs940000000000', when the manifest type code in the m10 segment is 'p', 'h', or 's', the desired outcome is that the system should update the corresponding administrative table timestamp field (t1-309-ack for 'p', t1-353-ack for 'h', t1-358-ack for 's') with current machine date, century, and time.
💻 Technical Criteria
Given A special test message has been identified with reference number 'TRAINCPRSTESTTRAIN0000000000' or 'CARGOCPRS940000000000'
When The manifest type code in the M10 segment is 'P', 'H', or 'S'
Then The system should update the corresponding administrative table timestamp field (T1-309-ACK for 'P', T1-353-ACK for 'H', T1-358-ACK for 'S') with current machine date, century, and time