Complete extracted index of all Electronic Data Interchange (EDI), S309, and segment parsing behaviors across the legacy architecture.
🎯 EDI Scope Detected: Extracted 528 specific EDI behaviors out of 768 total legacy rules in CA Train.
Module: GCCIH 13 EDI Rules Found
R-GCCIH-cbl-000011:Initialize Program Control
Process Rules
Business View: Assuming a message processing operation is initiated during the '1:Initialize Program Control' routine, when the system begins message processing, the system executes logic to ensure that the current program name is saved and the module name becomes the active program identifier.
Given
A message processing operation is initiated
When
The system begins message processing
Then
The current program name is saved and the module name becomes the active program identifier
R-GCCIH-cbl-000033:Format CCN Status Message
Definitional Rules
Business View: Assuming ih notification data is prepared with security controls during the '3:Format CCN Status Message' routine, when the ccn status message is being formatted, the system executes logic to ensure that the 91-byte input data is moved to positions 2-91 of the message structure and the formatted input is copied to the message area.
Given
IH notification data is prepared with security controls
When
The CCN status message is being formatted
Then
The 91-byte input data is moved to positions 2-91 of the message structure and the formatted input is copied to the message area
R-GCCIH-cbl-000043:Format CCN Status Message
Process Rules
Business View: Assuming a ccn status message is formatted and ready for processing during the '3:Format CCN Status Message' routine, when the message is prepared for transmission, the system executes logic to ensure that the accept status is set to spaces to indicate a cleared/ready state.
Given
A CCN status message is formatted and ready for processing
When
The message is prepared for transmission
Then
The accept status is set to spaces to indicate a cleared/ready state
R-GCCIH-cbl-000054:Send Initial IMS Message
Action Rules
Business View: Assuming a formatted ccn status message with cleared accept status during the '4:Send Initial IMS Message' routine, when the message is sent for initial processing, the system executes logic to ensure that the cims service is invoked with change operation parameters to process the message.
Given
A formatted CCN status message with cleared accept status
When
The message is sent for initial processing
Then
The CIMS service is invoked with change operation parameters to process the message
R-GCCIH-cbl-000065:Write Message Log
Action Rules
Business View: Assuming a message has been processed through initial ims processing during the '5:Write Message Log' routine, when the message logging is performed, the system executes logic to ensure that the writmsgl service is invoked with message code, content, length, and module name for complete audit logging.
Given
A message has been processed through initial IMS processing
When
The message logging is performed
Then
The WRITMSGL service is invoked with message code, content, length, and module name for complete audit logging
R-GCCIH-cbl-000076:Purge IMS Message
Action Rules
Business View: Assuming a message has been processed and logged successfully during the '6:Purge IMS Message' routine, when the cleanup operation is performed, the system executes logic to ensure that the cims service is invoked with purge operation to remove the processed message from the system.
Given
A message has been processed and logged successfully
When
The cleanup operation is performed
Then
The CIMS service is invoked with purge operation to remove the processed message from the system
R-GCCIH-cbl-00015Move CCN Data to Input Structure Position 2-92
Policy Rules
Business View: Assuming a ccn status message is being prepared during the 'Move CCN Data to Input Structure Position 2-92' routine, when security initialization is performed, the system executes logic to ensure that the security byte is set to high-values indicating maximum security level.
Given
A CCN status message is being prepared
When
Security initialization is performed
Then
The security byte is set to HIGH-VALUES indicating maximum security level
R-GCCIH-cbl-00016Transfer Formatted Input to IH Message Structure
Process Rules
Business View: Assuming gcx153-input structure contains properly formatted ccn data with security byte during the 'Transfer Formatted Input to IH Message Structure' routine, when message structure transfer is initiated, the system executes logic to ensure that the complete formatted input is transferred to gct1531e-msg for ih processing.
Given
GCX153-INPUT structure contains properly formatted CCN data with security byte
When
Message structure transfer is initiated
Then
The complete formatted input is transferred to GCT1531E-MSG for IH processing
R-GCCIH-cbl-00017Execute CIMS Call with CHNG Function
Action Rules
Business View: Assuming message input data has been prepared in gcx153-input structure and accept status is cleared during the 'Execute CIMS Call with CHNG Function' routine, when system calls cims program with chng function using cccom, alt-pcb, and gct1531e parameters, the system executes logic to ensure that ims message processing is initiated for the prepared message.
Given
Message input data has been prepared in GCX153-INPUT structure and accept status is cleared
When
System calls CIMS program with CHNG function using CCCOM, ALT-PCB, and GCT1531E parameters
Then
IMS message processing is initiated for the prepared message
R-GCCIH-cbl-00018Prepare Log Parameters
Process Rules
Business View: Assuming a ccn status notification message needs to be logged during the 'Prepare Log Parameters' routine, when the system prepares logging parameters, the system executes logic to ensure that the message code, message content, message length, and module name are made available for the logging operation.
Given
A CCN status notification message needs to be logged
When
The system prepares logging parameters
Then
The message code, message content, message length, and module name are made available for the logging operation
R-GCCIH-cbl-00019Call WRITMSGL Program
Action Rules
Business View: Assuming all logging parameters are prepared for the ccn status message during the 'Call WRITMSGL Program' routine, when the system calls the writmsgl program with message code, message content, message length, and module name, the system executes logic to ensure that the writmsgl program is invoked to log the ccn status notification message.
Given
All logging parameters are prepared for the CCN status message
When
The system calls the WRITMSGL program with message code, message content, message length, and module name
Then
The WRITMSGL program is invoked to log the CCN status notification message
R-GCCIH-cbl-00020Execute PURG Function
Action Rules
Business View: Assuming message processing has been completed and logged during the 'Execute PURG Function' routine, when system initiates message cleanup process, the system executes logic to ensure that cims program is called with purg function to purge the message.
Given
Message processing has been completed and logged
When
System initiates message cleanup process
Then
CIMS program is called with PURG function to purge the message
R-GCCIH-cbl-00021Complete Message Processing
Process Rules
Business View: Assuming message has been processed and purge function has been executed during the 'Complete Message Processing' routine, when all message operations are completed, the system executes logic to ensure that system returns control to the calling program to complete the process.
Given
Message has been processed and purge function has been executed
When
All message operations are completed
Then
System returns control to the calling program to complete the process
Module: GCCS358C 274 EDI Rules Found
R-GCCS358C-cbl-00001Valid Processing Mode?
Validation Rules
Business View: Assuming an edi 358 processing request is initiated during the 'Valid Processing Mode?' routine, when the system checks the processing mode flags, the system executes logic to ensure that if none of the valid processing modes (foreground, background, or foreground-02) are set, the system sets wrong fb indicator and exits processing.
Given
An EDI 358 processing request is initiated
When
The system checks the processing mode flags
Then
If none of the valid processing modes (foreground, background, or foreground-02) are set, the system sets wrong FB indicator and exits processing
R-GCCS358C-cbl-00002Build ST Header Segment
Decision Rules
Business View: Assuming an st header segment needs to be created for edi transmission during the 'Build ST Header Segment' routine, when the system evaluates the post-emanifest flag in the train list, the system executes logic to ensure that if post-emanifest is true, set destination to 'cacustoms2-st-o', otherwise set destination to 'cacustoms-st-o'.
Given
An ST header segment needs to be created for EDI transmission
When
The system evaluates the post-emanifest flag in the train list
Then
If post-emanifest is true, set destination to 'CACUSTOMS2-ST-O', otherwise set destination to 'CACUSTOMS-ST-O'
R-GCCS358C-cbl-00003Set Transaction Purpose Code
Decision Rules
Business View: Assuming a manifest transaction is being processed during the 'Set Transaction Purpose Code' routine, when the operation type is add, the system executes logic to ensure that set the transaction purpose code to '00'.
Given
A manifest transaction is being processed
When
The operation type is ADD
Then
Set the transaction purpose code to '00'
R-GCCS358C-cbl-00004Set Transaction Purpose Code
Decision Rules
Business View: Assuming a manifest transaction is being processed during the 'Set Transaction Purpose Code' routine, when the operation type is delete, the system executes logic to ensure that set the transaction purpose code to '03'.
Given
A manifest transaction is being processed
When
The operation type is DELETE
Then
Set the transaction purpose code to '03'
R-GCCS358C-cbl-00005Set Transaction Purpose Code
Decision Rules
Business View: Assuming a manifest transaction is being processed with operation type change during the 'Set Transaction Purpose Code' routine, when the system evaluates arrival date and post-emanifest flag, the system executes logic to ensure that if arrival date is empty, set purpose code to '04' and mark as not amendment. if arrival date exists and post-emanifest is true, set purpose code to 'co' and mark as amendment. if arrival date exists and post-emanifest is false, set purpose code to '04' and mark as not amendment.
Given
A manifest transaction is being processed with operation type CHANGE
When
The system evaluates arrival date and post-emanifest flag
Then
If arrival date is empty, set purpose code to '04' and mark as not amendment. If arrival date exists and post-emanifest is true, set purpose code to 'CO' and mark as amendment. If arrival date exists and post-emanifest is false, set purpose code to '04' and mark as not amendment
R-GCCS358C-cbl-00006Determine EDI Version Processing
Process Rules
Business View: Assuming equipment processing needs to be performed for the manifest during the 'Determine EDI Version Processing' routine, when the system evaluates the post-emanifest flag, the system executes logic to ensure that if post-emanifest is true, use 5040 version processing (b231-load-vid-mbl-5040), otherwise use 4040rail version processing (b230-load-vid-mbl).
Given
Equipment processing needs to be performed for the manifest
When
The system evaluates the post-emanifest flag
Then
If post-emanifest is true, use 5040 version processing (B231-LOAD-VID-MBL-5040), otherwise use 4040RAIL version processing (B230-LOAD-VID-MBL)
R-GCCS358C-cbl-00008Set Equipment Load Status
Decision Rules
Business View: Assuming equipment is being processed in 5040 post-emanifest version during the 'Set Equipment Load Status' routine, when the system evaluates equipment load status and cargo key, the system executes logic to ensure that if equipment is loaded or (equipment is empty and has cargo key), set status to 'l'. otherwise set status to 'e'. if equipment is loaded but has no cargo key, override status to 'e'.
Given
Equipment is being processed in 5040 post-emanifest version
When
The system evaluates equipment load status and cargo key
Then
If equipment is loaded OR (equipment is empty AND has cargo key), set status to 'L'. Otherwise set status to 'E'. If equipment is loaded but has no cargo key, override status to 'E'
R-GCCS358C-cbl-00010Set Location ID for Equipment
Decision Rules
Business View: Assuming equipment has associated cargo information during the 'Set Location ID for Equipment' routine, when the system evaluates the cargo in-transit status, the system executes logic to ensure that if in-transit status is 'r', set location id to '0000'. if in-transit status is 't', set location id to the manifest-to-trans-code. for any other status, set location id to spaces.
Given
Equipment has associated cargo information
When
The system evaluates the cargo in-transit status
Then
If in-transit status is 'R', set location ID to '0000'. If in-transit status is 'T', set location ID to the manifest-to-trans-code. For any other status, set location ID to spaces
R-GCCS358C-cbl-00011Handle Flat Car Processing
Decision Rules
Business View: Assuming equipment is a possible flatcar type in post-emanifest processing during the 'Handle Flat Car Processing' routine, when the system checks subsequent equipment for container types, the system executes logic to ensure that if any subsequent container equipment is loaded or (empty with cargo key), set the flatcar status to 'l' (loaded).
Given
Equipment is a possible flatcar type in post-emanifest processing
When
The system checks subsequent equipment for container types
Then
If any subsequent container equipment is loaded OR (empty with cargo key), set the flatcar status to 'L' (loaded)
R-GCCS358C-cbl-00012Handle Special SCAC Assignment
Decision Rules
Business View: Assuming a master bill of lading segment is being created during the 'Handle Special SCAC Assignment' routine, when the system evaluates the ccn key prefix, the system executes logic to ensure that if ccn key starts with '2156', set scac to 'cffo', otherwise set scac to 'cprs'.
Given
A Master Bill of Lading segment is being created
When
The system evaluates the CCN key prefix
Then
If CCN key starts with '2156', set SCAC to 'CFFO', otherwise set SCAC to 'CPRS'
R-GCCS358C-cbl-00013Handle Revenue Transit Status
Decision Rules
Business View: Assuming cargo information indicates in-transit status of 'r' (revenue) during the 'Handle Revenue Transit Status' routine, when the system processes the master bill of lading segment, the system executes logic to ensure that set bol/waybill to 'na', set response code to 'n', and if post-emanifest, set exception code to '08'.
Given
Cargo information indicates in-transit status of 'R' (revenue)
When
The system processes the Master Bill of Lading segment
Then
Set BOL/Waybill to 'NA', set response code to 'N', and if post-emanifest, set exception code to '08'
R-GCCS358C-cbl-00014Process Haulage Rights
Decision Rules
Business View: Assuming cargo information indicates haulage rights exist during the 'Process Haulage Rights' routine, when the system processes the master bill of lading segment, the system executes logic to ensure that set scac to the haulage rights scac code and set response code to 'n'.
Given
Cargo information indicates haulage rights exist
When
The system processes the Master Bill of Lading segment
Then
Set SCAC to the haulage rights SCAC code and set response code to 'N'
R-GCCS358C-cbl-00015Build Dummy MBL Segment
Process Rules
Business View: Assuming processing is for the first equipment in an amendment scenario during the 'Build Dummy MBL Segment' routine, when no cargo key exists for the equipment but amendment processing is required, the system executes logic to ensure that create a dummy mbl segment with scac 'cprs', bol/waybill 'na', and exception code '06'.
Given
Processing is for the first equipment in an amendment scenario
When
No cargo key exists for the equipment but amendment processing is required
Then
Create a dummy MBL segment with SCAC 'CPRS', BOL/Waybill 'NA', and exception code '06'
R-GCCS358C-cbl-00016Build M13 Amendment Segment
Process Rules
Business View: Assuming amendment processing is required for the first equipment or dummy mbl scenario during the 'Build M13 Amendment Segment' routine, when the system needs to document the amendment, the system executes logic to ensure that create m13 segment with scac 'cprs', location id from station code, bol/wb number from train key, and amendment code '60'.
Given
Amendment processing is required for the first equipment or dummy MBL scenario
When
The system needs to document the amendment
Then
Create M13 segment with SCAC 'CPRS', location ID from station code, BOL/WB number from train key, and amendment code '60'
R-GCCS358C-cbl-00017Build N9 Reference Segment
Process Rules
Business View: Assuming processing is post-emanifest version and this is the first equipment during the 'Build N9 Reference Segment' routine, when the system creates reference information, the system executes logic to ensure that create n9 segment with reference qualifier '76', reference number 'edt', date from eda with machine century, time from eta with '00' seconds, and time code 'es'.
Given
Processing is post-emanifest version and this is the first equipment
When
The system creates reference information
Then
Create N9 segment with reference qualifier '76', reference number 'EDT', date from EDA with machine century, time from ETA with '00' seconds, and time code 'ES'
R-GCCS358C-cbl-00018Generate Transmission Number
Computation Rules
Business View: Assuming a transmission number needs to be generated for edi processing during the 'Generate Transmission Number' routine, when the system evaluates the processing mode, the system executes logic to ensure that if foreground mode, use prefix 147. if foreground-02 mode, use prefix 2. if background mode, use prefix 146. append machine time to create unique transmission number.
Given
A transmission number needs to be generated for EDI processing
When
The system evaluates the processing mode
Then
If foreground mode, use prefix 147. If foreground-02 mode, use prefix 2. If background mode, use prefix 146. Append machine time to create unique transmission number
R-GCCS358C-cbl-00019Retrieve Station Information
Validation Rules
Business View: Assuming station information is required for manifest processing during the 'Retrieve Station Information' routine, when the system looks up the station code in the station table, the system executes logic to ensure that if station code is not found or returns '0000', generate error message indicating station not found. otherwise, use the retrieved station information.
Given
Station information is required for manifest processing
When
The system looks up the station code in the station table
Then
If station code is not found or returns '0000', generate error message indicating station not found. Otherwise, use the retrieved station information
R-GCCS358C-cbl-00020Retrieve Cargo Information
Validation Rules
Business View: Assuming equipment has a non-empty cargo ccn key during the 'Retrieve Cargo Information' routine, when the system attempts to retrieve cargo information, the system executes logic to ensure that if cargo root is not found, generate error message indicating cargo not found for ccn. otherwise, set cargo flag to true and use retrieved cargo information.
Given
Equipment has a non-empty cargo CCN key
When
The system attempts to retrieve cargo information
Then
If cargo root is not found, generate error message indicating cargo not found for CCN. Otherwise, set cargo flag to true and use retrieved cargo information
R-GCCS358C-cbl-00021Save Current Program Name
Process Rules
Business View: Assuming an edi 358 transaction is being initiated during the 'Save Current Program Name' routine, when the system begins processing the transaction, the system executes logic to ensure that the current program name from the control block is saved to a temporary variable.
Given
An EDI 358 transaction is being initiated
When
The system begins processing the transaction
Then
The current program name from the control block is saved to a temporary variable
R-GCCS358C-cbl-00022Set Module Name in Control Block
Process Rules
Business View: Assuming the current program name has been saved during the 'Set Module Name in Control Block' routine, when the edi 358 processing begins, the system executes logic to ensure that the module name is assigned to the program field in the control block.
Given
The current program name has been saved
When
The EDI 358 processing begins
Then
The module name is assigned to the program field in the control block
R-GCCS358C-cbl-00023Check Processing Mode
Validation Rules
Business View: Assuming an edi 358 transaction is being processed during the 'Check Processing Mode' routine, when the system checks the processing mode configuration, the system executes logic to ensure that the transaction must be set for foreground, background, or foreground-02 mode, otherwise processing is terminated with an error indicator.
Given
An EDI 358 transaction is being processed
When
The system checks the processing mode configuration
Then
The transaction must be set for foreground, background, or foreground-02 mode, otherwise processing is terminated with an error indicator
R-GCCS358C-cbl-00025Continue to Main Processing
Action Rules
Business View: Assuming the processing mode validation has passed during the 'Continue to Main Processing' routine, when a valid processing mode is confirmed, the system executes logic to ensure that the aa200-358-process routine is executed to handle the edi transaction processing.
Given
The processing mode validation has passed
When
A valid processing mode is confirmed
Then
The AA200-358-PROCESS routine is executed to handle the EDI transaction processing
R-GCCS358C-cbl-00026Restore Program Name
Process Rules
Business View: Assuming edi 358 processing has completed (either successfully or with error) during the 'Restore Program Name' routine, when the system is preparing to return control to the caller, the system executes logic to ensure that the saved program name is restored to the control block program field.
Given
EDI 358 processing has completed (either successfully or with error)
When
The system is preparing to return control to the caller
Then
The saved program name is restored to the control block program field
R-GCCS358C-cbl-00027Set Prefix to 147 Foreground Mode
Decision Rules
Business View: Assuming the system is processing a train manifest transaction during the 'Set Prefix to 147 Foreground Mode' routine, when the processing mode is set to foreground (gcws358c-foreground is true), the system executes logic to ensure that the transmission prefix should be set to 147.
Given
The system is processing a train manifest transaction
When
The processing mode is set to foreground (GCWS358C-FOREGROUND is true)
Then
The transmission prefix should be set to 147
R-GCCS358C-cbl-00028Set Prefix to 2 Foreground-02 Mode
Decision Rules
Business View: <EXCLUSION CRITERIA> If the system is processing a train manifest transaction, and the processing mode is set to foreground-02 (gcws358c-foreground-02 is true) and not foreground mode occurs during the 'Set Prefix to 2 Foreground-02 Mode' routine, then the system must guarantee that the transmission prefix should be set to 2.
EXCLUDING
The system is processing a train manifest transaction
When
The processing mode is set to foreground-02 (GCWS358C-FOREGROUND-02 is true) and not foreground mode
Then
The transmission prefix should be set to 2
R-GCCS358C-cbl-00029Set Prefix to 146 Background Mode
Decision Rules
Business View: Assuming the system is processing a train manifest transaction during the 'Set Prefix to 146 Background Mode' routine, when the processing mode is neither foreground nor foreground-02 (default to background), the system executes logic to ensure that the transmission prefix should be set to 146.
Given
The system is processing a train manifest transaction
When
The processing mode is neither foreground nor foreground-02 (default to background)
Then
The transmission prefix should be set to 146
R-GCCS358C-cbl-00030Get Current Machine Time
Computation Rules
Business View: Assuming a transmission prefix has been determined based on processing mode during the 'Get Current Machine Time' routine, when the system needs to create a unique transmission number, the system executes logic to ensure that the current machine time should be retrieved and combined with the prefix to form the transmission number.
Given
A transmission prefix has been determined based on processing mode
When
The system needs to create a unique transmission number
Then
The current machine time should be retrieved and combined with the prefix to form the transmission number
R-GCCS358C-cbl-00031Set Prefix 147 for Foreground
Decision Rules
Business View: Assuming a transmission counter needs to be generated for edi processing during the 'Set Prefix 147 for Foreground' routine, when the processing mode is foreground, the system executes logic to ensure that the transmission prefix should be set to 147.
Given
A transmission counter needs to be generated for EDI processing
When
The processing mode is foreground
Then
The transmission prefix should be set to 147
R-GCCS358C-cbl-00032Set Prefix 2 for Foreground-02
Decision Rules
Business View: Assuming a transmission counter needs to be generated for edi processing during the 'Set Prefix 2 for Foreground-02' routine, when the processing mode is foreground-02, the system executes logic to ensure that the transmission prefix should be set to 2.
Given
A transmission counter needs to be generated for EDI processing
When
The processing mode is foreground-02
Then
The transmission prefix should be set to 2
R-GCCS358C-cbl-00033Set Prefix 146 for Background
Decision Rules
Business View: Assuming a transmission counter needs to be generated for edi processing during the 'Set Prefix 146 for Background' routine, when the processing mode is background, the system executes logic to ensure that the transmission prefix should be set to 146.
Given
A transmission counter needs to be generated for EDI processing
When
The processing mode is background
Then
The transmission prefix should be set to 146
R-GCCS358C-cbl-00034Use Machine Time as Counter
Computation Rules
Business View: Assuming a transmission prefix has been determined based on processing mode during the 'Use Machine Time as Counter' routine, when a transmission number needs to be generated, the system executes logic to ensure that the machine time should be used as the transmission number base.
Given
A transmission prefix has been determined based on processing mode
When
A transmission number needs to be generated
Then
The machine time should be used as the transmission number base
Business View: Assuming a transmission number has been generated during the 'Initialize A9RT Transmission Segment' routine, when creating a root transmission segment, the system executes logic to ensure that the a9rt transmission segment should be initialized to clear any previous data.
Given
A transmission number has been generated
When
Creating a root transmission segment
Then
The A9RT transmission segment should be initialized to clear any previous data
R-GCCS358C-cbl-00036Set Transaction Set to 358
Definitional Rules
Business View: Assuming a root transmission segment has been initialized during the 'Set Transaction Set to 358' routine, when setting up the transmission for customs manifest data, the system executes logic to ensure that the transaction set should be set to '358'.
Given
A root transmission segment has been initialized
When
Setting up the transmission for customs manifest data
Then
The transaction set should be set to '358'
R-GCCS358C-cbl-00037Increment Transmission Number
Validation Rules
Business View: Assuming a root transmission segment insertion has failed due to duplicate key during the 'Increment Transmission Number' routine, when the transmission number already exists in the database, the system executes logic to ensure that the transmission number should be incremented by 1 and insertion should be retried.
Given
A root transmission segment insertion has failed due to duplicate key
When
The transmission number already exists in the database
Then
The transmission number should be incremented by 1 and insertion should be retried
R-GCCS358C-cbl-00038Insert Root Segment to Database
Action Rules
Business View: Assuming a complete root transmission segment with transmission number and transaction set during the 'Insert Root Segment to Database' routine, when the segment is ready for database storage, the system executes logic to ensure that the root segment should be inserted into the gca9rt transmission database.
Given
A complete root transmission segment with transmission number and transaction set
When
The segment is ready for database storage
Then
The root segment should be inserted into the GCA9RT transmission database
R-GCCS358C-cbl-00039Initialize ST Segment Structure
Process Rules
Business View: Assuming a new edi 358 transaction needs to be created during the 'Initialize ST Segment Structure' routine, when the st segment initialization process begins, the system executes logic to ensure that the st segment definition structure is initialized and the st identifier is set to 'st'.
Given
A new EDI 358 transaction needs to be created
When
The ST segment initialization process begins
Then
The ST segment definition structure is initialized and the ST identifier is set to 'ST'
R-GCCS358C-cbl-00040Set Transaction Code to '358'
Definitional Rules
Business View: Assuming an st segment is being prepared for transmission during the 'Set Transaction Code to '358'' routine, when the transaction code needs to be assigned, the system executes logic to ensure that the transaction code is set to '358' to identify this as a customs manifest transaction.
Given
An ST segment is being prepared for transmission
When
The transaction code needs to be assigned
Then
The transaction code is set to '358' to identify this as a customs manifest transaction
R-GCCS358C-cbl-00041Check Post-Emanifest Flag
Decision Rules
Business View: Assuming an st segment is being created for transmission during the 'Check Post-Emanifest Flag' routine, when the post-emanifest flag is evaluated, the system executes logic to ensure that if post-emanifest is true, the destination is set to 'cacustoms2-st-o', otherwise the destination is set to 'cacustoms-st-o'.
Given
An ST segment is being created for transmission
When
The post-emanifest flag is evaluated
Then
If post-emanifest is true, the destination is set to 'CACUSTOMS2-ST-O', otherwise the destination is set to 'CACUSTOMS-ST-O'
R-GCCS358C-cbl-00042Prepare Segment for Transmission
Process Rules
Business View: Assuming an st segment has been fully populated with required data during the 'Prepare Segment for Transmission' routine, when the segment needs to be prepared for database insertion, the system executes logic to ensure that the st segment data is moved to the transmission data structure and the dependent segment is initialized.
Given
An ST segment has been fully populated with required data
When
The segment needs to be prepared for database insertion
Then
The ST segment data is moved to the transmission data structure and the dependent segment is initialized
R-GCCS358C-cbl-00043Insert ST Segment into Database
Action Rules
Business View: Assuming an st segment is prepared for database insertion during the 'Insert ST Segment into Database' routine, when the database insertion process is invoked, the system executes logic to ensure that the st segment is inserted into the gca9dp transmission database with proper sequencing.
Given
An ST segment is prepared for database insertion
When
The database insertion process is invoked
Then
The ST segment is inserted into the GCA9DP transmission database with proper sequencing
Business View: Assuming a new m10 manifest segment needs to be created during the 'Initialize M10 Segment Structure' routine, when the system starts building the m10 segment, the system executes logic to ensure that the m10 segment is initialized and the identifier is set to 'm10'.
Given
A new M10 manifest segment needs to be created
When
The system starts building the M10 segment
Then
The M10 segment is initialized and the identifier is set to 'M10'
R-GCCS358C-cbl-00045Set SCAC Code to 'CPRS'
Definitional Rules
Business View: Assuming an m10 manifest segment is being created during the 'Set SCAC Code to 'CPRS'' routine, when the scac code needs to be assigned, the system executes logic to ensure that the scac code is set to 'cprs'.
Given
An M10 manifest segment is being created
When
The SCAC code needs to be assigned
Then
The SCAC code is set to 'CPRS'
R-GCCS358C-cbl-00046Set Transport Type Code to 'R'
Definitional Rules
Business View: Assuming an m10 manifest segment is being created for rail transport during the 'Set Transport Type Code to 'R'' routine, when the transport type code needs to be assigned, the system executes logic to ensure that the transport type code is set to 'r' for rail.
Given
An M10 manifest segment is being created for rail transport
When
The transport type code needs to be assigned
Then
The transport type code is set to 'R' for rail
R-GCCS358C-cbl-00047Set Country Code to 'US'
Definitional Rules
Business View: Assuming an m10 manifest segment is being created during the 'Set Country Code to 'US'' routine, when the country code needs to be assigned, the system executes logic to ensure that the country code is set to 'us'.
Given
An M10 manifest segment is being created
When
The country code needs to be assigned
Then
The country code is set to 'US'
R-GCCS358C-cbl-00048Set Vessel Name from Train Key
Definitional Rules
Business View: Assuming an m10 manifest segment is being created and a train key exists during the 'Set Vessel Name from Train Key' routine, when the vessel name needs to be assigned, the system executes logic to ensure that the vessel name is set to the value from the train key.
Given
An M10 manifest segment is being created and a train key exists
When
The vessel name needs to be assigned
Then
The vessel name is set to the value from the train key
R-GCCS358C-cbl-00049Convert Current Date to Julian Format
Computation Rules
Business View: Assuming an m10 manifest segment is being created and current machine date is available during the 'Convert Current Date to Julian Format' routine, when the flight/voyage number needs to be calculated, the system executes logic to ensure that the system converts the current date from gregorian to julian format using date conversion service.
Given
An M10 manifest segment is being created and current machine date is available
When
The flight/voyage number needs to be calculated
Then
The system converts the current date from Gregorian to Julian format using date conversion service
R-GCCS358C-cbl-00051Set Manifest Type Code to 'S'
Definitional Rules
Business View: Assuming an m10 manifest segment is being created during the 'Set Manifest Type Code to 'S'' routine, when the manifest type code needs to be assigned, the system executes logic to ensure that the manifest type code is set to 's' for ship manifest.
Given
An M10 manifest segment is being created
When
The manifest type code needs to be assigned
Then
The manifest type code is set to 'S' for ship manifest
R-GCCS358C-cbl-00052Set Reference Number to 'TRAIN'
Definitional Rules
Business View: Assuming an m10 manifest segment is being created for train transport during the 'Set Reference Number to 'TRAIN'' routine, when the reference number needs to be assigned, the system executes logic to ensure that the reference number is set to 'train'.
Given
An M10 manifest segment is being created for train transport
When
The reference number needs to be assigned
Then
The reference number is set to 'TRAIN'
R-GCCS358C-cbl-00053Set Purpose Code to '00' - Add
Decision Rules
Business View: Assuming an m10 manifest segment is being created and the operation type is add during the 'Set Purpose Code to '00' - Add' routine, when the transaction purpose code needs to be determined, the system executes logic to ensure that the purpose code is set to '00'.
Given
An M10 manifest segment is being created and the operation type is ADD
When
The transaction purpose code needs to be determined
Then
The purpose code is set to '00'
R-GCCS358C-cbl-00054Set Purpose Code to '04' - Change
Decision Rules
Business View: Assuming an m10 manifest segment is being created and the operation type is change and the arrival date is empty during the 'Set Purpose Code to '04' - Change' routine, when the transaction purpose code needs to be determined, the system executes logic to ensure that the purpose code is set to '04' and amendment flag is set to false.
Given
An M10 manifest segment is being created and the operation type is CHANGE and the arrival date is empty
When
The transaction purpose code needs to be determined
Then
The purpose code is set to '04' and amendment flag is set to false
R-GCCS358C-cbl-00055Set Purpose Code to 'CO' - Amendment
Decision Rules
Business View: <EXCLUSION CRITERIA> If an m10 manifest segment is being created and the operation type is change and arrival date is not empty and it's a post-emanifest transaction, and the transaction purpose code needs to be determined occurs during the 'Set Purpose Code to 'CO' - Amendment' routine, then the system must guarantee that the purpose code is set to 'co' and amendment flag is set to true.
EXCLUDING
An M10 manifest segment is being created and the operation type is CHANGE and arrival date is not empty and it's a post-emanifest transaction
When
The transaction purpose code needs to be determined
Then
The purpose code is set to 'CO' and amendment flag is set to true
R-GCCS358C-cbl-00056Set Purpose Code to '04' - Change
Decision Rules
Business View: <EXCLUSION CRITERIA> If an m10 manifest segment is being created and the operation type is change and arrival date is not empty and it's not a post-emanifest transaction, and the transaction purpose code needs to be determined occurs during the 'Set Purpose Code to '04' - Change' routine, then the system must guarantee that the purpose code is set to '04' and amendment flag is set to false.
EXCLUDING
An M10 manifest segment is being created and the operation type is CHANGE and arrival date is not empty and it's not a post-emanifest transaction
When
The transaction purpose code needs to be determined
Then
The purpose code is set to '04' and amendment flag is set to false
R-GCCS358C-cbl-00057Set Purpose Code to '03' - Delete
Decision Rules
Business View: Assuming an m10 manifest segment is being created and the operation type is delete during the 'Set Purpose Code to '03' - Delete' routine, when the transaction purpose code needs to be determined, the system executes logic to ensure that the purpose code is set to '03'.
Given
An M10 manifest segment is being created and the operation type is DELETE
When
The transaction purpose code needs to be determined
Then
The purpose code is set to '03'
R-GCCS358C-cbl-00058Set Application Type to '27'
Definitional Rules
Business View: Assuming an m10 manifest segment is being created during the 'Set Application Type to '27'' routine, when the application type needs to be assigned, the system executes logic to ensure that the application type is set to '27'.
Given
An M10 manifest segment is being created
When
The application type needs to be assigned
Then
The application type is set to '27'
R-GCCS358C-cbl-00059Insert M10 Segment into Transmission
Action Rules
Business View: Assuming an m10 manifest segment has been fully populated with all required data during the 'Insert M10 Segment into Transmission' routine, when the segment needs to be added to the transmission, the system executes logic to ensure that the m10 segment is inserted into the transmission data queue.
Given
An M10 manifest segment has been fully populated with all required data
When
The segment needs to be added to the transmission
Then
The M10 segment is inserted into the transmission data queue
Business View: Assuming a train manifest transaction is being processed during the 'Set Purpose Code = '00' ADD Operation' routine, when the operation type is add (gcws358c-add flag is true), the system executes logic to ensure that the m10 transaction purpose code (m10-13-ts-purpose-cde) is set to '00'.
Given
A train manifest transaction is being processed
When
The operation type is ADD (GCWS358C-ADD flag is true)
Then
The M10 transaction purpose code (M10-13-TS-PURPOSE-CDE) is set to '00'
Business View: Assuming a train manifest transaction is being processed during the 'Set Purpose Code = '03' DELETE Operation' routine, when the operation type is delete (gcws358c-delete flag is true), the system executes logic to ensure that the m10 transaction purpose code (m10-13-ts-purpose-cde) is set to '03'.
Given
A train manifest transaction is being processed
When
The operation type is DELETE (GCWS358C-DELETE flag is true)
Then
The M10 transaction purpose code (M10-13-TS-PURPOSE-CDE) is set to '03'
Business View: Assuming a train manifest transaction is being processed with change operation type during the 'Set Purpose Code = '04' Regular Change' routine, when the arrival date (gcwb4tl-arrival-date) is empty or contains spaces, the system executes logic to ensure that the m10 transaction purpose code (m10-13-ts-purpose-cde) is set to '04' and the ws-not-amendment flag is set to true.
Given
A train manifest transaction is being processed with CHANGE operation type
When
The arrival date (GCWB4TL-ARRIVAL-DATE) is empty or contains spaces
Then
The M10 transaction purpose code (M10-13-TS-PURPOSE-CDE) is set to '04' and the WS-NOT-AMENDMENT flag is set to true
Business View: <EXCLUSION CRITERIA> If a train manifest transaction is being processed with change operation type and arrival date is not empty, and the post-emanifest flag (gcwb4tl-post-emanifest) is true occurs during the 'Set Purpose Code = 'CO' Post-Emanifest Amendment' routine, then the system must guarantee that the m10 transaction purpose code (m10-13-ts-purpose-cde) is set to 'co' and the ws-amendment flag is set to true.
EXCLUDING
A train manifest transaction is being processed with CHANGE operation type and arrival date is not empty
When
The post-emanifest flag (GCWB4TL-POST-EMANIFEST) is true
Then
The M10 transaction purpose code (M10-13-TS-PURPOSE-CDE) is set to 'CO' and the WS-AMENDMENT flag is set to true
Business View: <EXCLUSION CRITERIA> If a train manifest transaction is being processed with change operation type and arrival date is not empty, and the post-emanifest flag (gcwb4tl-post-emanifest) is false occurs during the 'Set Purpose Code = '04' Regular Change' routine, then the system must guarantee that the m10 transaction purpose code (m10-13-ts-purpose-cde) is set to '04' and the ws-not-amendment flag is set to true.
EXCLUDING
A train manifest transaction is being processed with CHANGE operation type and arrival date is not empty
When
The post-emanifest flag (GCWB4TL-POST-EMANIFEST) is false
Then
The M10 transaction purpose code (M10-13-TS-PURPOSE-CDE) is set to '04' and the WS-NOT-AMENDMENT flag is set to true
Business View: Assuming a p4 location segment needs to be created for transmission during the 'Initialize P4 Segment Structure' routine, when the system begins building the p4 segment, the system executes logic to ensure that the p4 segment structure is initialized and the identifier is set to 'p4'.
Given
A P4 location segment needs to be created for transmission
When
The system begins building the P4 segment
Then
The P4 segment structure is initialized and the identifier is set to 'P4'
R-GCCS358C-cbl-00066Retrieve Canadian Station Information
Action Rules
Business View: Assuming a train departure location needs to be processed during the 'Retrieve Canadian Station Information' routine, when the system needs to build the p4 location segment, the system executes logic to ensure that the system retrieves station information using the train's departure station code.
Given
A train departure location needs to be processed
When
The system needs to build the P4 location segment
Then
The system retrieves station information using the train's departure station code
R-GCCS358C-cbl-00067Set Canadian Station Code as Location ID
Definitional Rules
Business View: Assuming canadian station information has been retrieved from the station table during the 'Set Canadian Station Code as Location ID' routine, when the p4 location segment is being populated, the system executes logic to ensure that the canadian station code is assigned as the location identifier.
Given
Canadian station information has been retrieved from the station table
When
The P4 location segment is being populated
Then
The Canadian station code is assigned as the location identifier
R-GCCS358C-cbl-00069Set Estimated Departure Year, Set Estimated Departure Month, Set Estimated Departure Day
Definitional Rules
Business View: Assuming train estimated departure date information is available during the 'Set Estimated Departure Year, Set Estimated Departure Month, Set Estimated Departure Day' routine, when the p4 location segment date fields need to be populated, the system executes logic to ensure that the estimated departure year, month, and day are set from the train list data.
Given
Train estimated departure date information is available
When
The P4 location segment date fields need to be populated
Then
The estimated departure year, month, and day are set from the train list data
R-GCCS358C-cbl-00070Copy Location ID to ID Code Field, Set Time Field to Spaces
Definitional Rules
Business View: Assuming the p4 location segment has a populated location identifier during the 'Copy Location ID to ID Code Field, Set Time Field to Spaces' routine, when the remaining p4 segment fields need to be set, the system executes logic to ensure that the location identifier is copied to the id code field and the time field is set to spaces.
Given
The P4 location segment has a populated location identifier
When
The remaining P4 segment fields need to be set
Then
The location identifier is copied to the ID code field and the time field is set to spaces
R-GCCS358C-cbl-00071Insert P4 Segment into Transmission
Action Rules
Business View: Assuming a completed p4 location segment is ready for transmission during the 'Insert P4 Segment into Transmission' routine, when the segment needs to be added to the transmission data, the system executes logic to ensure that the p4 segment is inserted into the transmission data structure.
Given
A completed P4 location segment is ready for transmission
When
The segment needs to be added to the transmission data
Then
The P4 segment is inserted into the transmission data structure
R-GCCS358C-cbl-00074Post-Emanifest Processing?
Decision Rules
Business View: Assuming an equipment record needs to be processed during the 'Post-Emanifest Processing?' routine, when the processing mode is post-emanifest (gcwb4tl-post-emanifest is true), the system executes logic to ensure that use the 5040 version processing method (b231-load-vid-mbl-5040).
Given
An equipment record needs to be processed
When
The processing mode is post-emanifest (GCWB4TL-POST-EMANIFEST is true)
Then
Use the 5040 version processing method (B231-LOAD-VID-MBL-5040)
R-GCCS358C-cbl-00075Process Equipment - 4040RAIL Version
Action Rules
Business View: <EXCLUSION CRITERIA> If an equipment record needs to be processed, and the processing mode is not post-emanifest (gcwb4tl-post-emanifest is false) occurs during the 'Process Equipment - 4040RAIL Version' routine, then the system must guarantee that use the standard processing method (b230-load-vid-mbl).
EXCLUDING
An equipment record needs to be processed
When
The processing mode is not post-emanifest (GCWB4TL-POST-EMANIFEST is false)
Then
Use the standard processing method (B230-LOAD-VID-MBL)
R-GCCS358C-cbl-00076Process Equipment - 5040 Version
Action Rules
Business View: Assuming an equipment record needs to be processed during the 'Process Equipment - 5040 Version' routine, when the processing mode is post-emanifest (gcwb4tl-post-emanifest is true), the system executes logic to ensure that use the 5040 version processing method (b231-load-vid-mbl-5040).
Given
An equipment record needs to be processed
When
The processing mode is post-emanifest (GCWB4TL-POST-EMANIFEST is true)
Then
Use the 5040 version processing method (B231-LOAD-VID-MBL-5040)
R-GCCS358C-cbl-00078Extract Equipment Type, Initial, Number
Process Rules
Business View: Assuming an equipment record at position sub-tl in the train list during the 'Extract Equipment Type, Initial, Number' routine, when equipment data needs to be extracted for vid segment creation, the system executes logic to ensure that equipment type, initial, and number are extracted from gcwb4tl fields at sub-tl position.
Given
An equipment record at position SUB-TL in the train list
When
Equipment data needs to be extracted for VID segment creation
Then
Equipment type, initial, and number are extracted from GCWB4TL fields at SUB-TL position
R-GCCS358C-cbl-00080Determine Load/Empty Status with Revenue Empty Logic
Decision Rules
Business View: Assuming equipment record with load indicator, empty indicator, and cargo key information in post-emanifest mode during the 'Determine Load/Empty Status with Revenue Empty Logic' routine, when equipment load status needs to be determined for post-emanifest processing, the system executes logic to ensure that status is 'l' if equipment is loaded or (equipment is empty and has cargo key), otherwise 'e', with special handling for loaded equipment without cargo key (set to 'e') and ccn starting with '6105i' (set to 'e').
Given
Equipment record with load indicator, empty indicator, and cargo key information in post-emanifest mode
When
Equipment load status needs to be determined for post-emanifest processing
Then
Status is 'L' if equipment is loaded OR (equipment is empty AND has cargo key), otherwise 'E', with special handling for loaded equipment without cargo key (set to 'E') and CCN starting with '6105I' (set to 'E')
R-GCCS358C-cbl-00081Handle Flat Car Logic for Container Cars
Decision Rules
Business View: Assuming equipment with specific car types that form flat car and container combinations during the 'Handle Flat Car Logic for Container Cars' routine, when current equipment is a flat car type (bg, ca, et, gs, id, lo, rr, sk, tn) and next equipment is a container type (cc, ch, cm, cn, cx, cz, ls, ot, pl, pt, rl, rt, tl), the system executes logic to ensure that store flat car information and process both flat car and container as a combined unit with special vid segment handling.
Given
Equipment with specific car types that form flat car and container combinations
When
Current equipment is a flat car type (BG, CA, ET, GS, ID, LO, RR, SK, TN) and next equipment is a container type (CC, CH, CM, CN, CX, CZ, LS, OT, PL, PT, RL, RT, TL)
Then
Store flat car information and process both flat car and container as a combined unit with special VID segment handling
R-GCCS358C-cbl-00082Check Flat Car for Loaded Containers
Decision Rules
Business View: Assuming a flat car type equipment in post-emanifest processing during the 'Check Flat Car for Loaded Containers' routine, when the equipment is a possible flat car type, the system executes logic to ensure that check subsequent container cars on the flat car and if any container is loaded or (empty with cargo key), set the flat car status to 'l'.
Given
A flat car type equipment in post-emanifest processing
When
The equipment is a possible flat car type
Then
Check subsequent container cars on the flat car and if any container is loaded or (empty with cargo key), set the flat car status to 'L'
R-GCCS358C-cbl-00083Create VID Segment
Process Rules
Business View: Assuming equipment data including type, initial, number, and determined load/empty status during the 'Create VID Segment' routine, when vid segment needs to be created for the equipment, the system executes logic to ensure that vid segment is initialized and populated with equipment identifier 'vid', equipment description code, equipment initial, equipment number, and load/empty status code.
Given
Equipment data including type, initial, number, and determined load/empty status
When
VID segment needs to be created for the equipment
Then
VID segment is initialized and populated with equipment identifier 'VID', equipment description code, equipment initial, equipment number, and load/empty status code
R-GCCS358C-cbl-00084Create N9 Reference Segment for First Equipment
Process Rules
Business View: Assuming post-emanifest processing mode and equipment counter sub-tl equals 1 during the 'Create N9 Reference Segment for First Equipment' routine, when processing the first equipment in the list, the system executes logic to ensure that create n9 segment with identifier 'n9', reference number qualifier '76', reference number 'edt', estimated departure date, estimated time of arrival, and time code 'es'.
Given
Post-emanifest processing mode and equipment counter SUB-TL equals 1
When
Processing the first equipment in the list
Then
Create N9 segment with identifier 'N9', reference number qualifier '76', reference number 'EDT', estimated departure date, estimated time of arrival, and time code 'ES'
R-GCCS358C-cbl-00085Process Bill of Lading if Loaded
Action Rules
Business View: <EXCLUSION CRITERIA> If equipment that is loaded and has a cargo key (cda-ccn-key is not spaces), and equipment processing requires bill of lading information occurs during the 'Process Bill of Lading if Loaded' routine, then the system must guarantee that process mbl segment with cargo details, scac code, bill of lading number, and response codes.
EXCLUDING
Equipment that is loaded and has a cargo key (CDA-CCN-KEY is not spaces)
When
Equipment processing requires bill of lading information
Then
Process MBL segment with cargo details, SCAC code, bill of lading number, and response codes
R-GCCS358C-cbl-00086Process Bill of Lading or Dummy MBL
Decision Rules
Business View: <EXCLUSION CRITERIA> If post-emanifest processing mode with equipment that may or may not have cargo, and equipment has cargo key occurs during the 'Process Bill of Lading or Dummy MBL' routine, then the system must guarantee that process regular mbl segment, otherwise if this is the first equipment and an amendment, create dummy mbl with exception code '06' and m13 amendment segment.
EXCLUDING
Post-emanifest processing mode with equipment that may or may not have cargo
When
Equipment has cargo key
Then
Process regular MBL segment, otherwise if this is the first equipment and an amendment, create dummy MBL with exception code '06' and M13 amendment segment
R-GCCS358C-cbl-00213Extract Equipment Type from GCWB4TL-VID01-EQUIPMENT-TYPE
Process Rules
Business View: Assuming a train list entry exists with equipment type information during the 'Extract Equipment Type from GCWB4TL-VID01-EQUIPMENT-TYPE' routine, when processing equipment data for vid segment creation, the system executes logic to ensure that the equipment type code should be extracted from the train list and stored in the vid equipment description code field.
Given
A train list entry exists with equipment type information
When
Processing equipment data for VID segment creation
Then
The equipment type code should be extracted from the train list and stored in the VID equipment description code field
R-GCCS358C-cbl-00214Extract Equipment Initial from GCWB4TL-VID02-EQUIPMENT-INIT
Process Rules
Business View: Assuming a train list entry exists with equipment initial information during the 'Extract Equipment Initial from GCWB4TL-VID02-EQUIPMENT-INIT' routine, when processing equipment data for vid segment creation, the system executes logic to ensure that the equipment initial should be extracted from the train list and stored in the vid equipment initial field.
Given
A train list entry exists with equipment initial information
When
Processing equipment data for VID segment creation
Then
The equipment initial should be extracted from the train list and stored in the VID equipment initial field
R-GCCS358C-cbl-00215Extract Equipment Number from GCWB4TL-VID03-EQUIPMENT-NUM
Process Rules
Business View: Assuming a train list entry exists with equipment number information during the 'Extract Equipment Number from GCWB4TL-VID03-EQUIPMENT-NUM' routine, when processing equipment data for vid segment creation, the system executes logic to ensure that the equipment number should be extracted from the train list and stored in the vid equipment number field.
Given
A train list entry exists with equipment number information
When
Processing equipment data for VID segment creation
Then
The equipment number should be extracted from the train list and stored in the VID equipment number field
R-GCCS358C-cbl-00219Equipment Empty but CCN Present?
Decision Rules
Business View: Assuming equipment marked as empty with a cargo control number key present during post-emanifest processing (5040 version) during the 'Equipment Empty but CCN Present?' routine, when the equipment is empty and a cargo control number key is present and processing is in 5040 version mode, the system executes logic to ensure that set the equipment status to 'l' for loaded to indicate revenue empty status.
Given
Equipment marked as empty with a cargo control number key present during post-emanifest processing (5040 version)
When
The equipment is empty AND a cargo control number key is present AND processing is in 5040 version mode
Then
Set the equipment status to 'L' for Loaded to indicate revenue empty status
R-GCCS358C-cbl-00314Initialize Flat Car Processing Variables
Process Rules
Business View: Assuming a flat car type equipment followed by a container type equipment during the 'Initialize Flat Car Processing Variables' routine, when the flat car and container combination is identified, the system executes logic to ensure that initialize flatcar-vid-segment, im-unit-vid-segment, and im-unit-vid12-element variables and store the current vid segment as flat car data.
Given
A flat car type equipment followed by a container type equipment
When
The flat car and container combination is identified
Then
Initialize FLATCAR-VID-SEGMENT, IM-UNIT-VID-SEGMENT, and IM-UNIT-VID12-ELEMENT variables and store the current VID segment as flat car data
R-GCCS358C-cbl-00315Does Flat Car Data Exist?
Process Rules
Business View: <EXCLUSION CRITERIA> If a container type equipment and existing flat car segment data, and the current equipment is a container type and flatcar-vid-segment is not equal to spaces occurs during the 'Does Flat Car Data Exist?' routine, then the system must guarantee that store current vid segment as container unit, preserve location id, process flat car segment first, then process container unit segment, and generate mbl segment if equipment is loaded with cargo.
EXCLUDING
A container type equipment and existing flat car segment data
When
The current equipment is a container type and FLATCAR-VID-SEGMENT is not equal to spaces
Then
Store current VID segment as container unit, preserve location ID, process flat car segment first, then process container unit segment, and generate MBL segment if equipment is loaded with cargo
R-GCCS358C-cbl-00316Process Equipment Normally
Process Rules
Business View: <EXCLUSION CRITERIA> If an equipment item that does not fit flat car-container combination patterns, and the equipment is not part of a flat car-container sequence or is processed individually occurs during the 'Process Equipment Normally' routine, then the system must guarantee that generate vid segment using standard processing and create mbl segment if equipment is loaded with cargo.
EXCLUDING
An equipment item that does not fit flat car-container combination patterns
When
The equipment is not part of a flat car-container sequence or is processed individually
Then
Generate VID segment using standard processing and create MBL segment if equipment is loaded with cargo
R-GCCS358C-cbl-00365Current Equipment is Flat Car Type? AND Next Equipment is Container Type?
Validation Rules
Business View: Assuming a current equipment that is classified as flat car type and a next equipment in sequence during the 'Current Equipment is Flat Car Type? AND Next Equipment is Container Type?' routine, when the current equipment type is bg, ca, et, gs, id, lo, rr, sk, or tn and the next equipment type is cc, ch, cm, cn, cx, cz, ls, ot, pl, pt, rl, rt, or tl, the system executes logic to ensure that initialize flat car processing variables and store current vid as flat car segment for paired processing.
Given
A current equipment that is classified as flat car type and a next equipment in sequence
When
The current equipment type is BG, CA, ET, GS, ID, LO, RR, SK, or TN AND the next equipment type is CC, CH, CM, CN, CX, CZ, LS, OT, PL, PT, RL, RT, or TL
Then
Initialize flat car processing variables and store current VID as flat car segment for paired processing
R-GCCS358C-cbl-00366Current Equipment is Container Type? AND Flat Car Segment Exists?
Process Rules
Business View: Assuming a current equipment that is classified as container type and an existing flat car segment during the 'Current Equipment is Container Type? AND Flat Car Segment Exists?' routine, when the current equipment type is cc, ch, cm, cn, cx, cz, ls, ot, pl, pt, rl, rt, or tl and a flat car segment has been previously stored, the system executes logic to ensure that store current vid as container unit segment, copy container location id to flat car, and process both flat car and container unit vid segments.
Given
A current equipment that is classified as container type and an existing flat car segment
When
The current equipment type is CC, CH, CM, CN, CX, CZ, LS, OT, PL, PT, RL, RT, or TL AND a flat car segment has been previously stored
Then
Store current VID as container unit segment, copy container location ID to flat car, and process both flat car and container unit VID segments
R-GCCS358C-cbl-00367Process Equipment Normally
Process Rules
Business View: <EXCLUSION CRITERIA> If an equipment item that does not meet flat car-container pairing criteria, and the equipment is not part of a flat car-container combination or is the last equipment in the list occurs during the 'Process Equipment Normally' routine, then the system must guarantee that process the equipment using standard vid segment processing and load mbl segment if equipment is loaded with cargo.
EXCLUDING
An equipment item that does not meet flat car-container pairing criteria
When
The equipment is not part of a flat car-container combination OR is the last equipment in the list
Then
Process the equipment using standard VID segment processing and load MBL segment if equipment is loaded with cargo
R-GCCS358C-cbl-00227Initialize VID Segment Structure
Process Rules
Business View: Assuming a vid segment needs to be created for equipment processing during the 'Initialize VID Segment Structure' routine, when the vid segment initialization is performed, the system executes logic to ensure that the vid segment structure is initialized and the identifier is set to 'vid'.
Given
A VID segment needs to be created for equipment processing
When
The VID segment initialization is performed
Then
The VID segment structure is initialized and the identifier is set to 'VID'
R-GCCS358C-cbl-00228Set Equipment Description Code from Train List
Definitional Rules
Business View: Assuming a vid segment is being created for equipment during the 'Set Equipment Description Code from Train List' routine, when equipment description code needs to be set, the system executes logic to ensure that the equipment description code from the train list is assigned to vid-01-equip-desc-cde.
Given
A VID segment is being created for equipment
When
Equipment description code needs to be set
Then
The equipment description code from the train list is assigned to VID-01-EQUIP-DESC-CDE
R-GCCS358C-cbl-00229Set Equipment Initial from Train List
Definitional Rules
Business View: Assuming a vid segment is being created for equipment during the 'Set Equipment Initial from Train List' routine, when equipment initial needs to be set, the system executes logic to ensure that the equipment initial from the train list is assigned to vid-02-equip-init.
Given
A VID segment is being created for equipment
When
Equipment initial needs to be set
Then
The equipment initial from the train list is assigned to VID-02-EQUIP-INIT
R-GCCS358C-cbl-00230Set Equipment Number from Train List
Definitional Rules
Business View: Assuming a vid segment is being created for equipment during the 'Set Equipment Number from Train List' routine, when equipment number needs to be set, the system executes logic to ensure that the equipment number from the train list is assigned to vid-03-equip-num.
Given
A VID segment is being created for equipment
When
Equipment number needs to be set
Then
The equipment number from the train list is assigned to VID-03-EQUIP-NUM
R-GCCS358C-cbl-00231Equipment Marked as Loaded?
Decision Rules
Business View: Assuming equipment is being processed for vid segment creation during the 'Equipment Marked as Loaded?' routine, when equipment is marked as loaded and cargo key is present, the system executes logic to ensure that load status is set to 'l' (loaded).
Given
Equipment is being processed for VID segment creation
When
Equipment is marked as loaded AND cargo key is present
Then
Load status is set to 'L' (Loaded)
R-GCCS358C-cbl-00232Set Load Status to 'E'
Decision Rules
Business View: <EXCLUSION CRITERIA> If equipment is being processed for vid segment creation, and equipment is not marked as loaded or cargo key is not present occurs during the 'Set Load Status to 'E'' routine, then the system must guarantee that load status is set to 'e' (empty).
EXCLUDING
Equipment is being processed for VID segment creation
When
Equipment is not marked as loaded OR cargo key is not present
Then
Load status is set to 'E' (Empty)
R-GCCS358C-cbl-00233Equipment Marked as Loaded?
Decision Rules
Business View: Assuming post-emanifest processing is active for equipment during the 'Equipment Marked as Loaded?' routine, when equipment is marked as loaded or (equipment is empty and cargo key is present), the system executes logic to ensure that load status is set to 'l' (loaded).
Given
Post-emanifest processing is active for equipment
When
Equipment is marked as loaded OR (equipment is empty AND cargo key is present)
Then
Load status is set to 'L' (Loaded)
R-GCCS358C-cbl-00236Set Location ID to Manifest Code
Decision Rules
Business View: Assuming cargo exists for the equipment during the 'Set Location ID to Manifest Code' routine, when cargo in-transit status is 't' (transit), the system executes logic to ensure that location id is set to the manifest-to-trans code from cargo.
Given
Cargo exists for the equipment
When
Cargo in-transit status is 'T' (Transit)
Then
Location ID is set to the manifest-to-trans code from cargo
R-GCCS358C-cbl-00238Check for Flat Car Configuration
Validation Rules
Business View: Assuming post-emanifest processing is active during the 'Check for Flat Car Configuration' routine, when equipment type indicates a possible flat car (bg, ca, et, gs, id, lo, rr, sk, tn), the system executes logic to ensure that system checks subsequent equipment for container types and determines flat car configuration.
Given
Post-emanifest processing is active
When
Equipment type indicates a possible flat car (BG, CA, ET, GS, ID, LO, RR, SK, TN)
Then
System checks subsequent equipment for container types and determines flat car configuration
R-GCCS358C-cbl-00240Insert VID Segment to Database
Action Rules
Business View: Assuming vid segment has been fully populated with equipment data during the 'Insert VID Segment to Database' routine, when vid segment is ready for transmission, the system executes logic to ensure that vid segment is inserted into the transmission database for edi processing.
Given
VID segment has been fully populated with equipment data
When
VID segment is ready for transmission
Then
VID segment is inserted into the transmission database for EDI processing
R-GCCS358C-cbl-00281Equipment is Empty AND has CCN Key?
Decision Rules
Business View: Assuming equipment is being processed in post-emanifest mode during the 'Equipment is Empty AND has CCN Key?' routine, when the equipment is marked as empty and has a non-blank ccn key, the system executes logic to ensure that the equipment load status is set to loaded ('l') for revenue empty handling.
Given
Equipment is being processed in post-emanifest mode
When
The equipment is marked as empty AND has a non-blank CCN key
Then
The equipment load status is set to Loaded ('L') for revenue empty handling
R-GCCS358C-cbl-00241CCN Key = '6105I'?
Decision Rules
Business View: Assuming an equipment record is being processed for master bill of lading creation during the 'CCN Key = '6105I'?' routine, when the cargo ccn key starts with '6105i', the system executes logic to ensure that the system skips all mbl segment processing and proceeds to the next step.
Given
An equipment record is being processed for Master Bill of Lading creation
When
The cargo CCN key starts with '6105I'
Then
The system skips all MBL segment processing and proceeds to the next step
R-GCCS358C-cbl-00242CCN starts with '2156'?
Decision Rules
Business View: Assuming a master bill of lading segment is being created for equipment with a ccn key during the 'CCN starts with '2156'?' routine, when the ccn key starts with '2156', the system executes logic to ensure that the system sets the scac code to 'cffo', otherwise sets it to 'cprs'.
Given
A Master Bill of Lading segment is being created for equipment with a CCN key
When
The CCN key starts with '2156'
Then
The system sets the SCAC code to 'CFFO', otherwise sets it to 'CPRS'
R-GCCS358C-cbl-00243Set CCN as Bill of Lading Number
Definitional Rules
Business View: Assuming a master bill of lading segment is being initialized during the 'Set CCN as Bill of Lading Number' routine, when the equipment has a valid ccn key, the system executes logic to ensure that the system assigns the ccn key as the bill of lading/waybill number.
Given
A Master Bill of Lading segment is being initialized
When
The equipment has a valid CCN key
Then
The system assigns the CCN key as the Bill of Lading/Waybill number
R-GCCS358C-cbl-00244Set Condition Response Code
Definitional Rules
Business View: Assuming a master bill of lading segment is being populated during the 'Set Condition Response Code' routine, when the equipment record contains a condition response code, the system executes logic to ensure that the system copies the condition response code to the mbl segment.
Given
A Master Bill of Lading segment is being populated
When
The equipment record contains a condition response code
Then
The system copies the condition response code to the MBL segment
R-GCCS358C-cbl-00245Response Code Empty?
Decision Rules
Business View: <EXCLUSION CRITERIA> If a master bill of lading segment has an empty condition response code, and the bill of lading number is not empty occurs during the 'Response Code Empty?' routine, then the system must guarantee that the system sets the response code to 'y', otherwise sets it to 'n'.
EXCLUDING
A Master Bill of Lading segment has an empty condition response code
When
The Bill of Lading number is not empty
Then
The system sets the response code to 'Y', otherwise sets it to 'N'
R-GCCS358C-cbl-00247Set Exception Code to '08'
Decision Rules
Business View: Assuming cargo is in revenue transit status with bill of lading set to 'na' during the 'Set Exception Code to '08'' routine, when the processing mode is post-emanifest, the system executes logic to ensure that the system sets the exception code to '08'.
Given
Cargo is in revenue transit status with Bill of Lading set to 'NA'
When
The processing mode is post-emanifest
Then
The system sets the exception code to '08'
R-GCCS358C-cbl-00249First Equipment and Amendment?
Process Rules
Business View: Assuming equipment is being processed in amendment mode during the 'First Equipment and Amendment?' routine, when this is the first equipment item being processed, the system executes logic to ensure that the system creates an m13 amendment segment with amendment code '60'.
Given
Equipment is being processed in amendment mode
When
This is the first equipment item being processed
Then
The system creates an M13 amendment segment with amendment code '60'
R-GCCS358C-cbl-00250No CCN and Amendment?
Process Rules
Business View: Assuming equipment is being processed in amendment mode during the 'No CCN and Amendment?' routine, when the equipment has no ccn key and this is the first equipment, the system executes logic to ensure that the system creates a dummy mbl segment with bill of lading 'na', exception code '06', and follows with m13 amendment segment.
Given
Equipment is being processed in amendment mode
When
The equipment has no CCN key and this is the first equipment
Then
The system creates a dummy MBL segment with Bill of Lading 'NA', exception code '06', and follows with M13 amendment segment
R-GCCS358C-cbl-00282CCN Key Starts with '2156'?
Decision Rules
Business View: Assuming a train list equipment record with a cda ccn key during the 'CCN Key Starts with '2156'?' routine, when the system processes the mbl segment for scac code assignment, the system executes logic to ensure that if the ccn key starts with '2156', assign scac code 'cffo', otherwise assign scac code 'cprs'.
Given
A train list equipment record with a CDA CCN key
When
The system processes the MBL segment for SCAC code assignment
Then
If the CCN key starts with '2156', assign SCAC code 'CFFO', otherwise assign SCAC code 'CPRS'
R-GCCS358C-cbl-00283Check if Amendment Processing Required
Decision Rules
Business View: Assuming a train manifest is being processed with equipment items during the 'Check if Amendment Processing Required' routine, when the system checks if this is the first equipment item (sub-tl = 1) and the amendment flag is set to true, the system executes logic to ensure that amendment processing should be initiated for mbl segment creation.
Given
A train manifest is being processed with equipment items
When
The system checks if this is the first equipment item (SUB-TL = 1) and the amendment flag is set to true
Then
Amendment processing should be initiated for MBL segment creation
R-GCCS358C-cbl-00285Equipment has CCN?
Validation Rules
Business View: Assuming an equipment item is being processed for mbl segment creation during the 'Equipment has CCN?' routine, when the system checks the cda-ccn-key field for the equipment, the system executes logic to ensure that if the ccn key is not spaces, the equipment has cargo data, otherwise it has no cargo data.
Given
An equipment item is being processed for MBL segment creation
When
The system checks the CDA-CCN-KEY field for the equipment
Then
If the CCN key is not spaces, the equipment has cargo data, otherwise it has no cargo data
R-GCCS358C-cbl-00286Process Regular MBL Segment
Action Rules
Business View: Assuming an equipment item has a valid ccn key (not spaces) during the 'Process Regular MBL Segment' routine, when the system processes the mbl segment for this equipment, the system executes logic to ensure that the regular mbl processing function (b240-load-mbl-seg) should be invoked.
Given
An equipment item has a valid CCN key (not spaces)
When
The system processes the MBL segment for this equipment
Then
The regular MBL processing function (B240-LOAD-MBL-SEG) should be invoked
R-GCCS358C-cbl-00287Create Dummy MBL Segment
Decision Rules
Business View: Assuming this is the first equipment item (sub-tl = 1) and amendment processing is required and the equipment has no ccn key (spaces) during the 'Create Dummy MBL Segment' routine, when the system determines that a dummy mbl is needed for amendment purposes, the system executes logic to ensure that the dummy mbl creation process (b250-load-dummy-mbl-seg) should be initiated.
Given
This is the first equipment item (SUB-TL = 1) and amendment processing is required and the equipment has no CCN key (spaces)
When
The system determines that a dummy MBL is needed for amendment purposes
Then
The dummy MBL creation process (B250-LOAD-DUMMY-MBL-SEG) should be initiated
R-GCCS358C-cbl-00288Set MBL Identifier to 'MBL'
Definitional Rules
Business View: Assuming a dummy mbl segment is being created during the 'Set MBL Identifier to 'MBL'' routine, when the system initializes the mbl segment structure, the system executes logic to ensure that the mbl identifier field should be set to 'mbl'.
Given
A dummy MBL segment is being created
When
The system initializes the MBL segment structure
Then
The MBL identifier field should be set to 'MBL'
R-GCCS358C-cbl-00289Set SCAC Code to 'CPRS'
Definitional Rules
Business View: Assuming a dummy mbl segment is being created during the 'Set SCAC Code to 'CPRS'' routine, when the system sets the scac (standard carrier alpha code), the system executes logic to ensure that the scac code should be set to 'cprs' for canadian pacific railway.
Given
A dummy MBL segment is being created
When
The system sets the SCAC (Standard Carrier Alpha Code)
Then
The SCAC code should be set to 'CPRS' for Canadian Pacific Railway
R-GCCS358C-cbl-00290Set Bill of Lading to 'NA'
Definitional Rules
Business View: Assuming a dummy mbl segment is being created for equipment without cargo during the 'Set Bill of Lading to 'NA'' routine, when the system sets the bill of lading/waybill number, the system executes logic to ensure that the bill of lading field should be set to 'na' indicating not applicable.
Given
A dummy MBL segment is being created for equipment without cargo
When
The system sets the bill of lading/waybill number
Then
The bill of lading field should be set to 'NA' indicating not applicable
R-GCCS358C-cbl-00291Set Exception Code to '06'
Definitional Rules
Business View: Assuming a dummy mbl segment is being created during the 'Set Exception Code to '06'' routine, when the system sets the exception code for the mbl, the system executes logic to ensure that the exception code should be set to '06' to indicate this is a dummy mbl for amendment processing.
Given
A dummy MBL segment is being created
When
The system sets the exception code for the MBL
Then
The exception code should be set to '06' to indicate this is a dummy MBL for amendment processing
R-GCCS358C-cbl-00292Insert Dummy MBL into Transmission
Action Rules
Business View: Assuming a dummy mbl segment has been created and populated with required data during the 'Insert Dummy MBL into Transmission' routine, when the system processes the mbl for transmission, the system executes logic to ensure that the dummy mbl segment should be inserted into the transmission data structure (a9dp-transmission-data).
Given
A dummy MBL segment has been created and populated with required data
When
The system processes the MBL for transmission
Then
The dummy MBL segment should be inserted into the transmission data structure (A9DP-TRANSMISSION-DATA)
R-GCCS358C-cbl-00293Create M13 Amendment Segment
Process Rules
Business View: Assuming amendment processing is required and dummy mbl has been processed during the 'Create M13 Amendment Segment' routine, when the system creates amendment documentation, the system executes logic to ensure that an m13 amendment segment should be created and initialized.
Given
Amendment processing is required and dummy MBL has been processed
When
The system creates amendment documentation
Then
An M13 amendment segment should be created and initialized
R-GCCS358C-cbl-00294Set M13 Identifier to 'M13'
Definitional Rules
Business View: Assuming an m13 amendment segment is being created during the 'Set M13 Identifier to 'M13'' routine, when the system initializes the m13 segment structure, the system executes logic to ensure that the m13 identifier field should be set to 'm13'.
Given
An M13 amendment segment is being created
When
The system initializes the M13 segment structure
Then
The M13 identifier field should be set to 'M13'
R-GCCS358C-cbl-00295Set SCAC Code to 'CPRS'
Definitional Rules
Business View: Assuming an m13 amendment segment is being created during the 'Set SCAC Code to 'CPRS'' routine, when the system sets the scac (standard carrier alpha code) for the amendment, the system executes logic to ensure that the scac code should be set to 'cprs' for canadian pacific railway.
Given
An M13 amendment segment is being created
When
The system sets the SCAC (Standard Carrier Alpha Code) for the amendment
Then
The SCAC code should be set to 'CPRS' for Canadian Pacific Railway
R-GCCS358C-cbl-00296Set Location ID from Station Code
Definitional Rules
Business View: Assuming an m13 amendment segment is being created and station information is available during the 'Set Location ID from Station Code' routine, when the system sets the location identifier for the amendment, the system executes logic to ensure that the location id should be set to the canadian station code (gcstbrt-sc-cdn-stat-code-x).
Given
An M13 amendment segment is being created and station information is available
When
The system sets the location identifier for the amendment
Then
The location ID should be set to the Canadian station code (GCSTBRT-SC-CDN-STAT-CODE-X)
R-GCCS358C-cbl-00297Set Bill/Waybill Number from Train Key
Definitional Rules
Business View: Assuming an m13 amendment segment is being created and train information is available during the 'Set Bill/Waybill Number from Train Key' routine, when the system sets the bill/waybill number for the amendment, the system executes logic to ensure that the bill/waybill number should be set to the train key (gcwb4tl-key).
Given
An M13 amendment segment is being created and train information is available
When
The system sets the bill/waybill number for the amendment
Then
The bill/waybill number should be set to the train key (GCWB4TL-KEY)
R-GCCS358C-cbl-00298Set Amendment Code to '60'
Definitional Rules
Business View: Assuming an m13 amendment segment is being created during the 'Set Amendment Code to '60'' routine, when the system sets the amendment code, the system executes logic to ensure that the amendment code should be set to '60' to indicate the specific type of manifest amendment.
Given
An M13 amendment segment is being created
When
The system sets the amendment code
Then
The amendment code should be set to '60' to indicate the specific type of manifest amendment
R-GCCS358C-cbl-00299Insert M13 Amendment into Transmission
Action Rules
Business View: Assuming an m13 amendment segment has been created and populated with required data during the 'Insert M13 Amendment into Transmission' routine, when the system processes the m13 for transmission, the system executes logic to ensure that the m13 amendment segment should be inserted into the transmission data structure (a9dp-transmission-data).
Given
An M13 amendment segment has been created and populated with required data
When
The system processes the M13 for transmission
Then
The M13 amendment segment should be inserted into the transmission data structure (A9DP-TRANSMISSION-DATA)
Business View: Assuming all amendment-specific mbl and m13 segments have been processed during the 'Amendment MBL Processing Complete' routine, when the system completes the amendment processing workflow, the system executes logic to ensure that the amendment mbl processing should be marked as complete and control should return to the main processing flow.
Given
All amendment-specific MBL and M13 segments have been processed
When
The system completes the amendment processing workflow
Then
The amendment MBL processing should be marked as complete and control should return to the main processing flow
Business View: Assuming a dummy mbl segment needs to be created for amendment processing during the 'Initialize MBL Segment Structure' routine, when the system begins dummy mbl segment creation, the system executes logic to ensure that the mbl segment structure is initialized to clear any previous data.
Given
A dummy MBL segment needs to be created for amendment processing
When
The system begins dummy MBL segment creation
Then
The MBL segment structure is initialized to clear any previous data
R-GCCS358C-cbl-00324Set MBL Identifier to 'MBL'
Definitional Rules
Business View: Assuming a dummy mbl segment is being created during the 'Set MBL Identifier to 'MBL'' routine, when the segment identifier needs to be set, the system executes logic to ensure that the mbl identifier is set to 'mbl'.
Given
A dummy MBL segment is being created
When
The segment identifier needs to be set
Then
The MBL identifier is set to 'MBL'
R-GCCS358C-cbl-00325Set SCAC Code to 'CPRS'
Policy Rules
Business View: Assuming a dummy mbl segment is being created for amendment processing during the 'Set SCAC Code to 'CPRS'' routine, when the scac code needs to be assigned, the system executes logic to ensure that the scac code is set to 'cprs'.
Given
A dummy MBL segment is being created for amendment processing
When
The SCAC code needs to be assigned
Then
The SCAC code is set to 'CPRS'
R-GCCS358C-cbl-00326Set Bill of Lading to 'NA'
Definitional Rules
Business View: Assuming a dummy mbl segment is being created during the 'Set Bill of Lading to 'NA'' routine, when the bill of lading waybill number needs to be set, the system executes logic to ensure that the bill of lading waybill is set to 'na'.
Given
A dummy MBL segment is being created
When
The bill of lading waybill number needs to be set
Then
The bill of lading waybill is set to 'NA'
R-GCCS358C-cbl-00327Clear Load Found Flag
Process Rules
Business View: Assuming a dummy mbl segment is being processed during the 'Clear Load Found Flag' routine, when the load found flag needs to be reset, the system executes logic to ensure that the load found flag is cleared to spaces.
Given
A dummy MBL segment is being processed
When
The load found flag needs to be reset
Then
The load found flag is cleared to spaces
R-GCCS358C-cbl-00328Set Exception Code to '06'
Policy Rules
Business View: Assuming a dummy mbl segment is being created for amendment processing during the 'Set Exception Code to '06'' routine, when the exception code needs to be assigned, the system executes logic to ensure that the exception code is set to '06'.
Given
A dummy MBL segment is being created for amendment processing
When
The exception code needs to be assigned
Then
The exception code is set to '06'
R-GCCS358C-cbl-00329Insert MBL Segment into Transmission
Action Rules
Business View: Assuming a dummy mbl segment has been configured with all required values during the 'Insert MBL Segment into Transmission' routine, when the segment needs to be added to the transmission, the system executes logic to ensure that the mbl segment is inserted into the transmission data structure.
Given
A dummy MBL segment has been configured with all required values
When
The segment needs to be added to the transmission
Then
The MBL segment is inserted into the transmission data structure
R-GCCS358C-cbl-00330Build M13 Amendment Segment
Action Rules
Business View: Assuming a dummy mbl segment has been successfully created and inserted during the 'Build M13 Amendment Segment' routine, when amendment processing continues, the system executes logic to ensure that the m13 amendment segment is built and processed.
Given
A dummy MBL segment has been successfully created and inserted
Business View: Assuming an amendment scenario requires a dummy mbl segment during the 'Initialize MBL Segment Structure' routine, when the dummy mbl processing begins, the system executes logic to ensure that the mbl segment structure is initialized to clear any previous data.
Given
An amendment scenario requires a dummy MBL segment
When
The dummy MBL processing begins
Then
The MBL segment structure is initialized to clear any previous data
R-GCCS358C-cbl-00369Set MBL Identifier to 'MBL'
Definitional Rules
Business View: Assuming a dummy mbl segment is being created during the 'Set MBL Identifier to 'MBL'' routine, when the segment identifier needs to be set, the system executes logic to ensure that the mbl identifier is set to 'mbl'.
Given
A dummy MBL segment is being created
When
The segment identifier needs to be set
Then
The MBL identifier is set to 'MBL'
R-GCCS358C-cbl-00370Assign Standard CPRS SCAC Code
Policy Rules
Business View: Assuming a dummy mbl segment is being processed during the 'Assign Standard CPRS SCAC Code' routine, when the scac code needs to be assigned, the system executes logic to ensure that the scac code is set to 'cprs'.
Given
A dummy MBL segment is being processed
When
The SCAC code needs to be assigned
Then
The SCAC code is set to 'CPRS'
R-GCCS358C-cbl-00371Set Bill of Lading to 'NA'
Policy Rules
Business View: Assuming a dummy mbl segment is being created for amendment purposes during the 'Set Bill of Lading to 'NA'' routine, when the bill of lading waybill field needs to be populated, the system executes logic to ensure that the bill of lading waybill is set to 'na'.
Given
A dummy MBL segment is being created for amendment purposes
When
The bill of lading waybill field needs to be populated
Then
The bill of lading waybill is set to 'NA'
R-GCCS358C-cbl-00372Clear Load Found Flag
Process Rules
Business View: Assuming a dummy mbl segment is being processed during the 'Clear Load Found Flag' routine, when the load found flag needs to be reset, the system executes logic to ensure that the load found flag is set to spaces.
Given
A dummy MBL segment is being processed
When
The load found flag needs to be reset
Then
The load found flag is set to spaces
R-GCCS358C-cbl-00373Configure Exception Code '06'
Policy Rules
Business View: Assuming a dummy mbl segment is created for an amendment scenario during the 'Configure Exception Code '06'' routine, when the exception code needs to be configured, the system executes logic to ensure that the exception code is set to '06'.
Given
A dummy MBL segment is created for an amendment scenario
When
The exception code needs to be configured
Then
The exception code is set to '06'
R-GCCS358C-cbl-00374Insert MBL Segment into Transmission
Action Rules
Business View: Assuming a dummy mbl segment has been configured with all required fields during the 'Insert MBL Segment into Transmission' routine, when the segment needs to be added to the transmission, the system executes logic to ensure that the mbl segment is moved to transmission data and inserted into the data stream.
Given
A dummy MBL segment has been configured with all required fields
When
The segment needs to be added to the transmission
Then
The MBL segment is moved to transmission data and inserted into the data stream
Business View: Assuming a dummy mbl segment has been successfully inserted into the transmission during the 'Trigger M13 Amendment Segment Creation' routine, when amendment processing is required, the system executes logic to ensure that the m13 amendment segment creation process is triggered.
Given
A dummy MBL segment has been successfully inserted into the transmission
When
Amendment processing is required
Then
The M13 amendment segment creation process is triggered
Business View: Assuming the system needs to create an m13 amendment segment during the 'Initialize M13 Segment Structure' routine, when the m13 segment initialization is triggered, the system executes logic to ensure that the m13 segment structure is cleared and ready for data population.
Given
The system needs to create an M13 amendment segment
When
The M13 segment initialization is triggered
Then
The M13 segment structure is cleared and ready for data population
R-GCCS358C-cbl-00332Set M13 Identifier
Definitional Rules
Business View: Assuming an m13 amendment segment is being created during the 'Set M13 Identifier' routine, when the segment identifier needs to be set, the system executes logic to ensure that the m13 identifier is set to 'm13'.
Given
An M13 amendment segment is being created
When
The segment identifier needs to be set
Then
The M13 identifier is set to 'M13'
R-GCCS358C-cbl-00333Set SCAC Code to CPRS
Definitional Rules
Business View: Assuming an m13 amendment segment is being populated during the 'Set SCAC Code to CPRS' routine, when the scac code field needs to be set, the system executes logic to ensure that the scac code is set to 'cprs'.
Given
An M13 amendment segment is being populated
When
The SCAC code field needs to be set
Then
The SCAC code is set to 'CPRS'
R-GCCS358C-cbl-00334Set Location ID from Station Code
Definitional Rules
Business View: Assuming an m13 amendment segment is being created and station information is available during the 'Set Location ID from Station Code' routine, when the location id field needs to be populated, the system executes logic to ensure that the location id is set to the canadian station code from gcstbrt station table.
Given
An M13 amendment segment is being created and station information is available
When
The location ID field needs to be populated
Then
The location ID is set to the Canadian station code from GCSTBRT station table
R-GCCS358C-cbl-00335Set Bill of Lading/Waybill Number from Train Key
Definitional Rules
Business View: Assuming an m13 amendment segment is being created and train information is available during the 'Set Bill of Lading/Waybill Number from Train Key' routine, when the bill of lading/waybill number field needs to be populated, the system executes logic to ensure that the bill of lading/waybill number is set to the train key from gcwb4tl.
Given
An M13 amendment segment is being created and train information is available
When
The bill of lading/waybill number field needs to be populated
Then
The bill of lading/waybill number is set to the train key from GCWB4TL
R-GCCS358C-cbl-00336Set Amendment Code to 60
Definitional Rules
Business View: Assuming an m13 amendment segment is being created during the 'Set Amendment Code to 60' routine, when the amendment code field needs to be set, the system executes logic to ensure that the amendment code is set to '60'.
Given
An M13 amendment segment is being created
When
The amendment code field needs to be set
Then
The amendment code is set to '60'
R-GCCS358C-cbl-00337Insert M13 Segment into Transmission
Action Rules
Business View: Assuming an m13 amendment segment has been fully populated during the 'Insert M13 Segment into Transmission' routine, when the segment needs to be added to the transmission, the system executes logic to ensure that the m13 segment is inserted into the a9dp transmission data structure.
Given
An M13 amendment segment has been fully populated
When
The segment needs to be added to the transmission
Then
The M13 segment is inserted into the A9DP transmission data structure
R-GCCS358C-cbl-00087Check Post-Emanifest Flag
Decision Rules
Business View: Assuming a train manifest processing request is received during the 'Check Post-Emanifest Flag' routine, when the system checks the post-emanifest flag (gcwb4tl-post-emanifest), the system executes logic to ensure that the system evaluates the flag to determine routing to appropriate edi version processing.
Given
A train manifest processing request is received
When
The system checks the post-emanifest flag (GCWB4TL-POST-EMANIFEST)
Then
The system evaluates the flag to determine routing to appropriate EDI version processing
R-GCCS358C-cbl-00088Route to 5040 Version Processing
Action Rules
Business View: Assuming a train manifest processing request is being evaluated for edi version routing during the 'Route to 5040 Version Processing' routine, when the post-emanifest flag (gcwb4tl-post-emanifest) is set to true, the system executes logic to ensure that the system routes processing to b231-load-vid-mbl-5040 for enhanced equipment processing with 5040 version capabilities.
Given
A train manifest processing request is being evaluated for EDI version routing
When
The post-emanifest flag (GCWB4TL-POST-EMANIFEST) is set to true
Then
The system routes processing to B231-LOAD-VID-MBL-5040 for enhanced equipment processing with 5040 version capabilities
R-GCCS358C-cbl-00089Route to 4040RAIL Version Processing
Action Rules
Business View: <EXCLUSION CRITERIA> If a train manifest processing request is being evaluated for edi version routing, and the post-emanifest flag (gcwb4tl-post-emanifest) is not set or is false occurs during the 'Route to 4040RAIL Version Processing' routine, then the system must guarantee that the system routes processing to b230-load-vid-mbl for standard equipment processing with 4040rail version capabilities.
EXCLUDING
A train manifest processing request is being evaluated for EDI version routing
When
The post-emanifest flag (GCWB4TL-POST-EMANIFEST) is not set or is false
Then
The system routes processing to B230-LOAD-VID-MBL for standard equipment processing with 4040RAIL version capabilities
R-GCCS358C-cbl-00090Process All Equipment in Train List
Process Rules
Business View: Assuming the edi version processing route has been determined during the 'Process All Equipment in Train List' routine, when the system begins equipment processing, the system executes logic to ensure that the system iterates through all equipment entries (sub-tl) in the train list until an empty equipment id is encountered, processing each equipment entry using the selected processing method.
Given
The EDI version processing route has been determined
When
The system begins equipment processing
Then
The system iterates through all equipment entries (SUB-TL) in the train list until an empty equipment ID is encountered, processing each equipment entry using the selected processing method
R-GCCS358C-cbl-00091Get Cargo Information for Equipment
Action Rules
Business View: Assuming an equipment unit exists in the train list with a ccn key during the 'Get Cargo Information for Equipment' routine, when the system processes the equipment for manifest creation, the system executes logic to ensure that the system retrieves the corresponding cargo information using the ccn key and sets cargo found flag to true, or initializes empty cargo segment if no cargo exists.
Given
An equipment unit exists in the train list with a CCN key
When
The system processes the equipment for manifest creation
Then
The system retrieves the corresponding cargo information using the CCN key and sets cargo found flag to true, or initializes empty cargo segment if no cargo exists
R-GCCS358C-cbl-00092Initialize VID Segment
Process Rules
Business View: Assuming equipment processing is initiated for manifest creation during the 'Initialize VID Segment' routine, when a new vid segment needs to be created, the system executes logic to ensure that the system initializes the vid segment and sets the identifier to 'vid'.
Given
Equipment processing is initiated for manifest creation
When
A new VID segment needs to be created
Then
The system initializes the VID segment and sets the identifier to 'VID'
R-GCCS358C-cbl-00093Set Equipment Type from Train List
Definitional Rules
Business View: Assuming a vid segment is being populated for an equipment unit during the 'Set Equipment Type from Train List' routine, when equipment type information is available in the train list, the system executes logic to ensure that the system copies the equipment type code from the train list to the vid equipment description code field.
Given
A VID segment is being populated for an equipment unit
When
Equipment type information is available in the train list
Then
The system copies the equipment type code from the train list to the VID equipment description code field
R-GCCS358C-cbl-00094Set Equipment Initial from Train List
Definitional Rules
Business View: Assuming a vid segment is being populated for an equipment unit during the 'Set Equipment Initial from Train List' routine, when equipment initial information is available in the train list, the system executes logic to ensure that the system copies the equipment initial from the train list to the vid equipment initial field.
Given
A VID segment is being populated for an equipment unit
When
Equipment initial information is available in the train list
Then
The system copies the equipment initial from the train list to the VID equipment initial field
R-GCCS358C-cbl-00095Set Equipment Number from Train List
Definitional Rules
Business View: Assuming a vid segment is being populated for an equipment unit during the 'Set Equipment Number from Train List' routine, when equipment number information is available in the train list, the system executes logic to ensure that the system copies the equipment number from the train list to the vid equipment number field.
Given
A VID segment is being populated for an equipment unit
When
Equipment number information is available in the train list
Then
The system copies the equipment number from the train list to the VID equipment number field
R-GCCS358C-cbl-00096Equipment Marked as Loaded?
Decision Rules
Business View: Assuming equipment is being processed for manifest creation during the 'Equipment Marked as Loaded?' routine, when the train list indicates the equipment load status, the system executes logic to ensure that the system sets load status to 'l' if equipment is marked as loaded, otherwise sets status to 'e' for empty.
Given
Equipment is being processed for manifest creation
When
The train list indicates the equipment load status
Then
The system sets load status to 'L' if equipment is marked as loaded, otherwise sets status to 'E' for empty
R-GCCS358C-cbl-00099Cargo In-Transit Status?
Decision Rules
Business View: Assuming equipment has associated cargo with an in-transit status during the 'Cargo In-Transit Status?' routine, when the cargo in-transit status is evaluated, the system executes logic to ensure that the system sets location id to '0000' if status is 'r' (received), sets location id to manifest-to-trans-code if status is 't' (in-transit), or sets location id to spaces for any other status.
Given
Equipment has associated cargo with an in-transit status
When
The cargo in-transit status is evaluated
Then
The system sets location ID to '0000' if status is 'R' (received), sets location ID to manifest-to-trans-code if status is 'T' (in-transit), or sets location ID to spaces for any other status
R-GCCS358C-cbl-00100Current Equipment is Flat Car?
Definitional Rules
Business View: Assuming equipment is being processed for manifest creation during the 'Current Equipment is Flat Car?' routine, when the equipment type is evaluated, the system executes logic to ensure that the system identifies the equipment as a flat car if the type is bg, ca, et, gs, id, lo, rr, sk, or tn.
Given
Equipment is being processed for manifest creation
When
The equipment type is evaluated
Then
The system identifies the equipment as a flat car if the type is BG, CA, ET, GS, ID, LO, RR, SK, or TN
R-GCCS358C-cbl-00102Store Flat Car VID Data
Process Rules
Business View: Assuming current equipment is a flat car and next equipment is a container during the 'Store Flat Car VID Data' routine, when the flat car vid segment is created, the system executes logic to ensure that the system stores the flat car vid segment data and initializes container vid structures for subsequent processing.
Given
Current equipment is a flat car and next equipment is a container
When
The flat car VID segment is created
Then
The system stores the flat car VID segment data and initializes container VID structures for subsequent processing
R-GCCS358C-cbl-00103Current Equipment is Container?
Definitional Rules
Business View: Assuming equipment is being processed for manifest creation during the 'Current Equipment is Container?' routine, when the equipment type is evaluated, the system executes logic to ensure that the system identifies the equipment as a container if the type is cc, ch, cm, cn, cx, cz, ls, ot, pl, pt, rl, rt, or tl.
Given
Equipment is being processed for manifest creation
When
The equipment type is evaluated
Then
The system identifies the equipment as a container if the type is CC, CH, CM, CN, CX, CZ, LS, OT, PL, PT, RL, RT, or TL
R-GCCS358C-cbl-00104Create Flat Car VID with Container Location
Process Rules
Business View: Assuming current equipment is a container and flat car vid data exists from previous processing during the 'Create Flat Car VID with Container Location' routine, when container vid segment is being created, the system executes logic to ensure that the system creates a flat car vid segment with container location information, then creates the container vid segment, and processes mbl segment if equipment is loaded with cargo.
Given
Current equipment is a container and flat car VID data exists from previous processing
When
Container VID segment is being created
Then
The system creates a flat car VID segment with container location information, then creates the container VID segment, and processes MBL segment if equipment is loaded with cargo
R-GCCS358C-cbl-00105Create Standard VID Segment
Process Rules
Business View: <EXCLUSION CRITERIA> If equipment is not part of a flat car-container combination, and vid segment processing is performed occurs during the 'Create Standard VID Segment' routine, then the system must guarantee that the system creates a standard vid segment and processes mbl segment if equipment is loaded with cargo.
EXCLUDING
Equipment is not part of a flat car-container combination
When
VID segment processing is performed
Then
The system creates a standard VID segment and processes MBL segment if equipment is loaded with cargo
R-GCCS358C-cbl-00106Equipment Has CCN and is Loaded?
Decision Rules
Business View: Assuming equipment vid segment has been created during the 'Equipment Has CCN and is Loaded?' routine, when the system evaluates mbl processing requirements, the system executes logic to ensure that the system creates an mbl segment if the equipment is loaded and has an associated ccn key (cargo control number).
Given
Equipment VID segment has been created
When
The system evaluates MBL processing requirements
Then
The system creates an MBL segment if the equipment is loaded and has an associated CCN key (cargo control number)
R-GCCS358C-cbl-00253Store Flat Car Information
Process Rules
Business View: Assuming a flat car equipment type followed by a container car equipment type during the 'Store Flat Car Information' routine, when the flat car and container car pairing is identified, the system executes logic to ensure that the flat car vid segment is stored for later processing with the container car's location information.
Given
A flat car equipment type followed by a container car equipment type
When
The flat car and container car pairing is identified
Then
The flat car VID segment is stored for later processing with the container car's location information
R-GCCS358C-cbl-00254Create VID Segment for Flat Car
Process Rules
Business View: Assuming a stored flat car vid segment and a current container car being processed during the 'Create VID Segment for Flat Car' routine, when the container car is processed and has location information, the system executes logic to ensure that two vid segments are created - one for the flat car using the container's location id and one for the container car.
Given
A stored flat car VID segment and a current container car being processed
When
The container car is processed and has location information
Then
Two VID segments are created - one for the flat car using the container's location ID and one for the container car
R-GCCS358C-cbl-00255Process as Regular Equipment
Process Rules
Business View: <EXCLUSION CRITERIA> If an equipment item that is not a flat car followed by a container or a container with stored flat car information, and the equipment is processed individually occurs during the 'Process as Regular Equipment' routine, then the system must guarantee that a single vid segment is created for the equipment and mbl segment is created if the equipment is loaded with cargo.
EXCLUDING
An equipment item that is not a flat car followed by a container or a container with stored flat car information
When
The equipment is processed individually
Then
A single VID segment is created for the equipment and MBL segment is created if the equipment is loaded with cargo
R-GCCS358C-cbl-00256Create MBL Segment if Loaded
Process Rules
Business View: Assuming equipment in a flat car-container pairing that is loaded and has cargo information during the 'Create MBL Segment if Loaded' routine, when the equipment vid segments are created for the pairing, the system executes logic to ensure that an mbl segment is created for the loaded equipment with cargo details.
Given
Equipment in a flat car-container pairing that is loaded and has cargo information
When
The equipment VID segments are created for the pairing
Then
An MBL segment is created for the loaded equipment with cargo details
R-GCCS358C-cbl-00303Store Flat Car Information in FLATCAR-VID-SEGMENT
Process Rules
Business View: Assuming current equipment is a flat car and next equipment is a container during the 'Store Flat Car Information in FLATCAR-VID-SEGMENT' routine, when flat car-container pairing condition is met, the system executes logic to ensure that current vid segment information is stored in flatcar-vid-segment for later retrieval and container information storage areas are initialized.
Given
Current equipment is a flat car and next equipment is a container
When
Flat car-container pairing condition is met
Then
Current VID segment information is stored in FLATCAR-VID-SEGMENT for later retrieval and container information storage areas are initialized
R-GCCS358C-cbl-00305Is Stored Flat Car Available?
Validation Rules
Business View: Assuming current equipment is identified as a container during the 'Is Stored Flat Car Available?' routine, when flatcar-vid-segment contains previously stored flat car information (not equal to spaces), the system executes logic to ensure that stored flat car is available for pairing and container pairing process is initiated.
Given
Current equipment is identified as a container
When
FLATCAR-VID-SEGMENT contains previously stored flat car information (not equal to spaces)
Then
Stored flat car is available for pairing and container pairing process is initiated
R-GCCS358C-cbl-00306Process Flat Car with Container Location
Process Rules
Business View: Assuming stored flat car information is available and current equipment is a container during the 'Process Flat Car with Container Location' routine, when container location information is captured and flat car data is retrieved from storage, the system executes logic to ensure that flat car vid segment is processed with container location id and both segments are transmitted as a paired unit.
Given
Stored flat car information is available and current equipment is a container
When
Container location information is captured and flat car data is retrieved from storage
Then
Flat car VID segment is processed with container location ID and both segments are transmitted as a paired unit
R-GCCS358C-cbl-00307Generate MBL Segment for Pair
Decision Rules
Business View: <EXCLUSION CRITERIA> If flat car-container pair is processed and container has cargo information, and container is loaded and has valid cargo key (cda-ccn-key not equal to spaces) occurs during the 'Generate MBL Segment for Pair' routine, then the system must guarantee that mbl segment is generated for the paired equipment unit.
EXCLUDING
Flat car-container pair is processed and container has cargo information
When
Container is loaded and has valid cargo key (CDA-CCN-KEY not equal to spaces)
Then
MBL segment is generated for the paired equipment unit
R-GCCS358C-cbl-00308Process as Regular Equipment
Process Rules
Business View: <EXCLUSION CRITERIA> If equipment does not meet flat car-container pairing criteria, and equipment is not a flat car followed by container, or is not a container with stored flat car, or is at end of equipment list occurs during the 'Process as Regular Equipment' routine, then the system must guarantee that equipment vid segment is transmitted as individual unit and mbl is generated if equipment has loaded cargo.
EXCLUDING
Equipment does not meet flat car-container pairing criteria
When
Equipment is not a flat car followed by container, or is not a container with stored flat car, or is at end of equipment list
Then
Equipment VID segment is transmitted as individual unit and MBL is generated if equipment has loaded cargo
R-GCCS358C-cbl-00340Initialize Flat Car VID Segment
Process Rules
Business View: Assuming a flat car equipment type is followed by a container equipment type during the 'Initialize Flat Car VID Segment' routine, when the flat car and container pairing is identified, the system executes logic to ensure that initialize flat car vid segment, container vid segment, and container location element to prepare for data storage.
Given
A flat car equipment type is followed by a container equipment type
When
The flat car and container pairing is identified
Then
Initialize flat car VID segment, container VID segment, and container location element to prepare for data storage
R-GCCS358C-cbl-00341Store Current VID as Flat Car
Process Rules
Business View: Assuming a vid segment is populated with current equipment data and flat car pairing is identified during the 'Store Current VID as Flat Car' routine, when the current equipment is a flat car type, the system executes logic to ensure that copy the current vid segment data to the flat car vid segment storage.
Given
A VID segment is populated with current equipment data and flat car pairing is identified
When
The current equipment is a flat car type
Then
Copy the current VID segment data to the flat car VID segment storage
R-GCCS358C-cbl-00342Does Flat Car VID Exist?
Decision Rules
Business View: <EXCLUSION CRITERIA> If current equipment is a container type and flat car vid segment storage exists, and the flat car vid segment is not empty occurs during the 'Does Flat Car VID Exist?' routine, then the system must guarantee that process the container as part of a flat car-container pair.
EXCLUDING
Current equipment is a container type and flat car VID segment storage exists
When
The flat car VID segment is not empty
Then
Process the container as part of a flat car-container pair
R-GCCS358C-cbl-00343Initialize Container VID Segment
Process Rules
Business View: Assuming a container equipment is being processed and an existing flat car vid segment is available during the 'Initialize Container VID Segment' routine, when container vid segment needs to be paired with flat car, the system executes logic to ensure that initialize container vid segment, store container location id, and prepare for flat car data transfer.
Given
A container equipment is being processed and an existing flat car VID segment is available
When
Container VID segment needs to be paired with flat car
Then
Initialize container VID segment, store container location ID, and prepare for flat car data transfer
R-GCCS358C-cbl-00344Copy Flat Car VID to Current VID
Process Rules
Business View: Assuming flat car vid segment data is stored and container location information is preserved during the 'Copy Flat Car VID to Current VID' routine, when processing flat car-container pair, the system executes logic to ensure that copy flat car vid segment data to current vid segment.
Given
Flat car VID segment data is stored and container location information is preserved
When
Processing flat car-container pair
Then
Copy flat car VID segment data to current VID segment
R-GCCS358C-cbl-00345Apply Container Location ID to Flat Car
Process Rules
Business View: Assuming container location id is stored and flat car vid data is in current vid segment during the 'Apply Container Location ID to Flat Car' routine, when processing flat car-container pair, the system executes logic to ensure that move the stored container location id to the vid location field.
Given
Container location ID is stored and flat car VID data is in current VID segment
When
Processing flat car-container pair
Then
Move the stored container location ID to the VID location field
R-GCCS358C-cbl-00346Insert Flat Car VID Segment
Action Rules
Business View: Assuming flat car vid segment is populated with equipment data and container location during the 'Insert Flat Car VID Segment' routine, when flat car-container pair processing is complete, the system executes logic to ensure that insert the flat car vid segment into the transmission data.
Given
Flat car VID segment is populated with equipment data and container location
When
Flat car-container pair processing is complete
Then
Insert the flat car VID segment into the transmission data
R-GCCS358C-cbl-00347Reset VID to Container Data
Process Rules
Business View: Assuming flat car vid segment has been inserted and container vid segment data is stored during the 'Reset VID to Container Data' routine, when processing the container portion of flat car-container pair, the system executes logic to ensure that initialize current vid segment and copy container vid segment data to current vid segment.
Given
Flat car VID segment has been inserted and container VID segment data is stored
When
Processing the container portion of flat car-container pair
Then
Initialize current VID segment and copy container VID segment data to current VID segment
R-GCCS358C-cbl-00348Insert Container VID Segment
Action Rules
Business View: Assuming container vid segment data is restored to current vid segment during the 'Insert Container VID Segment' routine, when container portion of flat car-container pair is ready, the system executes logic to ensure that insert the container vid segment into the transmission data.
Given
Container VID segment data is restored to current VID segment
When
Container portion of flat car-container pair is ready
Then
Insert the container VID segment into the transmission data
R-GCCS358C-cbl-00349Equipment Has CCN and is Loaded?
Decision Rules
Business View: <EXCLUSION CRITERIA> If a container equipment in a flat car-container pair, and the equipment is loaded and has a cargo control number (ccn) that is not spaces occurs during the 'Equipment Has CCN and is Loaded?' routine, then the system must guarantee that process the mbl segment for the container.
EXCLUDING
A container equipment in a flat car-container pair
When
The equipment is loaded and has a cargo control number (CCN) that is not spaces
Then
Process the MBL segment for the container
R-GCCS358C-cbl-00350Process MBL Segment for Container
Action Rules
Business View: Assuming container equipment is loaded and has a valid cargo control number during the 'Process MBL Segment for Container' routine, when mbl processing is required for the container, the system executes logic to ensure that execute mbl segment loading procedure for the container.
Given
Container equipment is loaded and has a valid cargo control number
When
MBL processing is required for the container
Then
Execute MBL segment loading procedure for the container
R-GCCS358C-cbl-00352Insert Single VID Segment
Action Rules
Business View: <EXCLUSION CRITERIA> If equipment is the last in the list or does not qualify for flat car-container pairing, and vid segment is populated and not empty occurs during the 'Insert Single VID Segment' routine, then the system must guarantee that insert the vid segment into the transmission data.
EXCLUDING
Equipment is the last in the list or does not qualify for flat car-container pairing
When
VID segment is populated and not empty
Then
Insert the VID segment into the transmission data
R-GCCS358C-cbl-00353Equipment Has CCN and is Loaded?
Decision Rules
Business View: <EXCLUSION CRITERIA> If a single equipment item that is not part of flat car-container pairing, and the equipment is loaded and has a cargo control number (ccn) that is not spaces occurs during the 'Equipment Has CCN and is Loaded?' routine, then the system must guarantee that process the mbl segment for the equipment.
EXCLUDING
A single equipment item that is not part of flat car-container pairing
When
The equipment is loaded and has a cargo control number (CCN) that is not spaces
Then
Process the MBL segment for the equipment
R-GCCS358C-cbl-00354Process MBL Segment
Action Rules
Business View: Assuming single equipment is loaded and has a valid cargo control number during the 'Process MBL Segment' routine, when mbl processing is required for the equipment, the system executes logic to ensure that execute mbl segment loading procedure for the equipment.
Given
Single equipment is loaded and has a valid cargo control number
When
MBL processing is required for the equipment
Then
Execute MBL segment loading procedure for the equipment
R-GCCS358C-cbl-00355CCN Key = '6105I'?
Decision Rules
Business View: Assuming an equipment record is being processed for mbl segment generation during the 'CCN Key = '6105I'?' routine, when the ccn key starts with '6105i', the system executes logic to ensure that skip mbl segment generation and check if first equipment requires amendment processing.
Given
An equipment record is being processed for MBL segment generation
When
The CCN key starts with '6105I'
Then
Skip MBL segment generation and check if first equipment requires amendment processing
R-GCCS358C-cbl-00356CCN starts with '2156'?
Decision Rules
Business View: Assuming an mbl segment is being created for equipment with a valid ccn during the 'CCN starts with '2156'?' routine, when the ccn starts with '2156', the system executes logic to ensure that set scac code to 'cffo', otherwise set scac code to 'cprs'.
Given
An MBL segment is being created for equipment with a valid CCN
When
The CCN starts with '2156'
Then
Set SCAC code to 'CFFO', otherwise set SCAC code to 'CPRS'
R-GCCS358C-cbl-00357Set CCN as Bill of Lading Number
Definitional Rules
Business View: Assuming an mbl segment is being initialized during the 'Set CCN as Bill of Lading Number' routine, when the equipment has a valid ccn key, the system executes logic to ensure that set the ccn key as the bill of lading waybill number in the mbl segment.
Given
An MBL segment is being initialized
When
The equipment has a valid CCN key
Then
Set the CCN key as the bill of lading waybill number in the MBL segment
R-GCCS358C-cbl-00358Set Condition Response Code
Definitional Rules
Business View: Assuming an mbl segment is being populated during the 'Set Condition Response Code' routine, when the equipment record contains a condition response code, the system executes logic to ensure that set the mbl condition response code to the equipment's condition response code value.
Given
An MBL segment is being populated
When
The equipment record contains a condition response code
Then
Set the MBL condition response code to the equipment's condition response code value
R-GCCS358C-cbl-00359Response Code Empty?
Decision Rules
Business View: <EXCLUSION CRITERIA> If an mbl segment has an empty response code, and the bill of lading waybill number is not empty occurs during the 'Response Code Empty?' routine, then the system must guarantee that set response code to 'y', otherwise set response code to 'n'.
EXCLUDING
An MBL segment has an empty response code
When
The bill of lading waybill number is not empty
Then
Set response code to 'Y', otherwise set response code to 'N'
R-GCCS358C-cbl-00360Cargo Status = 'R' 'Revenue'?
Decision Rules
Business View: Assuming an mbl segment is being processed for cargo with in-transit status during the 'Cargo Status = 'R' 'Revenue'?' routine, when the cargo in-transit status is 'r' (revenue), the system executes logic to ensure that set bill of lading to 'na', set response code to 'n', and if post-emanifest then set exception code to '08'.
Given
An MBL segment is being processed for cargo with in-transit status
When
The cargo in-transit status is 'R' (Revenue)
Then
Set bill of lading to 'NA', set response code to 'N', and if post-emanifest then set exception code to '08'
R-GCCS358C-cbl-00361Haulage Rights Exist?
Decision Rules
Business View: Assuming an mbl segment is being processed for cargo during the 'Haulage Rights Exist?' routine, when the cargo has haulage rights defined, the system executes logic to ensure that set scac code to the haulage rights scac and set response code to 'n'.
Given
An MBL segment is being processed for cargo
When
The cargo has haulage rights defined
Then
Set SCAC code to the haulage rights SCAC and set response code to 'N'
R-GCCS358C-cbl-00362First Equipment & Amendment?
Process Rules
Business View: Assuming an mbl segment has been processed during the 'First Equipment & Amendment?' routine, when this is the first equipment (sub-tl = 1) and the transaction is an amendment, the system executes logic to ensure that generate an m13 amendment segment with amendment code '60'.
Given
An MBL segment has been processed
When
This is the first equipment (SUB-TL = 1) and the transaction is an amendment
Then
Generate an M13 amendment segment with amendment code '60'
R-GCCS358C-cbl-00376Check CCN Key Prefix
Decision Rules
Business View: Assuming a cargo record with a ccn key exists for processing during the 'Check CCN Key Prefix' routine, when the system evaluates the ccn key prefix during mbl segment creation, the system executes logic to ensure that cffo scac code is assigned if ccn starts with '2156', otherwise cprs scac code is assigned.
Given
A cargo record with a CCN key exists for processing
When
The system evaluates the CCN key prefix during MBL segment creation
Then
CFFO SCAC code is assigned if CCN starts with '2156', otherwise CPRS SCAC code is assigned
R-GCCS358C-cbl-00377Haulage Rights Exist?
Decision Rules
Business View: Assuming a cargo record is being processed for mbl segment creation during the 'Haulage Rights Exist?' routine, when the cargo has haulage rights defined with a specific scac code, the system executes logic to ensure that the haulage rights scac code overrides the standard ccn-based scac assignment and response code is set to 'n'.
Given
A cargo record is being processed for MBL segment creation
When
The cargo has haulage rights defined with a specific SCAC code
Then
The haulage rights SCAC code overrides the standard CCN-based SCAC assignment and response code is set to 'N'
R-GCCS358C-cbl-00379Set Exception Code '08'
Process Rules
Business View: Assuming a cargo shipment has revenue transit status 'r' and the processing is post-emanifest during the 'Set Exception Code '08'' routine, when the system processes the mbl segment for this revenue transit cargo, the system executes logic to ensure that the exception code should be set to '08' to indicate post-emanifest revenue transit processing.
Given
A cargo shipment has revenue transit status 'R' and the processing is post-emanifest
When
The system processes the MBL segment for this revenue transit cargo
Then
The exception code should be set to '08' to indicate post-emanifest revenue transit processing
R-GCCS358C-cbl-00380Override Bill of Lading to 'NA'
Action Rules
Business View: Assuming a cargo shipment with in-transit status 'r' (revenue) during the 'Override Bill of Lading to 'NA'' routine, when the system processes the mbl segment, the system executes logic to ensure that the bill of lading waybill field should be set to 'na' regardless of the original cargo ccn key.
Given
A cargo shipment with in-transit status 'R' (Revenue)
When
The system processes the MBL segment
Then
The bill of lading waybill field should be set to 'NA' regardless of the original cargo CCN key
R-GCCS358C-cbl-00381Set Response Code to 'N'
Action Rules
Business View: Assuming a cargo shipment with in-transit status 'r' (revenue) during the 'Set Response Code to 'N'' routine, when the system processes the mbl segment, the system executes logic to ensure that the yes/no response code should be set to 'n' to indicate negative response.
Given
A cargo shipment with in-transit status 'R' (Revenue)
When
The system processes the MBL segment
Then
The yes/no response code should be set to 'N' to indicate negative response
R-GCCS358C-cbl-00108Initialize VID Segment Structure
Process Rules
Business View: Assuming equipment processing is starting for 5040 version during the 'Initialize VID Segment Structure' routine, when vid segment initialization is required, the system executes logic to ensure that vid segment structure is cleared and ready for data population.
Given
Equipment processing is starting for 5040 version
When
VID segment initialization is required
Then
VID segment structure is cleared and ready for data population
R-GCCS358C-cbl-00109Set Equipment Identifier to 'VID'
Definitional Rules
Business View: Assuming vid segment is being created during the 'Set Equipment Identifier to 'VID'' routine, when equipment identifier needs to be set, the system executes logic to ensure that vid identifier is set to 'vid'.
Given
VID segment is being created
When
Equipment identifier needs to be set
Then
VID identifier is set to 'VID'
R-GCCS358C-cbl-00110Copy Equipment Type from Train List
Process Rules
Business View: Assuming equipment data exists in train list during the 'Copy Equipment Type from Train List' routine, when vid segment requires equipment type, the system executes logic to ensure that equipment type is copied from train list vid01 field to vid equipment description code.
Given
Equipment data exists in train list
When
VID segment requires equipment type
Then
Equipment type is copied from train list VID01 field to VID equipment description code
R-GCCS358C-cbl-00111Copy Equipment Initial from Train List
Process Rules
Business View: Assuming equipment data exists in train list during the 'Copy Equipment Initial from Train List' routine, when vid segment requires equipment initial, the system executes logic to ensure that equipment initial is copied from train list vid02 field to vid equipment initial.
Given
Equipment data exists in train list
When
VID segment requires equipment initial
Then
Equipment initial is copied from train list VID02 field to VID equipment initial
R-GCCS358C-cbl-00112Copy Equipment Number from Train List
Process Rules
Business View: Assuming equipment data exists in train list during the 'Copy Equipment Number from Train List' routine, when vid segment requires equipment number, the system executes logic to ensure that equipment number is copied from train list vid03 field to vid equipment number.
Given
Equipment data exists in train list
When
VID segment requires equipment number
Then
Equipment number is copied from train list VID03 field to VID equipment number
R-GCCS358C-cbl-00118In-Transit Status = 'T'?
Decision Rules
Business View: <EXCLUSION CRITERIA> If equipment has associated cargo information and in-transit status is not 'r', and cargo in-transit status is 't' for transit occurs during the 'In-Transit Status = 'T'?' routine, then the system must guarantee that vid location id is set to manifest-to-trans-code from cargo data.
EXCLUDING
Equipment has associated cargo information AND in-transit status is not 'R'
When
Cargo in-transit status is 'T' for transit
Then
VID location ID is set to manifest-to-trans-code from cargo data
R-GCCS358C-cbl-00121Insert VID Segment to Database
Action Rules
Business View: Assuming vid segment is fully populated with equipment data during the 'Insert VID Segment to Database' routine, when vid segment insertion is performed, the system executes logic to ensure that vid segment is stored in transmission database with proper sequence number.
Given
VID segment is fully populated with equipment data
When
VID segment insertion is performed
Then
VID segment is stored in transmission database with proper sequence number
R-GCCS358C-cbl-00122Process N9 and MBL Segments
Process Rules
Business View: Assuming vid equipment segment has been processed during the 'Process N9 and MBL Segments' routine, when associated segment processing is required, the system executes logic to ensure that n9 reference segments and mbl bill of lading segments are processed based on equipment and cargo conditions.
Given
VID equipment segment has been processed
When
Associated segment processing is required
Then
N9 reference segments and MBL bill of lading segments are processed based on equipment and cargo conditions
R-GCCS358C-cbl-00130Retrieve Cargo Information - Get cargo details from Canadian cargo database using CCN key
Action Rules
Business View: Assuming a train equipment record contains a ccn key for cargo identification during the 'Retrieve Cargo Information - Get cargo details from Canadian cargo database using CCN key' routine, when the system needs to retrieve cargo information for manifest processing, the system executes logic to ensure that the system queries the canadian cargo database using the ccn key and sets cargo availability flag based on successful retrieval.
Given
A train equipment record contains a CCN key for cargo identification
When
The system needs to retrieve cargo information for manifest processing
Then
The system queries the Canadian cargo database using the CCN key and sets cargo availability flag based on successful retrieval
R-GCCS358C-cbl-00133Generate Error Message
Validation Rules
Business View: Assuming a database error occurs during cargo information retrieval during the 'Generate Error Message' routine, when the system cannot access the canadian cargo database or encounters retrieval failures, the system executes logic to ensure that the system generates an error message indicating cargo retrieval failure and terminates processing.
Given
A database error occurs during cargo information retrieval
When
The system cannot access the Canadian cargo database or encounters retrieval failures
Then
The system generates an error message indicating cargo retrieval failure and terminates processing
R-GCCS358C-cbl-00134Equipment Marked as Loaded?
Decision Rules
Business View: Assuming an equipment item is being processed for manifest transmission during the 'Equipment Marked as Loaded?' routine, when the equipment load indicator shows loaded status, the system executes logic to ensure that check for cargo documentation to confirm load status.
Given
An equipment item is being processed for manifest transmission
When
The equipment load indicator shows loaded status
Then
Check for cargo documentation to confirm load status
R-GCCS358C-cbl-00137Override Status to 'E' - Empty
Policy Rules
Business View: Assuming equipment is being processed for any manifest during the 'Override Status to 'E' - Empty' routine, when the cargo control number starts with '6105i', the system executes logic to ensure that override equipment status to 'e' for empty regardless of load indicator or cargo presence.
Given
Equipment is being processed for any manifest
When
The cargo control number starts with '6105I'
Then
Override equipment status to 'E' for empty regardless of load indicator or cargo presence
R-GCCS358C-cbl-00138Set Status to 'L' - Loaded for Revenue Empty
Decision Rules
Business View: Assuming equipment is marked as empty and post-emanifest processing is active during the 'Set Status to 'L' - Loaded for Revenue Empty' routine, when equipment has cargo control number documentation present, the system executes logic to ensure that set equipment status to 'l' for loaded to indicate revenue empty movement.
Given
Equipment is marked as empty and post-emanifest processing is active
When
Equipment has cargo control number documentation present
Then
Set equipment status to 'L' for loaded to indicate revenue empty movement
R-GCCS358C-cbl-00139Set Status to 'E' - Empty
Decision Rules
Business View: Assuming equipment is being processed for manifest transmission during the 'Set Status to 'E' - Empty' routine, when equipment load indicator shows empty status, the system executes logic to ensure that set equipment status to 'e' for empty.
Given
Equipment is being processed for manifest transmission
When
Equipment load indicator shows empty status
Then
Set equipment status to 'E' for empty
R-GCCS358C-cbl-00140Set Location ID for Equipment - Assign location ID based on cargo in-transit status (0000 for R status, manifest code for T status)
Decision Rules
Business View: Assuming an equipment record is being processed for manifest reporting during the 'Set Location ID for Equipment - Assign location ID based on cargo in-transit status (0000 for R status, manifest code for T status)' routine, when the system needs to determine the location id and cargo data is available with in-transit status 'r', the system executes logic to ensure that the location id should be set to '0000'.
Given
An equipment record is being processed for manifest reporting
When
The system needs to determine the location ID and cargo data is available with in-transit status 'R'
Then
The location ID should be set to '0000'
R-GCCS358C-cbl-00141Set Location ID for Equipment - Assign location ID based on cargo in-transit status (0000 for R status, manifest code for T status)
Decision Rules
Business View: Assuming an equipment record is being processed for manifest reporting and cargo data is available during the 'Set Location ID for Equipment - Assign location ID based on cargo in-transit status (0000 for R status, manifest code for T status)' routine, when the cargo has in-transit status 't', the system executes logic to ensure that the location id should be set to the manifest transfer code from the cargo data.
Given
An equipment record is being processed for manifest reporting and cargo data is available
When
The cargo has in-transit status 'T'
Then
The location ID should be set to the manifest transfer code from the cargo data
R-GCCS358C-cbl-00142Set Location ID for Equipment - Assign location ID based on cargo in-transit status (0000 for R status, manifest code for T status)
Decision Rules
Business View: Assuming an equipment record is being processed for manifest reporting during the 'Set Location ID for Equipment - Assign location ID based on cargo in-transit status (0000 for R status, manifest code for T status)' routine, when either no cargo data is available or the cargo in-transit status is neither 'r' nor 't', the system executes logic to ensure that the location id should be set to spaces (empty).
Given
An equipment record is being processed for manifest reporting
When
Either no cargo data is available or the cargo in-transit status is neither 'R' nor 'T'
Business View: Assuming the system needs to create an n9 reference segment during the 'Initialize N9 Segment Structure' routine, when the n9 segment creation process begins, the system executes logic to ensure that the n9 segment structure is initialized to clear any previous data.
Given
The system needs to create an N9 reference segment
When
The N9 segment creation process begins
Then
The N9 segment structure is initialized to clear any previous data
R-GCCS358C-cbl-00144Set Reference Qualifier to '76'
Definitional Rules
Business View: Assuming an n9 reference segment is being created during the 'Set Reference Qualifier to '76'' routine, when the reference qualifier needs to be assigned, the system executes logic to ensure that the reference qualifier is set to '76'.
Given
An N9 reference segment is being created
When
The reference qualifier needs to be assigned
Then
The reference qualifier is set to '76'
R-GCCS358C-cbl-00145Set Reference Number to 'EDT'
Definitional Rules
Business View: Assuming an n9 reference segment is being populated during the 'Set Reference Number to 'EDT'' routine, when the reference number field needs to be assigned, the system executes logic to ensure that the reference number is set to 'edt'.
Given
An N9 reference segment is being populated
When
The reference number field needs to be assigned
Then
The reference number is set to 'EDT'
R-GCCS358C-cbl-00146Extract Departure Date from Train Data
Computation Rules
Business View: Assuming train data contains estimated departure date information during the 'Extract Departure Date from Train Data' routine, when the n9 segment date field needs to be populated, the system executes logic to ensure that the departure date from train data is extracted and assigned to the n9 date field positions 3-8.
Given
Train data contains estimated departure date information
When
The N9 segment date field needs to be populated
Then
The departure date from train data is extracted and assigned to the N9 date field positions 3-8
R-GCCS358C-cbl-00147Format Date with Century Prefix
Computation Rules
Business View: Assuming the n9 date field needs century information during the 'Format Date with Century Prefix' routine, when the date is being formatted for the n9 segment, the system executes logic to ensure that the machine century is added to positions 1-2 of the n9 date field.
Given
The N9 date field needs century information
When
The date is being formatted for the N9 segment
Then
The machine century is added to positions 1-2 of the N9 date field
R-GCCS358C-cbl-00148Extract Departure Time from Train Data
Computation Rules
Business View: Assuming train data contains estimated departure time information during the 'Extract Departure Time from Train Data' routine, when the n9 segment time field needs to be populated, the system executes logic to ensure that the departure time from train data is extracted and assigned to positions 1-4 of the n9 time field.
Given
Train data contains estimated departure time information
When
The N9 segment time field needs to be populated
Then
The departure time from train data is extracted and assigned to positions 1-4 of the N9 time field
R-GCCS358C-cbl-00150Set Time Code to 'ES' - Eastern Standard
Definitional Rules
Business View: Assuming the n9 segment time information needs a time zone indicator during the 'Set Time Code to 'ES' - Eastern Standard' routine, when the time code field is being assigned, the system executes logic to ensure that the time code is set to 'es' for eastern standard time.
Given
The N9 segment time information needs a time zone indicator
When
The time code field is being assigned
Then
The time code is set to 'ES' for Eastern Standard time
R-GCCS358C-cbl-00151Insert N9 Segment into Transmission
Action Rules
Business View: Assuming the n9 segment has been fully populated with reference data during the 'Insert N9 Segment into Transmission' routine, when the segment needs to be added to the transmission, the system executes logic to ensure that the n9 segment is inserted into the transmission data structure and the dependent segment insertion process is performed.
Given
The N9 segment has been fully populated with reference data
When
The segment needs to be added to the transmission
Then
The N9 segment is inserted into the transmission data structure and the dependent segment insertion process is performed
R-GCCS358C-cbl-00152CCN Key starts with '6105I'?
Decision Rules
Business View: Assuming an equipment item is being processed for mbl segment creation during the 'CCN Key starts with '6105I'?' routine, when the cargo control number (ccn) key starts with '6105i', the system executes logic to ensure that the system skips mbl segment creation and proceeds to check for amendment processing requirements.
Given
An equipment item is being processed for MBL segment creation
When
The cargo control number (CCN) key starts with '6105I'
Then
The system skips MBL segment creation and proceeds to check for amendment processing requirements
R-GCCS358C-cbl-00153CCN starts with '2156'?
Decision Rules
Business View: Assuming a master bill of lading segment is being created for equipment during the 'CCN starts with '2156'?' routine, when the cargo control number starts with '2156', the system executes logic to ensure that the system sets the scac code to 'cffo', otherwise it sets the scac code to 'cprs'.
Given
A Master Bill of Lading segment is being created for equipment
When
The cargo control number starts with '2156'
Then
The system sets the SCAC code to 'CFFO', otherwise it sets the SCAC code to 'CPRS'
R-GCCS358C-cbl-00154Set CCN as Bill of Lading Number
Definitional Rules
Business View: Assuming a master bill of lading segment is being initialized during the 'Set CCN as Bill of Lading Number' routine, when the equipment has an associated cargo control number, the system executes logic to ensure that the system sets the ccn as the bill of lading waybill number.
Given
A Master Bill of Lading segment is being initialized
When
The equipment has an associated cargo control number
Then
The system sets the CCN as the bill of lading waybill number
R-GCCS358C-cbl-00155Set Condition Response Code from Equipment
Definitional Rules
Business View: Assuming a master bill of lading segment is being populated during the 'Set Condition Response Code from Equipment' routine, when equipment data contains a condition response code, the system executes logic to ensure that the system transfers the equipment condition response code to the mbl segment.
Given
A Master Bill of Lading segment is being populated
When
Equipment data contains a condition response code
Then
The system transfers the equipment condition response code to the MBL segment
R-GCCS358C-cbl-00156Response Code Empty?
Decision Rules
Business View: Assuming a master bill of lading segment has an empty condition response code during the 'Response Code Empty?' routine, when the bill of lading waybill number is present, the system executes logic to ensure that the system sets the response code to 'y', otherwise it sets the response code to 'n'.
Given
A Master Bill of Lading segment has an empty condition response code
When
The bill of lading waybill number is present
Then
The system sets the response code to 'Y', otherwise it sets the response code to 'N'
R-GCCS358C-cbl-00158Post-Emanifest Processing?
Decision Rules
Business View: Assuming cargo is in revenue transit status with bill of lading set to 'na' during the 'Post-Emanifest Processing?' routine, when the processing mode is post-emanifest, the system executes logic to ensure that the system sets the exception code to '08'.
Given
Cargo is in revenue transit status with bill of lading set to 'NA'
When
The processing mode is post-emanifest
Then
The system sets the exception code to '08'
R-GCCS358C-cbl-00159Haulage Rights Exist?
Decision Rules
Business View: Assuming equipment has associated cargo being processed for mbl segment during the 'Haulage Rights Exist?' routine, when the cargo has haulage rights with a haulage rights scac code, the system executes logic to ensure that the system overrides the scac code with the haulage rights scac and sets the response code to 'n'.
Given
Equipment has associated cargo being processed for MBL segment
When
The cargo has haulage rights with a haulage rights SCAC code
Then
The system overrides the SCAC code with the haulage rights SCAC and sets the response code to 'N'
R-GCCS358C-cbl-00160First Equipment and Amendment?
Process Rules
Business View: Assuming an mbl segment has been processed and inserted during the 'First Equipment and Amendment?' routine, when this is the first equipment item being processed and the transaction is an amendment, the system executes logic to ensure that the system creates an m13 amendment segment with amendment code '60'.
Given
An MBL segment has been processed and inserted
When
This is the first equipment item being processed and the transaction is an amendment
Then
The system creates an M13 amendment segment with amendment code '60'
R-GCCS358C-cbl-00261Set Exception Code to '08'
Decision Rules
Business View: Assuming cargo has revenue transit status 'r' and processing is in post-emanifest mode during the 'Set Exception Code to '08'' routine, when the transaction is post-emanifest (gcwb4tl-post-emanifest is true), the system executes logic to ensure that set mbl exception code to '08'.
Given
Cargo has revenue transit status 'R' and processing is in post-emanifest mode
When
The transaction is post-emanifest (GCWB4TL-POST-EMANIFEST is true)
Then
Set MBL exception code to '08'
R-GCCS358C-cbl-00309Set Exception Code '08'
Decision Rules
Business View: Assuming a cargo record exists with in-transit status 'r' and the system is performing post-emanifest processing during the 'Set Exception Code '08'' routine, when the mbl segment is being created for the cargo, the system executes logic to ensure that the system sets exception code '08' in the mbl segment.
Given
A cargo record exists with in-transit status 'R' and the system is performing post-emanifest processing
When
The MBL segment is being created for the cargo
Then
The system sets exception code '08' in the MBL segment
R-GCCS358C-cbl-00310Continue MBL Processing
Decision Rules
Business View: Assuming a cargo record has in-transit status 'r' during the 'Continue MBL Processing' routine, when the mbl segment is being processed, the system executes logic to ensure that the system sets the bol waybill field to 'na'.
Given
A cargo record has in-transit status 'R'
When
The MBL segment is being processed
Then
The system sets the BOL waybill field to 'NA'
R-GCCS358C-cbl-00311Continue MBL Processing
Decision Rules
Business View: Assuming a cargo record has in-transit status 'r' during the 'Continue MBL Processing' routine, when the mbl segment response code is being determined, the system executes logic to ensure that the system sets the yes/no response code to 'n'.
Given
A cargo record has in-transit status 'R'
When
The MBL segment response code is being determined
Then
The system sets the yes/no response code to 'N'
R-GCCS358C-cbl-00161Handle Special SCAC Assignment - Assign CFFO SCAC for CCN starting with 2156, otherwise use CPRS
Decision Rules
Business View: Assuming a train list equipment entry with a ccn key is being processed for mbl segment creation during the 'Handle Special SCAC Assignment - Assign CFFO SCAC for CCN starting with 2156, otherwise use CPRS' routine, when the system evaluates the ccn prefix to determine the appropriate scac code, the system executes logic to ensure that if the ccn starts with '2156', assign cffo scac code, otherwise assign cprs scac code to the mbl segment.
Given
A train list equipment entry with a CCN key is being processed for MBL segment creation
When
The system evaluates the CCN prefix to determine the appropriate SCAC code
Then
If the CCN starts with '2156', assign CFFO SCAC code, otherwise assign CPRS SCAC code to the MBL segment
R-GCCS358C-cbl-00166Set Exception Code to '08'
Decision Rules
Business View: Assuming a cargo record has revenue in-transit status and the processing is post-emanifest during the 'Set Exception Code to '08'' routine, when the cargo in-transit status is 'r' (revenue) and post-emanifest flag is true, the system executes logic to ensure that the exception code should be set to '08'.
Given
A cargo record has revenue in-transit status and the processing is post-emanifest
When
The cargo in-transit status is 'R' (Revenue) and post-emanifest flag is true
Business View: Assuming a train amendment is being processed and the first equipment position has no cargo control number during the 'Initialize MBL Segment Structure' routine, when the system needs to create a dummy mbl segment, the system executes logic to ensure that the mbl segment structure should be initialized to empty values.
Given
A train amendment is being processed and the first equipment position has no cargo control number
When
The system needs to create a dummy MBL segment
Then
The MBL segment structure should be initialized to empty values
R-GCCS358C-cbl-00168Set MBL Identifier to 'MBL'
Definitional Rules
Business View: Assuming a dummy mbl segment is being created during the 'Set MBL Identifier to 'MBL'' routine, when the segment identifier needs to be set, the system executes logic to ensure that the mbl identifier should be set to 'mbl'.
Given
A dummy MBL segment is being created
When
The segment identifier needs to be set
Then
The MBL identifier should be set to 'MBL'
R-GCCS358C-cbl-00169Set SCAC Code to 'CPRS'
Policy Rules
Business View: Assuming a dummy mbl segment is being created for a train amendment during the 'Set SCAC Code to 'CPRS'' routine, when the scac code needs to be assigned, the system executes logic to ensure that the scac code should be set to 'cprs'.
Given
A dummy MBL segment is being created for a train amendment
When
The SCAC code needs to be assigned
Then
The SCAC code should be set to 'CPRS'
R-GCCS358C-cbl-00170Set Bill of Lading to 'NA'
Definitional Rules
Business View: Assuming a dummy mbl segment is being created during the 'Set Bill of Lading to 'NA'' routine, when the bill of lading number needs to be set, the system executes logic to ensure that the bill of lading should be set to 'na' to indicate not applicable.
Given
A dummy MBL segment is being created
When
The bill of lading number needs to be set
Then
The bill of lading should be set to 'NA' to indicate not applicable
R-GCCS358C-cbl-00171Set Exception Code to '06'
Policy Rules
Business View: Assuming a dummy mbl segment is being created for a train amendment during the 'Set Exception Code to '06'' routine, when the exception code needs to be assigned, the system executes logic to ensure that the exception code should be set to '06'.
Given
A dummy MBL segment is being created for a train amendment
When
The exception code needs to be assigned
Then
The exception code should be set to '06'
R-GCCS358C-cbl-00172Insert MBL Segment into Transmission Data
Action Rules
Business View: Assuming a dummy mbl segment has been created with all required fields during the 'Insert MBL Segment into Transmission Data' routine, when the segment needs to be added to the transmission, the system executes logic to ensure that the mbl segment should be inserted into the transmission data structure.
Given
A dummy MBL segment has been created with all required fields
When
The segment needs to be added to the transmission
Then
The MBL segment should be inserted into the transmission data structure
R-GCCS358C-cbl-00173Build M13 Amendment Segment
Process Rules
Business View: Assuming a dummy mbl segment has been created and inserted during the 'Build M13 Amendment Segment' routine, when amendment processing continues, the system executes logic to ensure that an m13 amendment segment should be created.
Business View: Assuming the system needs to create an m13 amendment segment during the 'Initialize M13 Segment Structure' routine, when the m13 segment initialization is triggered, the system executes logic to ensure that the m13 segment structure is cleared and ready for data population.
Given
The system needs to create an M13 amendment segment
When
The M13 segment initialization is triggered
Then
The M13 segment structure is cleared and ready for data population
R-GCCS358C-cbl-00175Set M13 Identifier
Definitional Rules
Business View: Assuming an m13 segment structure is initialized during the 'Set M13 Identifier' routine, when the segment identifier needs to be set, the system executes logic to ensure that the m13 identifier field is populated with 'm13'.
Given
An M13 segment structure is initialized
When
The segment identifier needs to be set
Then
The M13 identifier field is populated with 'M13'
R-GCCS358C-cbl-00176Set SCAC Code to CPRS
Definitional Rules
Business View: Assuming an m13 segment with identifier set during the 'Set SCAC Code to CPRS' routine, when the scac code needs to be assigned, the system executes logic to ensure that the scac code field is populated with 'cprs'.
Given
An M13 segment with identifier set
When
The SCAC code needs to be assigned
Then
The SCAC code field is populated with 'CPRS'
R-GCCS358C-cbl-00177Set Location ID from Canadian Station Code
Definitional Rules
Business View: Assuming an m13 segment with scac code set and canadian station code available in station reference during the 'Set Location ID from Canadian Station Code' routine, when the location identifier needs to be populated, the system executes logic to ensure that the location id field is populated with the canadian station code from the station reference table.
Given
An M13 segment with SCAC code set and Canadian station code available in station reference
When
The location identifier needs to be populated
Then
The location ID field is populated with the Canadian station code from the station reference table
R-GCCS358C-cbl-00178Set Bill of Lading/Waybill Number from Train Key
Definitional Rules
Business View: Assuming an m13 segment with location id set and train key available during the 'Set Bill of Lading/Waybill Number from Train Key' routine, when the bill of lading/waybill number needs to be assigned, the system executes logic to ensure that the bill of lading/waybill number field is populated with the train key identifier.
Given
An M13 segment with location ID set and train key available
When
The bill of lading/waybill number needs to be assigned
Then
The bill of lading/waybill number field is populated with the train key identifier
R-GCCS358C-cbl-00179Set Amendment Code to 60
Definitional Rules
Business View: Assuming an m13 segment with bill of lading number set during the 'Set Amendment Code to 60' routine, when the amendment code needs to be assigned, the system executes logic to ensure that the amendment code field is populated with '60' to indicate train amendment.
Given
An M13 segment with bill of lading number set
When
The amendment code needs to be assigned
Then
The amendment code field is populated with '60' to indicate train amendment
R-GCCS358C-cbl-00180Insert M13 Segment into Transmission
Action Rules
Business View: Assuming a complete m13 segment with all required fields populated during the 'Insert M13 Segment into Transmission' routine, when the m13 segment needs to be added to the transmission, the system executes logic to ensure that the m13 segment is inserted into the transmission data structure for edi processing.
Given
A complete M13 segment with all required fields populated
When
The M13 segment needs to be added to the transmission
Then
The M13 segment is inserted into the transmission data structure for EDI processing
R-GCCS358C-cbl-00186Store Canadian Station Code
Process Rules
Business View: Assuming a valid canadian station code has been retrieved and validated during the 'Store Canadian Station Code' routine, when the station lookup operation completes successfully, the system executes logic to ensure that the table segment containing the canadian station code is stored for subsequent processing.
Given
A valid Canadian station code has been retrieved and validated
When
The station lookup operation completes successfully
Then
The table segment containing the Canadian station code is stored for subsequent processing
R-GCCS358C-cbl-00187Generate Station Not Found Error
Validation Rules
Business View: Assuming a station table lookup operation has failed to find a matching record during the 'Generate Station Not Found Error' routine, when the system processes the lookup failure, the system executes logic to ensure that an error message is generated containing 'sc table entry for [station] not found rc=' with the station identifier and return code.
Given
A station table lookup operation has failed to find a matching record
When
The system processes the lookup failure
Then
An error message is generated containing 'SC TABLE ENTRY FOR [station] NOT FOUND RC=' with the station identifier and return code
R-GCCS358C-cbl-00188Set EDI Send Function Name
Action Rules
Business View: Assuming the system needs to initiate edi transmission processing during the 'Set EDI Send Function Name' routine, when the edi send function is being prepared, the system executes logic to ensure that the system sets the edi send function name flag to true to identify the correct function type.
Given
The system needs to initiate EDI transmission processing
When
The EDI send function is being prepared
Then
The system sets the EDI send function name flag to true to identify the correct function type
R-GCCS358C-cbl-00189Set Security Parameters
Policy Rules
Business View: Assuming an edi transmission is being prepared for sending during the 'Set Security Parameters' routine, when security parameters need to be configured, the system executes logic to ensure that the system sets the security byte to high-values to establish maximum security level.
Given
An EDI transmission is being prepared for sending
When
Security parameters need to be configured
Then
The system sets the security byte to high-values to establish maximum security level
R-GCCS358C-cbl-00190Set Transmission Number
Process Rules
Business View: Assuming a transmission number has been generated for the edi message during the 'Set Transmission Number' routine, when the edi transmission structure is being populated, the system executes logic to ensure that the system assigns the workspace transmission number to the edi transmission number field.
Given
A transmission number has been generated for the EDI message
When
The EDI transmission structure is being populated
Then
The system assigns the workspace transmission number to the EDI transmission number field
R-GCCS358C-cbl-00191Prepare Message Output
Process Rules
Business View: Assuming edi input data has been prepared in the gcx121 structure during the 'Prepare Message Output' routine, when the message needs to be formatted for output transmission, the system executes logic to ensure that the system moves the gcx121 input data to the message output text field.
Given
EDI input data has been prepared in the GCX121 structure
When
The message needs to be formatted for output transmission
Then
The system moves the GCX121 input data to the message output text field
R-GCCS358C-cbl-00192Set Function Length
Process Rules
Business View: Assuming the edi message has been prepared for transmission during the 'Set Function Length' routine, when function length parameters need to be configured, the system executes logic to ensure that the system sets the edi send function length flag to true.
Given
The EDI message has been prepared for transmission
When
Function length parameters need to be configured
Then
The system sets the EDI send function length flag to true
R-GCCS358C-cbl-00193Insert Purge Message
Action Rules
Business View: Assuming the edi message has been fully prepared with all required parameters during the 'Insert Purge Message' routine, when the message needs to be queued for transmission, the system executes logic to ensure that the system calls the purge message insertion process to queue the message.
Given
The EDI message has been fully prepared with all required parameters
When
The message needs to be queued for transmission
Then
The system calls the purge message insertion process to queue the message
R-GCCS358C-cbl-00195Set Security Parameters
Policy Rules
Business View: Assuming a log entry is being prepared for transmission during the 'Set Security Parameters' routine, when security parameters need to be established, the system executes logic to ensure that the security byte should be set to high-values for maximum security.
Given
A log entry is being prepared for transmission
When
Security parameters need to be established
Then
The security byte should be set to high-values for maximum security
R-GCCS358C-cbl-00196Set Train ID from Input
Process Rules
Business View: Assuming a train manifest transaction is being logged during the 'Set Train ID from Input' routine, when the train identifier needs to be recorded, the system executes logic to ensure that the canadian customs train id should be copied from the input train list to the log entry.
Given
A train manifest transaction is being logged
When
The train identifier needs to be recorded
Then
The Canadian customs train ID should be copied from the input train list to the log entry
R-GCCS358C-cbl-00197Mark as New Canadian Train
Definitional Rules
Business View: Assuming a canadian train manifest is being processed during the 'Mark as New Canadian Train' routine, when the transaction type needs to be classified, the system executes logic to ensure that the transaction should be marked as a new canadian train entry.
Given
A Canadian train manifest is being processed
When
The transaction type needs to be classified
Then
The transaction should be marked as a new Canadian train entry
R-GCCS358C-cbl-00203Clear Message Field
Validation Rules
Business View: Assuming a log entry is being prepared during the 'Clear Message Field' routine, when the message field needs to be initialized, the system executes logic to ensure that the message field should be set to spaces to ensure clean data.
Given
A log entry is being prepared
When
The message field needs to be initialized
Then
The message field should be set to spaces to ensure clean data
R-GCCS358C-cbl-00204Prepare Log Entry for Transmission
Process Rules
Business View: Assuming all log entry fields have been populated during the 'Prepare Log Entry for Transmission' routine, when the log entry needs to be prepared for transmission, the system executes logic to ensure that the complete log input structure should be moved to the message output text field.
Given
All log entry fields have been populated
When
The log entry needs to be prepared for transmission
Then
The complete log input structure should be moved to the message output text field
R-GCCS358C-cbl-00205Send Log Entry to System
Process Rules
Business View: Assuming a log entry is ready for transmission during the 'Send Log Entry to System' routine, when the message length needs to be specified, the system executes logic to ensure that the log update function length flag should be set to true to indicate proper message sizing.
Given
A log entry is ready for transmission
When
The message length needs to be specified
Then
The log update function length flag should be set to true to indicate proper message sizing
R-GCCS358C-cbl-00206Send Log Entry to System
Action Rules
Business View: Assuming a log entry is prepared with correct length specification during the 'Send Log Entry to System' routine, when the log entry needs to be transmitted, the system executes logic to ensure that the system should perform the insert purge message operation to send the log entry to the logging system.
Given
A log entry is prepared with correct length specification
When
The log entry needs to be transmitted
Then
The system should perform the insert purge message operation to send the log entry to the logging system
R-GCCS358C-cbl-00207Processing Mode Valid?
Validation Rules
Business View: <EXCLUSION CRITERIA> If a manifest processing request is initiated, and the processing mode is not foreground and not background and not foreground-02 occurs during the 'Processing Mode Valid?' routine, then the system must guarantee that set wrong fb indicator to true and exit processing.
EXCLUDING
A manifest processing request is initiated
When
The processing mode is not foreground AND not background AND not foreground-02
Then
Set wrong FB indicator to true and exit processing
R-GCCS358C-cbl-00208Database Insert Failed?
Process Rules
Business View: Assuming a transmission root segment insert is attempted during the 'Database Insert Failed?' routine, when the database insert fails with a non-space status code, the system executes logic to ensure that increment the transmission number by 1 and retry the insert operation until successful.
Given
A transmission root segment insert is attempted
When
The database insert fails with a non-space status code
Then
Increment the transmission number by 1 and retry the insert operation until successful
R-GCCS358C-cbl-00209Station Table Entry Found?
Validation Rules
Business View: <EXCLUSION CRITERIA> If a station lookup is performed for manifest processing, and the station table entry is not found or the canadian station code is '0000' occurs during the 'Station Table Entry Found?' routine, then the system must guarantee that build error message with station identifier and terminate processing with error handler.
EXCLUDING
A station lookup is performed for manifest processing
When
The station table entry is not found OR the Canadian station code is '0000'
Then
Build error message with station identifier and terminate processing with error handler
R-GCCS358C-cbl-00210Cargo Record Found?
Validation Rules
Business View: <EXCLUSION CRITERIA> If a cargo lookup is performed for equipment with a cargo key, and the cargo record is not found in the database occurs during the 'Cargo Record Found?' routine, then the system must guarantee that build error message with the cargo control number and terminate processing with error handler.
EXCLUDING
A cargo lookup is performed for equipment with a cargo key
When
The cargo record is not found in the database
Then
Build error message with the cargo control number and terminate processing with error handler
R-GCCS358C-cbl-00211Message Write Failed?
Process Rules
Business View: Assuming a message write operation is attempted during the 'Message Write Failed?' routine, when the message write operation fails with a non-zero return code, the system executes logic to ensure that build message write error and terminate processing with error handler.
Given
A message write operation is attempted
When
The message write operation fails with a non-zero return code
Then
Build message write error and terminate processing with error handler
R-GCCS358C-cbl-00212Call Error Handler CERR
Action Rules
Business View: Assuming a critical error condition has been detected during the 'Call Error Handler CERR' routine, when error message has been built for the specific error condition, the system executes logic to ensure that call the cerr error handling program to terminate processing.
Given
A critical error condition has been detected
When
Error message has been built for the specific error condition
Then
Call the CERR error handling program to terminate processing
Module: GCCADDCD 241 EDI Rules Found
R-GCCADDCD-cbl-000033:Retrieve Waybill Information
Validation Rules
Business View: Assuming equipment is a car (not container) during the '3:Retrieve Waybill Information' routine, when car id formatting is successful, the system executes logic to ensure that use formatted car id to retrieve shiproot car waybill, otherwise generate invalid car id error message.
Given
Equipment is a car (not container)
When
Car ID formatting is successful
Then
Use formatted car ID to retrieve shiproot car waybill, otherwise generate invalid car ID error message
R-GCCADDCD-cbl-000056:Retrieve Next Cargo Records
Validation Rules
Business View: Assuming cargo record is retrieved during the '6:Retrieve Next Cargo Records' routine, when equipment id equals cargo equipment car and origin railroad number equals ccn carrier index and origin station number equals ccn origin station index and waybill number equals ccn waybill number index, the system executes logic to ensure that process cargo for bond creation or manifest requirements.
Given
Cargo record is retrieved
When
Equipment ID equals cargo equipment car AND origin railroad number equals CCN carrier index AND origin station number equals CCN origin station index AND waybill number equals CCN waybill number index
Then
Process cargo for bond creation or manifest requirements
Business View: Assuming cargo matches equipment criteria during the '7:Check Detour Manifest Requirements' routine, when new bond is created for the cargo, the system executes logic to ensure that set detour manifest as required and store ccn key, otherwise set detour manifest as found and build report.
Given
Cargo matches equipment criteria
When
New bond is created for the cargo
Then
Set detour manifest as required and store CCN key, otherwise set detour manifest as found and build report
R-GCCADDCD-cbl-000078:Build Report Detail Lines
Decision Rules
Business View: <EXCLUSION CRITERIA> If equipment processing is complete, and waybill is not found or no cargo is found or detour manifest is required but not found occurs during the '8:Build Report Detail Lines' routine, then the system must guarantee that build report with appropriate detail and message lines.
EXCLUDING
Equipment processing is complete
When
Waybill is not found OR no cargo is found OR detour manifest is required but not found
Then
Build report with appropriate detail and message lines
R-GCCADDCD-cbl-0001011:Generate Error Messages
Decision Rules
Business View: <EXCLUSION CRITERIA> If report message line is being generated, and detour manifest is required and detour manifest is not found occurs during the '11:Generate Error Messages' routine, then the system must guarantee that set message twenty-seven with detour ccn information.
EXCLUDING
Report message line is being generated
When
Detour manifest is required AND detour manifest is not found
Then
Set message twenty-seven with detour CCN information
R-GCCADDCD-cbl-0001111:Generate Error Messages
Decision Rules
Business View: <EXCLUSION CRITERIA> If report message line is being generated, and waybill is not found and container is found occurs during the '11:Generate Error Messages' routine, then the system must guarantee that set message ten, otherwise when waybill is not found and container is not found, set message twelve.
EXCLUDING
Report message line is being generated
When
Waybill is not found AND container is found
Then
Set message ten, otherwise when waybill is not found AND container is not found, set message twelve
R-GCCADDCD-cbl-0001211:Generate Error Messages
Decision Rules
Business View: <EXCLUSION CRITERIA> If report message line is being generated, and waybill is found and no cargo is found and container is not found and equipment is not conveying car occurs during the '11:Generate Error Messages' routine, then the system must guarantee that set message fifteen with root key and waybill date.
EXCLUDING
Report message line is being generated
When
Waybill is found AND no cargo is found AND container is not found AND equipment is not conveying car
Then
Set message fifteen with root key and waybill date
R-GCCADDCD-cbl-0001311:Generate Error Messages
Policy Rules
Business View: Assuming report message line is being generated and cargo is found during the '11:Generate Error Messages' routine, when cargo status is pending or error or reject or deleted, the system executes logic to ensure that set message sixteen, otherwise when user security level is not 's' and cargo status is blank or reject or error, set message sixteen, otherwise when cargo is linehaul and status is manual, set message sixteen.
Given
Report message line is being generated and cargo is found
When
Cargo status is pending OR error OR reject OR deleted
Then
Set message sixteen, otherwise when user security level is not 'S' AND cargo status is blank OR reject OR error, set message sixteen, otherwise when cargo is linehaul AND status is manual, set message sixteen
R-GCCADDCD-cbl-0001411:Generate Error Messages
Policy Rules
Business View: <EXCLUSION CRITERIA> If report message line is being generated and cargo is found, and canadian customs north train id is not spaces occurs during the '11:Generate Error Messages' routine, then the system must guarantee that set message seventeen.
EXCLUDING
Report message line is being generated and cargo is found
When
Canadian customs north train ID is not spaces
Then
Set message seventeen
R-GCCADDCD-cbl-0001511:Generate Error Messages
Policy Rules
Business View: <EXCLUSION CRITERIA> If report message line is being generated and cargo is found, and cargo is in return transit status and ccn key starts with '6105e' and manifest to transport code does not equal train crossing port occurs during the '11:Generate Error Messages' routine, then the system must guarantee that set message twenty-eight and perform pre-spawn processing for change, otherwise when cargo is not in return transit status and ccn key starts with '6105e' and manifest from transport code does not equal train crossing port, set message twenty-eight and perform pre-spawn processing for diversion.
EXCLUDING
Report message line is being generated and cargo is found
When
Cargo is in return transit status AND CCN key starts with '6105E' AND manifest to transport code does not equal train crossing port
Then
Set message twenty-eight and perform pre-spawn processing for change, otherwise when cargo is not in return transit status AND CCN key starts with '6105E' AND manifest from transport code does not equal train crossing port, set message twenty-eight and perform pre-spawn processing for diversion
R-GCCADDCD-cbl-0001611:Generate Error Messages
Action Rules
Business View: Assuming canadian border crossing message is required for diversion during the '11:Generate Error Messages' routine, when pre-spawn processing is initiated, the system executes logic to ensure that set spawn status to true, increment pre-index, initialize input record, set security byte to high values, populate ccn key, set canadian flag, set diversion flag, and populate border name and code from train crossing information.
Given
Canadian border crossing message is required for diversion
When
Pre-spawn processing is initiated
Then
Set spawn status to true, increment pre-index, initialize input record, set security byte to high values, populate CCN key, set Canadian flag, set diversion flag, and populate border name and code from train crossing information
R-GCCADDCD-cbl-0001711:Generate Error Messages
Action Rules
Business View: Assuming canadian border crossing message is required for change during the '11:Generate Error Messages' routine, when pre-spawn processing is initiated, the system executes logic to ensure that set spawn status to true, increment pre-index, initialize input record, set security byte to high values, populate ccn key, set canadian flag, set change flag, and populate border name and code from train crossing information.
Given
Canadian border crossing message is required for change
When
Pre-spawn processing is initiated
Then
Set spawn status to true, increment pre-index, initialize input record, set security byte to high values, populate CCN key, set Canadian flag, set change flag, and populate border name and code from train crossing information
R-GCCADDCD-cbl-0001919:Retrieve Container from Flat Car
Process Rules
Business View: <EXCLUSION CRITERIA> If container retrieval is required, and container is not found occurs during the '19:Retrieve Container from Flat Car' routine, then the system must guarantee that use root key to retrieve flat car container relationship, then retrieve container equipment, otherwise retrieve container equipment directly. if flat car relationship exists without container equipment, generate system error. if no flat car relationship exists, set message eleven and increment report index.
EXCLUDING
Container retrieval is required
When
Container is not found
Then
Use root key to retrieve flat car container relationship, then retrieve container equipment, otherwise retrieve container equipment directly. If flat car relationship exists without container equipment, generate system error. If no flat car relationship exists, set message eleven and increment report index
R-GCCADDCD-cbl-0002021:Finalize Report Processing
Process Rules
Business View: Assuming equipment processing is complete during the '21:Finalize Report Processing' routine, when no errors exist in report and spawn processing is required, the system executes logic to ensure that process all pre-spawn entries and set error count to spawn count, otherwise when errors exist and spawn processing is required, convert message twenty-eight to message nineteen and increment error count.
Given
Equipment processing is complete
When
No errors exist in report AND spawn processing is required
Then
Process all pre-spawn entries and set error count to spawn count, otherwise when errors exist AND spawn processing is required, convert message twenty-eight to message nineteen and increment error count
R-GCCADDCD-cbl-0002122:Spawn Customs Messages
Action Rules
Business View: Assuming customs message spawning is required during the '22:Spawn Customs Messages' routine, when spawn processing is executed, the system executes logic to ensure that move input record to customs message, call customs interface system, write message to customs queue, and purge customs interface.
Given
Customs message spawning is required
When
Spawn processing is executed
Then
Move input record to customs message, call customs interface system, write message to customs queue, and purge customs interface
R-GCCADDCD-cbl-0002223:Handle Error Conditions
Process Rules
Business View: Assuming processing errors exist in the report during the '23:Handle Error Conditions' routine, when spawn processing is required, the system executes logic to ensure that for each report line with message type twenty-eight, convert to message nineteen and increment error count.
Given
Processing errors exist in the report
When
Spawn processing is required
Then
For each report line with message type twenty-eight, convert to message nineteen and increment error count
R-GCCADDCD-cbl-0002324:Send Report to Customs
Action Rules
Business View: Assuming error report needs to be sent to customs during the '24:Send Report to Customs' routine, when report transmission is initiated, the system executes logic to ensure that set customs user codes, set destination filename to 'request', populate subject with user id and train information and timestamp, call email send service with report table, and purge interface system.
Given
Error report needs to be sent to customs
When
Report transmission is initiated
Then
Set customs user codes, set destination filename to 'REQUEST', populate subject with user ID and train information and timestamp, call email send service with report table, and purge interface system
R-GCCADDCD-cbl-0002425:Determine Return Status
Decision Rules
Business View: Assuming equipment processing is complete during the '25:Determine Return Status' routine, when information message count is greater than zero, the system executes logic to ensure that set status to no waybill, otherwise when error message count is greater than zero, set status to errors and send report to customs, otherwise set status to ok and return report table.
Given
Equipment processing is complete
When
Information message count is greater than zero
Then
Set status to no waybill, otherwise when error message count is greater than zero, set status to errors and send report to customs, otherwise set status to OK and return report table
R-GCCADDCD-cbl-00032Initialize Root Segment
Process Rules
Business View: Assuming the system is preparing for database access operations during the 'Initialize Root Segment' routine, when root segment structure needs initialization, the system executes logic to ensure that the emtz-root-segment should be initialized to default state.
Given
The system is preparing for database access operations
When
Root segment structure needs initialization
Then
The EMTZ-ROOT-SEGMENT should be initialized to default state
R-GCCADDCD-cbl-00039Reset Detour Manifest Flags
Process Rules
Business View: Assuming equipment processing is starting for a new piece of equipment during the 'Reset Detour Manifest Flags' routine, when the system begins processing equipment, the system executes logic to ensure that detour manifest requirement flag is set to not required, detour manifest found flag is set to not found, and detour ccn is cleared.
Given
Equipment processing is starting for a new piece of equipment
When
The system begins processing equipment
Then
Detour manifest requirement flag is set to not required, detour manifest found flag is set to not found, and detour CCN is cleared
R-GCCADDCD-cbl-00041Retrieve Waybill for Current Equipment
Validation Rules
Business View: <EXCLUSION CRITERIA> If equipment is not a container and car id needs formatting, and car id formatting is successful occurs during the 'Retrieve Waybill for Current Equipment' routine, then the system must guarantee that use formatted car id for shiproot car retrieval, otherwise generate invalid car id error message.
EXCLUDING
Equipment is not a container and car ID needs formatting
When
Car ID formatting is successful
Then
Use formatted car ID for shiproot car retrieval, otherwise generate invalid car ID error message
R-GCCADDCD-cbl-00043Set Detour Manifest Required
Decision Rules
Business View: Assuming equipment matches cargo criteria during the 'Set Detour Manifest Required' routine, when new bond has been created for the cargo, the system executes logic to ensure that set detour manifest as required and store ccn key for detour processing.
Given
Equipment matches cargo criteria
When
New bond has been created for the cargo
Then
Set detour manifest as required and store CCN key for detour processing
R-GCCADDCD-cbl-00044Set Detour Manifest Found
Decision Rules
Business View: Assuming equipment matches cargo criteria during the 'Set Detour Manifest Found' routine, when no new bond was created for the cargo, the system executes logic to ensure that set detour manifest as found and proceed to build report.
Given
Equipment matches cargo criteria
When
No new bond was created for the cargo
Then
Set detour manifest as found and proceed to build report
R-GCCADDCD-cbl-00046Build Report for Missing Detour
Process Rules
Business View: <EXCLUSION CRITERIA> If cargo processing has determined detour manifest requirements, and detour manifest is required and detour manifest was not found occurs during the 'Build Report for Missing Detour' routine, then the system must guarantee that generate report entry for missing detour manifest.
EXCLUDING
Cargo processing has determined detour manifest requirements
When
Detour manifest is required AND detour manifest was not found
Then
Generate report entry for missing detour manifest
R-GCCADDCD-cbl-00055Generate Invalid Car ID Error Message
Validation Rules
Business View: Assuming car id formatting failed during validation during the 'Generate Invalid Car ID Error Message' routine, when the system needs to handle the validation failure, the system executes logic to ensure that the system moves the error message 'err>>>> invalid car id' to the report line and performs report index addition.
Given
Car ID formatting failed during validation
When
The system needs to handle the validation failure
Then
The system moves the error message 'ERR>>>> INVALID CAR ID' to the report line and performs report index addition
R-GCCADDCD-cbl-00246Call FWCARGET Module for Car Data
Action Rules
Business View: Assuming a valid car equipment id is available during the 'Call FWCARGET Module for Car Data' routine, when the system invokes fwcarget module with parameters set to include all types except 98-99, all statuses, exclude edi incomplete, include temporary waybills, exclude corrector waybills, return lead waybills, and get latest waybill date, the system executes logic to ensure that the module returns waybill information in shiproot segment for the specified car.
Given
A valid car equipment ID is available
When
The system invokes FWCARGET module with parameters set to include all types except 98-99, all statuses, exclude EDI incomplete, include temporary waybills, exclude corrector waybills, return lead waybills, and get latest waybill date
Then
The module returns waybill information in SHIPROOT segment for the specified car
R-GCCADDCD-cbl-00247Retrieve Waybill by Root Key
Action Rules
Business View: Assuming a container equipment id is available during the 'Retrieve Waybill by Root Key' routine, when the system calls fwcwbio service with shiproot segment type, equal operator, and container equipment key, the system executes logic to ensure that the waybill information is retrieved and stored in shiproot segment.
Given
A container equipment ID is available
When
The system calls FWCWBIO service with SHIPROOT segment type, equal operator, and container equipment key
Then
The waybill information is retrieved and stored in SHIPROOT segment
R-GCCADDCD-cbl-00248Check for Multiple Waybill Versions
Process Rules
Business View: Assuming fwcarget has been called for car waybill retrieval during the 'Check for Multiple Waybill Versions' routine, when the system checks if there are multiple waybill versions by evaluating haulage right carrier, edi completion status, and feedback key, the system executes logic to ensure that continue processing until a valid waybill is found or no more versions exist.
Given
FWCARGET has been called for car waybill retrieval
When
The system checks if there are multiple waybill versions by evaluating haulage right carrier, EDI completion status, and feedback key
Then
Continue processing until a valid waybill is found or no more versions exist
R-GCCADDCD-cbl-00249More Waybill Versions?
Decision Rules
Business View: Assuming a waybill version has been retrieved for a car during the 'More Waybill Versions?' routine, when the system evaluates if carget-error or carget-not-found is true, or if haulage-right-carrier is spaces, or if edi-comp-418-release equals 'y', or if carget-fwbx-key-feedback matches previous feedback key, the system executes logic to ensure that stop processing if any termination condition is met, otherwise continue with previous status waybill date and update feedback key.
Given
A waybill version has been retrieved for a car
When
The system evaluates if CARGET-ERROR or CARGET-NOT-FOUND is true, or if HAULAGE-RIGHT-CARRIER is spaces, or if EDI-COMP-418-RELEASE equals 'Y', or if CARGET-FWBX-KEY-FEEDBACK matches previous feedback key
Then
Stop processing if any termination condition is met, otherwise continue with previous status waybill date and update feedback key
R-GCCADDCD-cbl-00250Select Latest Valid Waybill
Decision Rules
Business View: Assuming multiple waybill versions exist for a car during the 'Select Latest Valid Waybill' routine, when the system processes each version and finds one with valid haulage right carrier, completed edi release, and unique feedback key, the system executes logic to ensure that set the processing flag to previous status waybill date and store the feedback key for comparison.
Given
Multiple waybill versions exist for a car
When
The system processes each version and finds one with valid haulage right carrier, completed EDI release, and unique feedback key
Then
Set the processing flag to previous status waybill date and store the feedback key for comparison
R-GCCADDCD-cbl-00253Generate Invalid Car ID Error
Validation Rules
Business View: <EXCLUSION CRITERIA> If car id formatting using gcccarfm service has failed, and gccarfm-rc-success is not true occurs during the 'Generate Invalid Car ID Error' routine, then the system must guarantee that generate error message 'err>>>> invalid car id' in the report line and increment report index.
EXCLUDING
Car ID formatting using GCCCARFM service has failed
When
GCCARFM-RC-SUCCESS is not true
Then
Generate error message 'ERR>>>> INVALID CAR ID' in the report line and increment report index
Business View: Assuming a car equipment id needs waybill data retrieval during the 'Initialize FWCARGET Parameters' routine, when the system initializes fwcarget parameters, the system executes logic to ensure that all search criteria are set to include all waybill types except 98-99, all status types, exclude edi incomplete records, include temporary waybills, exclude corrector waybills, return lead waybills, and use latest waybill date.
Given
A car equipment ID needs waybill data retrieval
When
The system initializes FWCARGET parameters
Then
All search criteria are set to include all waybill types except 98-99, all status types, exclude EDI incomplete records, include temporary waybills, exclude corrector waybills, return lead waybills, and use latest waybill date
R-GCCADDCD-cbl-00309Handle FWCARGET Error
Decision Rules
Business View: Assuming fwcarget module has been called for car waybill retrieval during the 'Handle FWCARGET Error' routine, when fwcarget returns an error status, the system executes logic to ensure that the system creates an error message containing fwcarget parameters and terminates processing.
Given
FWCARGET module has been called for car waybill retrieval
When
FWCARGET returns an error status
Then
The system creates an error message containing FWCARGET parameters and terminates processing
R-GCCADDCD-cbl-00310Check Haulage Right Carrier
Validation Rules
Business View: Assuming fwcarget has successfully retrieved waybill data for a car during the 'Check Haulage Right Carrier' routine, when the system checks the haulage right carrier field, the system executes logic to ensure that if haulage right carrier is empty (spaces), the waybill is accepted; otherwise, additional edi validation is required.
Given
FWCARGET has successfully retrieved waybill data for a car
When
The system checks the haulage right carrier field
Then
If haulage right carrier is empty (spaces), the waybill is accepted; otherwise, additional EDI validation is required
R-GCCADDCD-cbl-00311Check EDI Completion Status
Validation Rules
Business View: Assuming a waybill has a non-empty haulage right carrier during the 'Check EDI Completion Status' routine, when the system checks the edi completion status, the system executes logic to ensure that if edi completion release flag is 'y', the waybill is accepted; otherwise, duplicate key validation is performed.
Given
A waybill has a non-empty haulage right carrier
When
The system checks the EDI completion status
Then
If EDI completion release flag is 'Y', the waybill is accepted; otherwise, duplicate key validation is performed
R-GCCADDCD-cbl-00312Check for Duplicate Key
Validation Rules
Business View: Assuming a waybill with incomplete edi processing has been retrieved during the 'Check for Duplicate Key' routine, when the system compares the current fwbx key feedback with the previously processed key, the system executes logic to ensure that if the keys match, set waybill as not found to terminate processing; otherwise, continue with previous status date processing.
Given
A waybill with incomplete EDI processing has been retrieved
When
The system compares the current FWBX key feedback with the previously processed key
Then
If the keys match, set waybill as not found to terminate processing; otherwise, continue with previous status date processing
R-GCCADDCD-cbl-00313Set Previous Status Date
Process Rules
Business View: <EXCLUSION CRITERIA> If current waybill has incomplete edi processing and is not a duplicate key, and the system prepares for the next search iteration occurs during the 'Set Previous Status Date' routine, then the system must guarantee that previous status waybill date flag is set and the current fwbx key feedback is stored for duplicate detection.
EXCLUDING
Current waybill has incomplete EDI processing and is not a duplicate key
When
The system prepares for the next search iteration
Then
Previous status waybill date flag is set and the current FWBX key feedback is stored for duplicate detection
R-GCCADDCD-cbl-00361Exclude EDI Incomplete Records
Validation Rules
Business View: Assuming car search parameters are being configured during the 'Exclude EDI Incomplete Records' routine, when the system sets the edi completeness criteria, the system executes logic to ensure that car search excludes records with incomplete edi data.
Given
Car search parameters are being configured
When
The system sets the EDI completeness criteria
Then
Car search excludes records with incomplete EDI data
R-GCCADDCD-cbl-00315Set Search Parameters for All Waybill Types
Process Rules
Business View: Assuming a car equipment id needs waybill retrieval during the 'Set Search Parameters for All Waybill Types' routine, when the system initializes waybill search parameters, the system executes logic to ensure that search parameters are set to include all waybill types except 98-99, exclude edi incomplete waybills, include temporary waybills, exclude corrector waybills, include returned lead waybills, and search for latest waybill date.
Given
A car equipment ID needs waybill retrieval
When
The system initializes waybill search parameters
Then
Search parameters are set to include all waybill types except 98-99, exclude EDI incomplete waybills, include temporary waybills, exclude corrector waybills, include returned lead waybills, and search for latest waybill date
R-GCCADDCD-cbl-00319EDI Complete Release = 'Y'?
Validation Rules
Business View: Assuming a waybill with haulage right carrier has been retrieved during the 'EDI Complete Release = 'Y'?' routine, when the system checks the edi completion release flag, the system executes logic to ensure that if edi completion release equals 'y', the waybill is accepted, otherwise version checking continues.
Given
A waybill with haulage right carrier has been retrieved
When
The system checks the EDI completion release flag
Then
If EDI completion release equals 'Y', the waybill is accepted, otherwise version checking continues
R-GCCADDCD-cbl-00320Same as Previous Version?
Process Rules
Business View: Assuming a waybill with incomplete edi release has been found during the 'Same as Previous Version?' routine, when the system compares the current waybill feedback key with the previous version, the system executes logic to ensure that if the feedback keys match, mark as not found and stop processing, otherwise continue to search previous versions.
Given
A waybill with incomplete EDI release has been found
When
The system compares the current waybill feedback key with the previous version
Then
If the feedback keys match, mark as not found and stop processing, otherwise continue to search previous versions
R-GCCADDCD-cbl-00321Set to Search Previous Version
Process Rules
Business View: Assuming current waybill version is different from previous version and edi is incomplete during the 'Set to Search Previous Version' routine, when the system needs to search for previous waybill versions, the system executes logic to ensure that search parameters are updated to previous status waybill date and feedback key is stored for comparison.
Given
Current waybill version is different from previous version and EDI is incomplete
When
The system needs to search for previous waybill versions
Then
Search parameters are updated to previous status waybill date and feedback key is stored for comparison
R-GCCADDCD-cbl-00322Accept Current Waybill Version
Decision Rules
Business View: Assuming a waybill meets validation criteria (no haulage carrier, edi complete, or valid version) during the 'Accept Current Waybill Version' routine, when the system completes waybill validation, the system executes logic to ensure that the current waybill version is accepted and version checking process ends.
Given
A waybill meets validation criteria (no haulage carrier, EDI complete, or valid version)
When
The system completes waybill validation
Then
The current waybill version is accepted and version checking process ends
R-GCCADDCD-cbl-00060Generate Invalid Car ID Error Message
Validation Rules
Business View: <EXCLUSION CRITERIA> If the gcccarfm module has failed to validate or format the car id, and the formatting operation does not return a success status occurs during the 'Generate Invalid Car ID Error Message' routine, then the system must guarantee that an error message 'err>>>> invalid car id' is generated and added to the report.
EXCLUDING
The GCCCARFM module has failed to validate or format the car ID
When
The formatting operation does not return a success status
Then
An error message 'ERR>>>> INVALID CAR ID' is generated and added to the report
R-GCCADDCD-cbl-00070Initialize GCSCCRT Segment
Process Rules
Business View: Assuming the system is ready to retrieve the next cargo record during the 'Initialize GCSCCRT Segment' routine, when the retrieve next cargo process begins, the system executes logic to ensure that the gcsccrt cargo record segment is initialized to clear any previous data.
Given
The system is ready to retrieve the next cargo record
When
The retrieve next cargo process begins
Then
The GCSCCRT cargo record segment is initialized to clear any previous data
R-GCCADDCD-cbl-00071Call Z320-GN-CCRT-SEG to Get Next Cargo Record
Action Rules
Business View: Assuming a cargo record segment has been initialized during the 'Call Z320-GN-CCRT-SEG to Get Next Cargo Record' routine, when the system needs to get the next cargo record, the system executes logic to ensure that the z320-gn-ccrt-seg routine is called to retrieve the next cargo record from the canadian customs cargo records database.
Given
A cargo record segment has been initialized
When
The system needs to get the next cargo record
Then
The Z320-GN-CCRT-SEG routine is called to retrieve the next cargo record from the Canadian Customs Cargo Records database
Business View: Assuming equipment processing is starting during the 'Initialize Detour Manifest Flags' routine, when the system begins processing equipment for detour manifest requirements, the system executes logic to ensure that the detour manifest required flag is set to false, the detour manifest found flag is set to false, and the detour ccn is cleared.
Given
Equipment processing is starting
When
The system begins processing equipment for detour manifest requirements
Then
The detour manifest required flag is set to false, the detour manifest found flag is set to false, and the detour CCN is cleared
R-GCCADDCD-cbl-00077New Bond Created for Cargo?
Decision Rules
Business View: Assuming equipment matches a cargo record during the 'New Bond Created for Cargo?' routine, when the system checks the cargo bond creation status, the system executes logic to ensure that if a new bond was created, detour manifest is required; if no new bond was created, detour manifest is found.
Given
Equipment matches a cargo record
When
The system checks the cargo bond creation status
Then
If a new bond was created, detour manifest is required; if no new bond was created, detour manifest is found
R-GCCADDCD-cbl-00078Set Detour Manifest Required
Action Rules
Business View: Assuming a new bond has been created for matching cargo during the 'Set Detour Manifest Required' routine, when the system processes the bond creation status, the system executes logic to ensure that the detour manifest required flag is set to true.
Given
A new bond has been created for matching cargo
When
The system processes the bond creation status
Then
The detour manifest required flag is set to true
R-GCCADDCD-cbl-00079Store CCN Key for Detour
Process Rules
Business View: Assuming detour manifest is required due to new bond creation during the 'Store CCN Key for Detour' routine, when the system needs to track the cargo for detour processing, the system executes logic to ensure that the ccn key from the cargo record is stored in the detour ccn field.
Given
Detour manifest is required due to new bond creation
When
The system needs to track the cargo for detour processing
Then
The CCN key from the cargo record is stored in the detour CCN field
R-GCCADDCD-cbl-00080Set Detour Manifest Found
Action Rules
Business View: Assuming equipment matches cargo record and no new bond was created during the 'Set Detour Manifest Found' routine, when the system processes the existing bond status, the system executes logic to ensure that the detour manifest found flag is set to true and report building is triggered.
Given
Equipment matches cargo record and no new bond was created
When
The system processes the existing bond status
Then
The detour manifest found flag is set to true and report building is triggered
R-GCCADDCD-cbl-00081Detour Manifest Required but Not Found?
Decision Rules
Business View: <EXCLUSION CRITERIA> If processing has completed for current equipment, and detour manifest is required and detour manifest has not been found occurs during the 'Detour Manifest Required but Not Found?' routine, then the system must guarantee that a detour manifest report must be generated.
EXCLUDING
Processing has completed for current equipment
When
Detour manifest is required AND detour manifest has not been found
Business View: <EXCLUSION CRITERIA> If detour manifest is required but not found, and the system needs to report the missing detour manifest occurs during the 'Generate Detour Manifest Report' routine, then the system must guarantee that a report is built to document the detour manifest requirement.
EXCLUDING
Detour manifest is required but not found
When
The system needs to report the missing detour manifest
Then
A report is built to document the detour manifest requirement
Business View: Assuming the gcccartp service call has failed during the 'Handle Equipment Classification Error' routine, when the system receives an unsuccessful response from the equipment classification service, the system executes logic to ensure that the system should create an error message containing the service name and parameters, then perform system termination procedures.
Given
The GCCCARTP service call has failed
When
The system receives an unsuccessful response from the equipment classification service
Then
The system should create an error message containing the service name and parameters, then perform system termination procedures
Business View: <EXCLUSION CRITERIA> If the gcccartp module call was not successful, and the system processes the failure condition occurs during the 'Generate GCCCARTP Failure Error' routine, then the system must guarantee that an error message is constructed with failure details and interface parameters, and system termination is performed.
EXCLUDING
The GCCCARTP module call was not successful
When
The system processes the failure condition
Then
An error message is constructed with failure details and interface parameters, and system termination is performed
Business View: <EXCLUSION CRITERIA> If a cargo processing operation is in progress and a detour manifest requirement has been identified and the detour manifest was not found in the system, and the system evaluates error message generation conditions occurs during the 'Generate Message 27: Detour Manifest Missing' routine, then the system must guarantee that generate message 27 indicating detour manifest is missing and include the detour ccn key in the error message.
EXCLUDING
A cargo processing operation is in progress AND a detour manifest requirement has been identified AND the detour manifest was not found in the system
When
The system evaluates error message generation conditions
Then
Generate message 27 indicating detour manifest is missing AND include the detour CCN key in the error message
R-GCCADDCD-cbl-00112Generate Message 10: Container Without Waybill
Validation Rules
Business View: Assuming a container has been identified for processing and no waybill was found for the container during the 'Generate Message 10: Container Without Waybill' routine, when the system evaluates waybill validation conditions, the system executes logic to ensure that generate message 10 indicating container exists without proper waybill documentation.
Given
A container has been identified for processing AND no waybill was found for the container
When
The system evaluates waybill validation conditions
Then
Generate message 10 indicating container exists without proper waybill documentation
R-GCCADDCD-cbl-00113Generate Message 12: Car Without Waybill
Validation Rules
Business View: Assuming a car has been identified for processing and no waybill was found for the car and no container was found during the 'Generate Message 12: Car Without Waybill' routine, when the system evaluates waybill validation conditions, the system executes logic to ensure that generate message 12 indicating car exists without proper waybill documentation.
Given
A car has been identified for processing AND no waybill was found for the car AND no container was found
When
The system evaluates waybill validation conditions
Then
Generate message 12 indicating car exists without proper waybill documentation
R-GCCADDCD-cbl-00114Generate Message 15: No Cargo for Loaded Equipment
Validation Rules
Business View: <EXCLUSION CRITERIA> If a waybill has been found and no cargo was found for the waybill and container was not found and the equipment is not a conveying car, and the system evaluates cargo validation conditions occurs during the 'Generate Message 15: No Cargo for Loaded Equipment' routine, then the system must guarantee that generate message 15 indicating no cargo found for loaded equipment and include the root key and waybill date in the error message.
EXCLUDING
A waybill has been found AND no cargo was found for the waybill AND container was not found AND the equipment is not a conveying car
When
The system evaluates cargo validation conditions
Then
Generate message 15 indicating no cargo found for loaded equipment AND include the root key and waybill date in the error message
R-GCCADDCD-cbl-00115Generate Message 16: Invalid Cargo Status
Validation Rules
Business View: <EXCLUSION CRITERIA> If cargo has been found and (cargo status is pending or error or reject or deleted or (user security level is not 's' and cargo status is blank or reject or error) or cargo is linehaul with manual status), and the system evaluates cargo status validation conditions occurs during the 'Generate Message 16: Invalid Cargo Status' routine, then the system must guarantee that generate message 16 indicating invalid cargo status prevents processing.
EXCLUDING
Cargo has been found AND (cargo status is pending OR error OR reject OR deleted OR (user security level is not 'S' AND cargo status is blank OR reject OR error) OR cargo is linehaul with manual status)
When
The system evaluates cargo status validation conditions
Then
Generate message 16 indicating invalid cargo status prevents processing
R-GCCADDCD-cbl-00116Generate Message 17: Cargo Already on Train
Validation Rules
Business View: <EXCLUSION CRITERIA> If cargo has been found and the cargo has a canadian customs north train id that is not spaces, and the system evaluates cargo train assignment conditions occurs during the 'Generate Message 17: Cargo Already on Train' routine, then the system must guarantee that generate message 17 indicating cargo is already assigned to another train.
EXCLUDING
Cargo has been found AND the cargo has a Canadian customs north train ID that is not spaces
When
The system evaluates cargo train assignment conditions
Then
Generate message 17 indicating cargo is already assigned to another train
Business View: <EXCLUSION CRITERIA> If cargo has been found and cargo has in-transit return status and cargo ccn key starts with '6105e' and cargo manifest-to-trans-code does not equal the train crossing port, and the system evaluates canadian border crossing transit code conditions occurs during the 'Generate Message 28: Transit Code Mismatch - Return' routine, then the system must guarantee that generate message 28 indicating transit code mismatch and prepare gct1011e change message for border crossing processing.
EXCLUDING
Cargo has been found AND cargo has in-transit return status AND cargo CCN key starts with '6105E' AND cargo manifest-to-trans-code does not equal the train crossing port
When
The system evaluates Canadian border crossing transit code conditions
Then
Generate message 28 indicating transit code mismatch AND prepare GCT1011E change message for border crossing processing
Business View: <EXCLUSION CRITERIA> If cargo has been found and cargo does not have in-transit return status and cargo ccn key starts with '6105e' and cargo manifest-from-trans-code does not equal the train crossing port, and the system evaluates canadian border crossing transit code conditions occurs during the 'Generate Message 28: Transit Code Mismatch - Outbound' routine, then the system must guarantee that generate message 28 indicating transit code mismatch and prepare gct1011e diversion message for border crossing processing.
EXCLUDING
Cargo has been found AND cargo does not have in-transit return status AND cargo CCN key starts with '6105E' AND cargo manifest-from-trans-code does not equal the train crossing port
When
The system evaluates Canadian border crossing transit code conditions
Then
Generate message 28 indicating transit code mismatch AND prepare GCT1011E diversion message for border crossing processing
Business View: Assuming a transit code mismatch has been identified for return cargo and message preparation is required during the 'Prepare GCT1011E Change Message' routine, when the system prepares border crossing messages, the system executes logic to ensure that set spawn flag to true and increment pre-spawn index and initialize gcx101 input structure and set security byte to high values and move cargo ccn key to message and set canadian flag to true and set change flag to true and move train crossing name and port to message.
Given
A transit code mismatch has been identified for return cargo AND message preparation is required
When
The system prepares border crossing messages
Then
Set spawn flag to true AND increment pre-spawn index AND initialize GCX101 input structure AND set security byte to high values AND move cargo CCN key to message AND set Canadian flag to true AND set change flag to true AND move train crossing name and port to message
Business View: Assuming a transit code mismatch has been identified for outbound cargo and message preparation is required during the 'Prepare GCT1011E Diversion Message' routine, when the system prepares border crossing messages, the system executes logic to ensure that set spawn flag to true and increment pre-spawn index and initialize gcx101 input structure and set security byte to high values and move cargo ccn key to message and set canadian flag to true and set diversion flag to true and move train crossing name and port to message.
Given
A transit code mismatch has been identified for outbound cargo AND message preparation is required
When
The system prepares border crossing messages
Then
Set spawn flag to true AND increment pre-spawn index AND initialize GCX101 input structure AND set security byte to high values AND move cargo CCN key to message AND set Canadian flag to true AND set diversion flag to true AND move train crossing name and port to message
R-GCCADDCD-cbl-00255Check Status: Pending
Validation Rules
Business View: Assuming a cargo record is found and being processed during the 'Check Status: Pending' routine, when the cargo status is pending, the system executes logic to ensure that generate message sixteen indicating invalid cargo status.
Given
A cargo record is found and being processed
When
The cargo status is PENDING
Then
Generate message sixteen indicating invalid cargo status
R-GCCADDCD-cbl-00256Check Status: Error
Validation Rules
Business View: Assuming a cargo record is found and being processed during the 'Check Status: Error' routine, when the cargo status is error, the system executes logic to ensure that generate message sixteen indicating invalid cargo status.
Given
A cargo record is found and being processed
When
The cargo status is ERROR
Then
Generate message sixteen indicating invalid cargo status
R-GCCADDCD-cbl-00257Check Status: Reject
Validation Rules
Business View: Assuming a cargo record is found and being processed during the 'Check Status: Reject' routine, when the cargo status is reject, the system executes logic to ensure that generate message sixteen indicating invalid cargo status.
Given
A cargo record is found and being processed
When
The cargo status is REJECT
Then
Generate message sixteen indicating invalid cargo status
R-GCCADDCD-cbl-00258Check Status: Deleted
Validation Rules
Business View: Assuming a cargo record is found and being processed during the 'Check Status: Deleted' routine, when the cargo status is deleted, the system executes logic to ensure that generate message sixteen indicating invalid cargo status.
Given
A cargo record is found and being processed
When
The cargo status is DELETED
Then
Generate message sixteen indicating invalid cargo status
R-GCCADDCD-cbl-00259Check User Security Level
Authorization Rules
Business View: <EXCLUSION CRITERIA> If a cargo record is found and user security level is not 's', and the cargo status is blank or reject or error occurs during the 'Check User Security Level' routine, then the system must guarantee that generate message sixteen indicating invalid cargo status due to security restrictions.
EXCLUDING
A cargo record is found and user security level is not 'S'
When
The cargo status is BLANK or REJECT or ERROR
Then
Generate message sixteen indicating invalid cargo status due to security restrictions
R-GCCADDCD-cbl-00260Check Additional Status Conditions
Validation Rules
Business View: Assuming a cargo record is found with linehaul type during the 'Check Additional Status Conditions' routine, when the cargo status is manual, the system executes logic to ensure that generate message sixteen indicating invalid cargo status.
Given
A cargo record is found with linehaul type
When
The cargo status is MANUAL
Then
Generate message sixteen indicating invalid cargo status
R-GCCADDCD-cbl-00262User Security Level = 'S'?
Authorization Rules
Business View: <EXCLUSION CRITERIA> If a cargo record is found and the user security level is not 's' (supervisor), and the cargo status is blank, reject, or error occurs during the 'User Security Level = 'S'?' routine, then the system must guarantee that the system should set error message msg-sixteen to deny access.
EXCLUDING
A cargo record is found and the user security level is not 'S' (supervisor)
When
The cargo status is BLANK, REJECT, or ERROR
Then
The system should set error message MSG-SIXTEEN to deny access
R-GCCADDCD-cbl-00265Is Cargo Already Attached to Another Train?
Validation Rules
Business View: <EXCLUSION CRITERIA> If cargo has been found and retrieved for processing, and the cargo has a canadian customs north train id that is not empty spaces occurs during the 'Is Cargo Already Attached to Another Train?' routine, then the system must guarantee that set message 17 indicating the cargo is already attached to another train.
EXCLUDING
Cargo has been found and retrieved for processing
When
The cargo has a Canadian Customs North Train ID that is not empty spaces
Then
Set Message 17 indicating the cargo is already attached to another train
R-GCCADDCD-cbl-00266Is Cargo Linehaul Type? AND Is Cargo Status Manual?
Validation Rules
Business View: Assuming cargo has been found and is being processed during the 'Is Cargo Linehaul Type? AND Is Cargo Status Manual?' routine, when the cargo is linehaul type and the cargo status is manual, the system executes logic to ensure that set message 16 indicating linehaul manual status error.
Given
Cargo has been found and is being processed
When
The cargo is linehaul type AND the cargo status is manual
Then
Set Message 16 indicating linehaul manual status error
R-GCCADDCD-cbl-00268Is Return Transit Status?
Decision Rules
Business View: Assuming cargo exists and is being processed for border crossing during the 'Is Return Transit Status?' routine, when the system evaluates the cargo's in-transit status, the system executes logic to ensure that if cargo has return transit status, validate manifest to transit code; otherwise check for non-return transit status.
Given
Cargo exists and is being processed for border crossing
When
The system evaluates the cargo's in-transit status
Then
If cargo has return transit status, validate manifest TO transit code; otherwise check for non-return transit status
R-GCCADDCD-cbl-00269Is CCN Key = '6105E'?
Validation Rules
Business View: Assuming cargo is being processed for border crossing with either return or non-return transit status during the 'Is CCN Key = '6105E'?' routine, when the system checks the first 5 characters of the ccn key, the system executes logic to ensure that if ccn key starts with '6105e', proceed with manifest transit code validation; otherwise continue normal processing.
Given
Cargo is being processed for border crossing with either return or non-return transit status
When
The system checks the first 5 characters of the CCN key
Then
If CCN key starts with '6105E', proceed with manifest transit code validation; otherwise continue normal processing
R-GCCADDCD-cbl-00270Manifest TO Transit Code ≠ Train Crossing Port?
Validation Rules
Business View: Assuming cargo has return transit status and ccn key starts with '6105e' during the 'Manifest TO Transit Code ≠ Train Crossing Port?' routine, when the system compares manifest to transit code with train crossing port, the system executes logic to ensure that if manifest to transit code does not equal train crossing port, set error message 28 and prepare change message for customs.
Given
Cargo has return transit status and CCN key starts with '6105E'
When
The system compares manifest TO transit code with train crossing port
Then
If manifest TO transit code does not equal train crossing port, set error message 28 and prepare change message for customs
R-GCCADDCD-cbl-00271Manifest FROM Transit Code ≠ Train Crossing Port?
Validation Rules
Business View: Assuming cargo has non-return transit status and ccn key starts with '6105e' during the 'Manifest FROM Transit Code ≠ Train Crossing Port?' routine, when the system compares manifest from transit code with train crossing port, the system executes logic to ensure that if manifest from transit code does not equal train crossing port, set error message 28 and prepare diversion message for customs.
Given
Cargo has non-return transit status and CCN key starts with '6105E'
When
The system compares manifest FROM transit code with train crossing port
Then
If manifest FROM transit code does not equal train crossing port, set error message 28 and prepare diversion message for customs
Business View: <EXCLUSION CRITERIA> If transit code validation has failed for canadian customs cargo, and either manifest to or from transit code does not match train crossing port occurs during the 'Set Error Message 28 - Transit Code Mismatch' routine, then the system must guarantee that set message type 28 indicating transit code mismatch error.
EXCLUDING
Transit code validation has failed for Canadian customs cargo
When
Either manifest TO or FROM transit code does not match train crossing port
Then
Set message type 28 indicating transit code mismatch error
R-GCCADDCD-cbl-00273Prepare GCT1011E Change Message for Customs
Action Rules
Business View: Assuming return status cargo with ccn '6105e' has manifest to transit code mismatch during the 'Prepare GCT1011E Change Message for Customs' routine, when error message 28 is set for the mismatch, the system executes logic to ensure that prepare gct1011e message with change flag, canadian flag, ccn key, border name, and border code for customs processing.
Given
Return status cargo with CCN '6105E' has manifest TO transit code mismatch
When
Error message 28 is set for the mismatch
Then
Prepare GCT1011E message with change flag, Canadian flag, CCN key, border name, and border code for customs processing
R-GCCADDCD-cbl-00274Prepare GCT1011E Diversion Message for Customs
Action Rules
Business View: Assuming non-return status cargo with ccn '6105e' has manifest from transit code mismatch during the 'Prepare GCT1011E Diversion Message for Customs' routine, when error message 28 is set for the mismatch, the system executes logic to ensure that prepare gct1011e message with diversion flag, canadian flag, ccn key, border name, and border code for customs processing.
Given
Non-return status cargo with CCN '6105E' has manifest FROM transit code mismatch
When
Error message 28 is set for the mismatch
Then
Prepare GCT1011E message with diversion flag, Canadian flag, CCN key, border name, and border code for customs processing
R-GCCADDCD-cbl-00324Set GCX101 Spawned Flag to True
Process Rules
Business View: Assuming a cargo requires a change message to be sent to customs for border crossing during the 'Set GCX101 Spawned Flag to True' routine, when the system begins preparing the gct1011e change message, the system executes logic to ensure that the gcx101 spawned flag must be set to true to enable message generation.
Given
A cargo requires a change message to be sent to customs for border crossing
When
The system begins preparing the GCT1011E change message
Then
The GCX101 spawned flag must be set to true to enable message generation
R-GCCADDCD-cbl-00325Increment Pre-Spawn Index Counter
Process Rules
Business View: Assuming a change message is being prepared for customs during the 'Increment Pre-Spawn Index Counter' routine, when the message preparation process begins, the system executes logic to ensure that the pre-spawn index counter must be incremented by 1 to track this message.
Given
A change message is being prepared for customs
When
The message preparation process begins
Then
The pre-spawn index counter must be incremented by 1 to track this message
Business View: Assuming a new change message needs to be prepared during the 'Initialize GCX101 Input Structure' routine, when the message structure is being set up, the system executes logic to ensure that the gcx101 input structure for the current index must be initialized to clear any previous data.
Given
A new change message needs to be prepared
When
The message structure is being set up
Then
The GCX101 input structure for the current index must be initialized to clear any previous data
R-GCCADDCD-cbl-00327Set Security Byte to High Values
Authorization Rules
Business View: Assuming a change message is being prepared for customs during the 'Set Security Byte to High Values' routine, when security settings are being configured, the system executes logic to ensure that the security byte must be set to high values to indicate maximum security level.
Given
A change message is being prepared for customs
When
Security settings are being configured
Then
The security byte must be set to high values to indicate maximum security level
R-GCCADDCD-cbl-00328Move CCN Key to Message
Definitional Rules
Business View: Assuming a cargo with a specific ccn key requires a change message during the 'Move CCN Key to Message' routine, when the change message is being populated, the system executes logic to ensure that the cargo's ccn key must be moved to the message ccn field.
Given
A cargo with a specific CCN key requires a change message
When
The change message is being populated
Then
The cargo's CCN key must be moved to the message CCN field
R-GCCADDCD-cbl-00329Set Canadian Flag to True
Policy Rules
Business View: Assuming a change message is being prepared for border crossing during the 'Set Canadian Flag to True' routine, when message classification is being set, the system executes logic to ensure that the canadian flag must be set to true to identify this as a canadian border crossing message.
Given
A change message is being prepared for border crossing
When
Message classification is being set
Then
The Canadian flag must be set to true to identify this as a Canadian border crossing message
R-GCCADDCD-cbl-00330Set Change Message Type Flag
Definitional Rules
Business View: Assuming a change message is being prepared for customs during the 'Set Change Message Type Flag' routine, when message type classification is being set, the system executes logic to ensure that the change flag must be set to true to identify this as a change message type.
Given
A change message is being prepared for customs
When
Message type classification is being set
Then
The change flag must be set to true to identify this as a change message type
R-GCCADDCD-cbl-00331Move Train Crossing Name to Border Name
Definitional Rules
Business View: Assuming a change message is being prepared with train crossing information during the 'Move Train Crossing Name to Border Name' routine, when location details are being populated, the system executes logic to ensure that the train crossing name must be moved to the border name field in the message.
Given
A change message is being prepared with train crossing information
When
Location details are being populated
Then
The train crossing name must be moved to the border name field in the message
R-GCCADDCD-cbl-00332Move Train Crossing Port to Border Code
Definitional Rules
Business View: Assuming a change message is being prepared with train crossing information during the 'Move Train Crossing Port to Border Code' routine, when port identification is being populated, the system executes logic to ensure that the train crossing port code must be moved to the border code field in the message.
Given
A change message is being prepared with train crossing information
When
Port identification is being populated
Then
The train crossing port code must be moved to the border code field in the message
R-GCCADDCD-cbl-00333Set GCX101 Spawned Flag to True
Process Rules
Business View: Assuming a diversion message needs to be prepared for customs processing during the 'Set GCX101 Spawned Flag to True' routine, when the diversion message preparation process begins, the system executes logic to ensure that the gcx101 spawned flag is set to true to indicate message processing has started.
Given
A diversion message needs to be prepared for customs processing
When
The diversion message preparation process begins
Then
The GCX101 spawned flag is set to true to indicate message processing has started
R-GCCADDCD-cbl-00334Increment Pre-Spawn Index Counter
Computation Rules
Business View: Assuming a new diversion message is being prepared during the 'Increment Pre-Spawn Index Counter' routine, when the message preparation process starts, the system executes logic to ensure that the pre-spawn index counter is incremented by 1 to track the new message.
Given
A new diversion message is being prepared
When
The message preparation process starts
Then
The pre-spawn index counter is incremented by 1 to track the new message
Business View: Assuming a diversion message input structure exists for the current pre-spawn index during the 'Initialize GCX101 Input Structure' routine, when message preparation begins, the system executes logic to ensure that the gcx101 input structure for the current index is initialized to clear any existing data.
Given
A diversion message input structure exists for the current pre-spawn index
When
Message preparation begins
Then
The GCX101 input structure for the current index is initialized to clear any existing data
R-GCCADDCD-cbl-00336Set Security Byte to High Values
Authorization Rules
Business View: Assuming a diversion message is being prepared for customs during the 'Set Security Byte to High Values' routine, when security settings are configured, the system executes logic to ensure that the security byte in the gcx101 input structure is set to high values for maximum security clearance.
Given
A diversion message is being prepared for customs
When
Security settings are configured
Then
The security byte in the GCX101 input structure is set to high values for maximum security clearance
R-GCCADDCD-cbl-00337Move CCN Key to Message
Definitional Rules
Business View: Assuming a cargo with a ccn key requires diversion processing during the 'Move CCN Key to Message' routine, when the diversion message is being populated, the system executes logic to ensure that the ccn key from the cargo record is moved to the gcx101 ccn field in the message.
Given
A cargo with a CCN key requires diversion processing
When
The diversion message is being populated
Then
The CCN key from the cargo record is moved to the GCX101 CCN field in the message
R-GCCADDCD-cbl-00338Set Canadian Flag to True
Policy Rules
Business View: Assuming a diversion message is being prepared for canadian customs during the 'Set Canadian Flag to True' routine, when message routing flags are set, the system executes logic to ensure that the canadian flag in the gcx101 input structure is set to true.
Given
A diversion message is being prepared for Canadian customs
When
Message routing flags are set
Then
The Canadian flag in the GCX101 input structure is set to true
R-GCCADDCD-cbl-00339Set Diversion Flag to True
Definitional Rules
Business View: Assuming a customs message is being prepared for cargo diversion during the 'Set Diversion Flag to True' routine, when message type classification is performed, the system executes logic to ensure that the diversion flag in the gcx101 input structure is set to true.
Given
A customs message is being prepared for cargo diversion
When
Message type classification is performed
Then
The diversion flag in the GCX101 input structure is set to true
R-GCCADDCD-cbl-00340Move Train Crossing Name to Border Name
Definitional Rules
Business View: Assuming a train crossing name is available from the input parameters during the 'Move Train Crossing Name to Border Name' routine, when border location information is populated in the message, the system executes logic to ensure that the train crossing name is moved to the border name field in the gcx101 input structure.
Given
A train crossing name is available from the input parameters
When
Border location information is populated in the message
Then
The train crossing name is moved to the border name field in the GCX101 input structure
R-GCCADDCD-cbl-00341Move Train Crossing Port to Border Code
Definitional Rules
Business View: Assuming a train crossing port code is available from the input parameters during the 'Move Train Crossing Port to Border Code' routine, when border processing information is populated in the message, the system executes logic to ensure that the train crossing port code is moved to the border code field in the gcx101 input structure.
Given
A train crossing port code is available from the input parameters
When
Border processing information is populated in the message
Then
The train crossing port code is moved to the border code field in the GCX101 input structure
R-GCCADDCD-cbl-00127Waybill Found?
Decision Rules
Business View: Assuming waybill database query has been executed during the 'Waybill Found?' routine, when system checks the waybill indicator status, the system executes logic to ensure that if waybill found, set waybill found status, otherwise proceed to generate no waybill messages.
Given
Waybill database query has been executed
When
System checks the waybill indicator status
Then
If waybill found, set waybill found status, otherwise proceed to generate no waybill messages
R-GCCADDCD-cbl-00129Equipment is Container?
Decision Rules
Business View: Assuming no waybill was found for the equipment during the 'Equipment is Container?' routine, when system checks if the equipment is a container, the system executes logic to ensure that if container, generate container-specific message, otherwise generate car-specific message.
Given
No waybill was found for the equipment
When
System checks if the equipment is a container
Then
If container, generate container-specific message, otherwise generate car-specific message
R-GCCADDCD-cbl-00130Generate Message: No Waybill for Container
Process Rules
Business View: Assuming equipment is a container and no waybill was found during the 'Generate Message: No Waybill for Container' routine, when system generates error messages for missing waybill, the system executes logic to ensure that system sets message type 10 indicating no waybill found for container.
Given
Equipment is a container and no waybill was found
When
System generates error messages for missing waybill
Then
System sets message type 10 indicating no waybill found for container
R-GCCADDCD-cbl-00131Generate Message: No Waybill for Car
Process Rules
Business View: Assuming equipment is a car and no waybill was found during the 'Generate Message: No Waybill for Car' routine, when system generates error messages for missing waybill, the system executes logic to ensure that system sets message type 12 indicating no waybill found for car.
Given
Equipment is a car and no waybill was found
When
System generates error messages for missing waybill
Then
System sets message type 12 indicating no waybill found for car
R-GCCADDCD-cbl-00133Equipment has Cargo Records?
Validation Rules
Business View: Assuming equipment has waybill and is marked as loaded during the 'Equipment has Cargo Records?' routine, when system checks for associated cargo records, the system executes logic to ensure that if no cargo records found, generate no cargo message, otherwise continue processing.
Given
Equipment has waybill and is marked as loaded
When
System checks for associated cargo records
Then
If no cargo records found, generate no cargo message, otherwise continue processing
R-GCCADDCD-cbl-00134Generate Message: No Cargo Found for Loaded Equipment
Process Rules
Business View: Assuming equipment is loaded, has waybill, but no cargo records exist during the 'Generate Message: No Cargo Found for Loaded Equipment' routine, when system validates cargo consistency for loaded equipment, the system executes logic to ensure that system sets message type 15 with waybill root key and date information.
Given
Equipment is loaded, has waybill, but no cargo records exist
When
System validates cargo consistency for loaded equipment
Then
System sets message type 15 with waybill root key and date information
R-GCCADDCD-cbl-00135Generate Error: Invalid Car ID Format
Process Rules
Business View: Assuming car id formatting utility returned failure status during the 'Generate Error: Invalid Car ID Format' routine, when system processes the formatting failure, the system executes logic to ensure that system generates error message 'err>>>> invalid car id' and adds to report.
Given
Car ID formatting utility returned failure status
When
System processes the formatting failure
Then
System generates error message 'ERR>>>> INVALID CAR ID' and adds to report
R-GCCADDCD-cbl-00136Status = Pending?
Validation Rules
Business View: Assuming a cargo record is found and being processed during the 'Status = Pending?' routine, when the cargo status is checked and found to be pending, the system executes logic to ensure that the system sets error message msg-sixteen to indicate invalid cargo status.
Given
A cargo record is found and being processed
When
The cargo status is checked and found to be pending
Then
The system sets error message MSG-SIXTEEN to indicate invalid cargo status
R-GCCADDCD-cbl-00137Status = Error?
Validation Rules
Business View: Assuming a cargo record is found and being processed during the 'Status = Error?' routine, when the cargo status is checked and found to be error, the system executes logic to ensure that the system sets error message msg-sixteen to indicate invalid cargo status.
Given
A cargo record is found and being processed
When
The cargo status is checked and found to be error
Then
The system sets error message MSG-SIXTEEN to indicate invalid cargo status
R-GCCADDCD-cbl-00138Status = Reject?
Validation Rules
Business View: Assuming a cargo record is found and being processed during the 'Status = Reject?' routine, when the cargo status is checked and found to be reject, the system executes logic to ensure that the system sets error message msg-sixteen to indicate invalid cargo status.
Given
A cargo record is found and being processed
When
The cargo status is checked and found to be reject
Then
The system sets error message MSG-SIXTEEN to indicate invalid cargo status
R-GCCADDCD-cbl-00139Status = Deleted?
Validation Rules
Business View: Assuming a cargo record is found and being processed during the 'Status = Deleted?' routine, when the cargo status is checked and found to be deleted, the system executes logic to ensure that the system sets error message msg-sixteen to indicate invalid cargo status.
Given
A cargo record is found and being processed
When
The cargo status is checked and found to be deleted
Then
The system sets error message MSG-SIXTEEN to indicate invalid cargo status
R-GCCADDCD-cbl-00140User Security Level ≠ 'S'?
Authorization Rules
Business View: <EXCLUSION CRITERIA> If a cargo record is found and user security level is not 's', and the cargo status is blank, reject, or error occurs during the 'User Security Level ≠ 'S'?' routine, then the system must guarantee that the system sets error message msg-sixteen to indicate invalid cargo status for the user's security level.
EXCLUDING
A cargo record is found and user security level is not 'S'
When
The cargo status is blank, reject, or error
Then
The system sets error message MSG-SIXTEEN to indicate invalid cargo status for the user's security level
R-GCCADDCD-cbl-00141Cargo Status Valid - Continue Processing
Validation Rules
Business View: Assuming a cargo record is found and is linehaul cargo during the 'Cargo Status Valid - Continue Processing' routine, when the cargo status is manual, the system executes logic to ensure that the system sets error message msg-sixteen to indicate invalid cargo status.
Given
A cargo record is found and is linehaul cargo
When
The cargo status is manual
Then
The system sets error message MSG-SIXTEEN to indicate invalid cargo status
R-GCCADDCD-cbl-00142Check CDN CUS North Train ID Field
Validation Rules
Business View: Assuming a cargo record is found and being processed during the 'Check CDN CUS North Train ID Field' routine, when the system checks the canadian customs north train id field in the cargo record, the system executes logic to ensure that if the field is not empty (contains spaces), set message seventeen indicating the cargo is already attached to another train.
Given
A cargo record is found and being processed
When
The system checks the Canadian Customs North Train ID field in the cargo record
Then
If the field is not empty (contains spaces), set message seventeen indicating the cargo is already attached to another train
Business View: <EXCLUSION CRITERIA> If cargo is found and the canadian customs north train id field is not empty, and the system processes the train attachment validation occurs during the 'Set Message Seventeen - Cargo Already Attached' routine, then the system must guarantee that set message seventeen flag to true for the current report index to indicate cargo is already attached to another train.
EXCLUDING
Cargo is found and the Canadian Customs North Train ID field is not empty
When
The system processes the train attachment validation
Then
Set message seventeen flag to true for the current report index to indicate cargo is already attached to another train
R-GCCADDCD-cbl-00144Check for linehaul manual manifest status and generate errors if found
Validation Rules
Business View: Assuming a cargo shipment is being processed for validation during the 'Check for linehaul manual manifest status and generate errors if found' routine, when the cargo is found and the shipment is classified as linehaul type and the cargo status is set to manual, the system executes logic to ensure that the system generates error message msg-sixteen and sets an error flag to indicate the shipment requires manual intervention.
Given
A cargo shipment is being processed for validation
When
The cargo is found AND the shipment is classified as linehaul type AND the cargo status is set to manual
Then
The system generates error message MSG-SIXTEEN and sets an error flag to indicate the shipment requires manual intervention
R-GCCADDCD-cbl-00146Check In-Transit Status
Decision Rules
Business View: Assuming a canadian cargo (ccn starting with '6105e') is being processed during the 'Check In-Transit Status' routine, when the system checks the cargo in-transit status, the system executes logic to ensure that if cargo has return status, validate manifest to transit code; otherwise validate manifest from transit code.
Given
A Canadian cargo (CCN starting with '6105E') is being processed
When
The system checks the cargo in-transit status
Then
If cargo has return status, validate manifest TO transit code; otherwise validate manifest FROM transit code
R-GCCADDCD-cbl-00147Check Return Status Transit Code
Validation Rules
Business View: Assuming a canadian cargo with return in-transit status is being processed during the 'Check Return Status Transit Code' routine, when the manifest to transit code is compared with the train crossing port, the system executes logic to ensure that if codes do not match, trigger error message 28 and prepare change message; if codes match, continue normal processing.
Given
A Canadian cargo with return in-transit status is being processed
When
The manifest TO transit code is compared with the train crossing port
Then
If codes do not match, trigger error message 28 and prepare change message; if codes match, continue normal processing
R-GCCADDCD-cbl-00148Check Non-Return Status Transit Code
Validation Rules
Business View: Assuming a canadian cargo with non-return in-transit status is being processed during the 'Check Non-Return Status Transit Code' routine, when the manifest from transit code is compared with the train crossing port, the system executes logic to ensure that if codes do not match, trigger error message 28 and prepare diversion message; if codes match, continue normal processing.
Given
A Canadian cargo with non-return in-transit status is being processed
When
The manifest FROM transit code is compared with the train crossing port
Then
If codes do not match, trigger error message 28 and prepare diversion message; if codes match, continue normal processing
Business View: Assuming a canadian return status cargo has manifest to transit code that doesn't match train crossing port during the 'Prepare GCT1011E Change Message' routine, when error message 28 is triggered, the system executes logic to ensure that prepare gct1011e message with change type, canadian flag, ccn, border name and port for customs processing.
Given
A Canadian return status cargo has manifest TO transit code that doesn't match train crossing port
When
Error message 28 is triggered
Then
Prepare GCT1011E message with change type, Canadian flag, CCN, border name and port for customs processing
Business View: Assuming a canadian non-return status cargo has manifest from transit code that doesn't match train crossing port during the 'Prepare GCT1011E Diversion Message' routine, when error message 28 is triggered, the system executes logic to ensure that prepare gct1011e message with diversion type, canadian flag, ccn, border name and port for customs processing.
Given
A Canadian non-return status cargo has manifest FROM transit code that doesn't match train crossing port
When
Error message 28 is triggered
Then
Prepare GCT1011E message with diversion type, Canadian flag, CCN, border name and port for customs processing
R-GCCADDCD-cbl-00151Check Cargo Status
Validation Rules
Business View: Assuming a cargo processing request is being evaluated for border crossing during the 'Check Cargo Status' routine, when the system checks if cargo data has been found and loaded, the system executes logic to ensure that the system proceeds to transit status validation only if cargo is found, otherwise skips border crossing message preparation.
Given
A cargo processing request is being evaluated for border crossing
When
The system checks if cargo data has been found and loaded
Then
The system proceeds to transit status validation only if cargo is found, otherwise skips border crossing message preparation
R-GCCADDCD-cbl-00153CCN Key = '6105E'?
Validation Rules
Business View: Assuming cargo has been validated and transit status determined during the 'CCN Key = '6105E'?' routine, when the system checks if the ccn key starts with '6105e', the system executes logic to ensure that the system proceeds with canadian border crossing validation if ccn starts with '6105e', otherwise skips border crossing message preparation.
Given
Cargo has been validated and transit status determined
When
The system checks if the CCN key starts with '6105E'
Then
The system proceeds with Canadian border crossing validation if CCN starts with '6105E', otherwise skips border crossing message preparation
R-GCCADDCD-cbl-00154Manifest TO Transit Code ≠ Train Crossing Port?
Decision Rules
Business View: Assuming cargo is in return transit status and has canadian customs ccn key format during the 'Manifest TO Transit Code ≠ Train Crossing Port?' routine, when the system compares the manifest to transit code with the train crossing port code, the system executes logic to ensure that the system prepares a change message if the codes are different, otherwise checks outbound manifest codes.
Given
Cargo is in return transit status and has Canadian customs CCN key format
When
The system compares the manifest TO transit code with the train crossing port code
Then
The system prepares a change message if the codes are different, otherwise checks outbound manifest codes
R-GCCADDCD-cbl-00155Manifest FROM Transit Code ≠ Train Crossing Port?
Decision Rules
Business View: <EXCLUSION CRITERIA> If cargo is not in return transit status and has canadian customs ccn key format, and the system compares the manifest from transit code with the train crossing port code occurs during the 'Manifest FROM Transit Code ≠ Train Crossing Port?' routine, then the system must guarantee that the system prepares a diversion message if the codes are different, otherwise completes processing without border crossing messages.
EXCLUDING
Cargo is not in return transit status and has Canadian customs CCN key format
When
The system compares the manifest FROM transit code with the train crossing port code
Then
The system prepares a diversion message if the codes are different, otherwise completes processing without border crossing messages
R-GCCADDCD-cbl-00156Build Change Message for GCT1011E
Action Rules
Business View: Assuming return transit cargo with canadian ccn has manifest destination different from train crossing port during the 'Build Change Message for GCT1011E' routine, when the system builds a gct1011e change message, the system executes logic to ensure that the system sets spawned flag, increments counter, initializes message structure, sets security level, copies ccn key, sets canadian flag, sets change message type, and copies border crossing details.
Given
Return transit cargo with Canadian CCN has manifest destination different from train crossing port
When
The system builds a GCT1011E change message
Then
The system sets spawned flag, increments counter, initializes message structure, sets security level, copies CCN key, sets Canadian flag, sets change message type, and copies border crossing details
R-GCCADDCD-cbl-00157Build Diversion Message for GCT1011E
Action Rules
Business View: Assuming outbound transit cargo with canadian ccn has manifest origin different from train crossing port during the 'Build Diversion Message for GCT1011E' routine, when the system builds a gct1011e diversion message, the system executes logic to ensure that the system sets spawned flag, increments counter, initializes message structure, sets security level, copies ccn key, sets canadian flag, sets diversion message type, and copies border crossing details.
Given
Outbound transit cargo with Canadian CCN has manifest origin different from train crossing port
When
The system builds a GCT1011E diversion message
Then
The system sets spawned flag, increments counter, initializes message structure, sets security level, copies CCN key, sets Canadian flag, sets diversion message type, and copies border crossing details
R-GCCADDCD-cbl-00158Set Message as Spawned
Process Rules
Business View: Assuming a gct1011e message needs to be prepared for border crossing processing during the 'Set Message as Spawned' routine, when the system begins message preparation, the system executes logic to ensure that the system sets the spawned status flag to indicate messages are being prepared.
Given
A GCT1011E message needs to be prepared for border crossing processing
When
The system begins message preparation
Then
The system sets the spawned status flag to indicate messages are being prepared
Business View: Assuming a new gct1011e message slot is being prepared during the 'Initialize Message Input Structure' routine, when the system initializes the message input structure, the system executes logic to ensure that the system clears all fields in the message input structure for the current message index.
Given
A new GCT1011E message slot is being prepared
When
The system initializes the message input structure
Then
The system clears all fields in the message input structure for the current message index
R-GCCADDCD-cbl-00160Set Security Level to High Values
Authorization Rules
Business View: Assuming a gct1011e message structure has been initialized during the 'Set Security Level to High Values' routine, when the system sets the security level for the message, the system executes logic to ensure that the system assigns high values to the security byte field to indicate maximum security clearance required.
Given
A GCT1011E message structure has been initialized
When
The system sets the security level for the message
Then
The system assigns high values to the security byte field to indicate maximum security clearance required
R-GCCADDCD-cbl-00161Copy CCN Key to Message
Process Rules
Business View: Assuming a gct1011e message is being prepared with security level set during the 'Copy CCN Key to Message' routine, when the system copies cargo identification data, the system executes logic to ensure that the system moves the ccn key from the cargo record to the message ccn field.
Given
A GCT1011E message is being prepared with security level set
When
The system copies cargo identification data
Then
The system moves the CCN key from the cargo record to the message CCN field
R-GCCADDCD-cbl-00162Set Canadian Flag
Process Rules
Business View: Assuming a gct1011e message has ccn key copied and is being prepared for canadian border crossing during the 'Set Canadian Flag' routine, when the system sets processing flags for the message, the system executes logic to ensure that the system sets the canadian flag to indicate this message requires canadian customs processing.
Given
A GCT1011E message has CCN key copied and is being prepared for Canadian border crossing
When
The system sets processing flags for the message
Then
The system sets the Canadian flag to indicate this message requires Canadian customs processing
R-GCCADDCD-cbl-00163Set Change Message Type
Process Rules
Business View: Assuming a canadian gct1011e message is being prepared for return transit cargo during the 'Set Change Message Type' routine, when the system sets the message type for change processing, the system executes logic to ensure that the system sets the change flag to indicate this is a destination change message.
Given
A Canadian GCT1011E message is being prepared for return transit cargo
When
The system sets the message type for change processing
Then
The system sets the change flag to indicate this is a destination change message
R-GCCADDCD-cbl-00164Set Diversion Message Type
Process Rules
Business View: Assuming a canadian gct1011e message is being prepared for outbound transit cargo during the 'Set Diversion Message Type' routine, when the system sets the message type for diversion processing, the system executes logic to ensure that the system sets the diversion flag to indicate this is an origin diversion message.
Given
A Canadian GCT1011E message is being prepared for outbound transit cargo
When
The system sets the message type for diversion processing
Then
The system sets the diversion flag to indicate this is an origin diversion message
R-GCCADDCD-cbl-00165Copy Border Crossing Name
Process Rules
Business View: Assuming a gct1011e message has message type set and needs location information during the 'Copy Border Crossing Name' routine, when the system copies border crossing identification data, the system executes logic to ensure that the system moves the train crossing name to the message border name field.
Given
A GCT1011E message has message type set and needs location information
When
The system copies border crossing identification data
Then
The system moves the train crossing name to the message border name field
R-GCCADDCD-cbl-00166Copy Border Crossing Port Code
Process Rules
Business View: Assuming a gct1011e message has border crossing name copied during the 'Copy Border Crossing Port Code' routine, when the system completes location identification data, the system executes logic to ensure that the system moves the train crossing port code to the message border code field.
Given
A GCT1011E message has border crossing name copied
When
The system completes location identification data
Then
The system moves the train crossing port code to the message border code field
R-GCCADDCD-cbl-00167Increment Message Counter
Process Rules
Business View: Assuming a gct1011e message has been completely prepared with all required data during the 'Increment Message Counter' routine, when the system finalizes message preparation, the system executes logic to ensure that the system increments the pre-spawn message counter by 1 to track the total number of messages prepared.
Given
A GCT1011E message has been completely prepared with all required data
When
The system finalizes message preparation
Then
The system increments the pre-spawn message counter by 1 to track the total number of messages prepared
R-GCCADDCD-cbl-00275Set GCX101 Spawned Flag to True
Process Rules
Business View: Assuming a cargo with ccn starting with '6105e' requires a change message for canadian border crossing during the 'Set GCX101 Spawned Flag to True' routine, when the system begins building the change message, the system executes logic to ensure that the gcx101 spawned flag is set to true to indicate message processing is active.
Given
A cargo with CCN starting with '6105E' requires a change message for Canadian border crossing
When
The system begins building the change message
Then
The GCX101 spawned flag is set to true to indicate message processing is active
R-GCCADDCD-cbl-00276Increment Pre-Spawn Index Counter
Process Rules
Business View: Assuming a change message is being prepared for canadian border crossing during the 'Increment Pre-Spawn Index Counter' routine, when the message building process starts, the system executes logic to ensure that the pre-spawn index counter is incremented by 1 to track the new message.
Given
A change message is being prepared for Canadian border crossing
When
The message building process starts
Then
The pre-spawn index counter is incremented by 1 to track the new message
Business View: Assuming a new change message is being created for canadian border crossing during the 'Initialize GCX101 Input Structure' routine, when the message structure needs to be prepared, the system executes logic to ensure that the gcx101 input structure for the current index is initialized to clear any existing data.
Given
A new change message is being created for Canadian border crossing
When
The message structure needs to be prepared
Then
The GCX101 input structure for the current index is initialized to clear any existing data
R-GCCADDCD-cbl-00278Set Security Byte to High Values
Authorization Rules
Business View: Assuming a change message is being prepared for canadian border crossing during the 'Set Security Byte to High Values' routine, when security level needs to be assigned to the message, the system executes logic to ensure that the security byte is set to high values to indicate maximum security level.
Given
A change message is being prepared for Canadian border crossing
When
Security level needs to be assigned to the message
Then
The security byte is set to high values to indicate maximum security level
R-GCCADDCD-cbl-00279Move CCN Key to Message
Definitional Rules
Business View: Assuming a change message is being created for a specific cargo during the 'Move CCN Key to Message' routine, when the cargo identification needs to be included in the message, the system executes logic to ensure that the ccn key from the cargo record is moved to the gcx101 message structure.
Given
A change message is being created for a specific cargo
When
The cargo identification needs to be included in the message
Then
The CCN key from the cargo record is moved to the GCX101 message structure
R-GCCADDCD-cbl-00280Set Canadian Flag to True
Policy Rules
Business View: Assuming a change message is being prepared for canadian border crossing during the 'Set Canadian Flag to True' routine, when the message destination needs to be specified, the system executes logic to ensure that the canadian flag in the message is set to true.
Given
A change message is being prepared for Canadian border crossing
When
The message destination needs to be specified
Then
The Canadian flag in the message is set to true
R-GCCADDCD-cbl-00281Set Change Message Type Flag
Definitional Rules
Business View: Assuming a change message is being prepared for canadian border crossing during the 'Set Change Message Type Flag' routine, when the message type needs to be specified, the system executes logic to ensure that the change flag in the gcx101 message is set to true.
Given
A change message is being prepared for Canadian border crossing
When
The message type needs to be specified
Then
The change flag in the GCX101 message is set to true
R-GCCADDCD-cbl-00282Move Train Crossing Name to Border Name
Definitional Rules
Business View: Assuming a change message is being prepared for a specific train crossing during the 'Move Train Crossing Name to Border Name' routine, when location identification needs to be included in the message, the system executes logic to ensure that the train crossing name is moved to the border name field in the message.
Given
A change message is being prepared for a specific train crossing
When
Location identification needs to be included in the message
Then
The train crossing name is moved to the border name field in the message
R-GCCADDCD-cbl-00283Move Train Crossing Port to Border Code
Definitional Rules
Business View: Assuming a change message is being prepared for a specific train crossing port during the 'Move Train Crossing Port to Border Code' routine, when port identification needs to be included in the message, the system executes logic to ensure that the train crossing port code is moved to the border code field in the message.
Given
A change message is being prepared for a specific train crossing port
When
Port identification needs to be included in the message
Then
The train crossing port code is moved to the border code field in the message
R-GCCADDCD-cbl-00284Set GCX101 Spawned Flag to True
Process Rules
Business View: Assuming a cargo requires diversion message processing for canadian border crossing during the 'Set GCX101 Spawned Flag to True' routine, when the system begins building a diversion message, the system executes logic to ensure that the gcx101 spawned flag is set to true to indicate message processing is active.
Given
A cargo requires diversion message processing for Canadian border crossing
When
The system begins building a diversion message
Then
The GCX101 spawned flag is set to true to indicate message processing is active
R-GCCADDCD-cbl-00285Increment Pre-Spawn Index Counter
Computation Rules
Business View: Assuming a diversion message is being prepared for processing during the 'Increment Pre-Spawn Index Counter' routine, when the system needs to track multiple diversion messages, the system executes logic to ensure that the pre-spawn index counter is incremented by 1.
Given
A diversion message is being prepared for processing
When
The system needs to track multiple diversion messages
Business View: Assuming a new diversion message needs to be created during the 'Initialize GCX101 Input Structure' routine, when the system prepares the message structure, the system executes logic to ensure that the gcx101 input structure is initialized to clear any previous data.
Given
A new diversion message needs to be created
When
The system prepares the message structure
Then
The GCX101 input structure is initialized to clear any previous data
R-GCCADDCD-cbl-00287Set Security Byte to High Values
Authorization Rules
Business View: Assuming a diversion message is being prepared for canadian border crossing during the 'Set Security Byte to High Values' routine, when security level needs to be assigned to the message, the system executes logic to ensure that the security byte is set to high values to ensure maximum security clearance.
Given
A diversion message is being prepared for Canadian border crossing
When
Security level needs to be assigned to the message
Then
The security byte is set to high values to ensure maximum security clearance
R-GCCADDCD-cbl-00288Move CCN Key to Message
Definitional Rules
Business View: Assuming a cargo with a specific ccn key requires diversion processing during the 'Move CCN Key to Message' routine, when the diversion message is being populated with cargo information, the system executes logic to ensure that the ccn key is moved to the diversion message structure.
Given
A cargo with a specific CCN key requires diversion processing
When
The diversion message is being populated with cargo information
Then
The CCN key is moved to the diversion message structure
R-GCCADDCD-cbl-00289Set Message Type to Canadian
Definitional Rules
Business View: Assuming a diversion message is being created for border crossing during the 'Set Message Type to Canadian' routine, when the message type needs to be specified, the system executes logic to ensure that the message type is set to canadian to indicate canadian border processing.
Given
A diversion message is being created for border crossing
When
The message type needs to be specified
Then
The message type is set to Canadian to indicate Canadian border processing
R-GCCADDCD-cbl-00290Set Message Type to Diversion
Definitional Rules
Business View: Assuming a message needs to notify about cargo routing changes during the 'Set Message Type to Diversion' routine, when the specific message category is being assigned, the system executes logic to ensure that the message type is set to diversion to indicate route change processing.
Given
A message needs to notify about cargo routing changes
When
The specific message category is being assigned
Then
The message type is set to diversion to indicate route change processing
R-GCCADDCD-cbl-00291Move Train Crossing Name to Border Name
Definitional Rules
Business View: Assuming a diversion message requires border crossing location information during the 'Move Train Crossing Name to Border Name' routine, when the border name field needs to be populated, the system executes logic to ensure that the train crossing name is moved to the border name field in the message.
Given
A diversion message requires border crossing location information
When
The border name field needs to be populated
Then
The train crossing name is moved to the border name field in the message
R-GCCADDCD-cbl-00292Move Train Crossing Port to Border Code
Definitional Rules
Business View: Assuming a diversion message requires border crossing port identification during the 'Move Train Crossing Port to Border Code' routine, when the border code field needs to be populated, the system executes logic to ensure that the train crossing port code is moved to the border code field in the message.
Given
A diversion message requires border crossing port identification
When
The border code field needs to be populated
Then
The train crossing port code is moved to the border code field in the message
R-GCCADDCD-cbl-00170Retrieve FWSWRWR Segment
Action Rules
Business View: Assuming root key is provided for waybill relationship lookup during the 'Retrieve FWSWRWR Segment' routine, when the system queries the fwswrwr database segment, the system executes logic to ensure that retrieve the waybill relationship record that links flat cars to containers.
Given
Root key is provided for waybill relationship lookup
When
The system queries the FWSWRWR database segment
Then
Retrieve the waybill relationship record that links flat cars to containers
R-GCCADDCD-cbl-00171Container Relationship Found?
Validation Rules
Business View: Assuming a waybill relationship database query has been executed during the 'Container Relationship Found?' routine, when the system checks the query results, the system executes logic to ensure that if container relationship is found, proceed to retrieve container equipment data, otherwise set container not found message.
Given
A waybill relationship database query has been executed
When
The system checks the query results
Then
If container relationship is found, proceed to retrieve container equipment data, otherwise set container not found message
R-GCCADDCD-cbl-00173Get FWSWREQ Segment for Container Details
Action Rules
Business View: Assuming container equipment database access is initiated during the 'Get FWSWREQ Segment for Container Details' routine, when the system queries the fwswreq database segment, the system executes logic to ensure that retrieve the container equipment record containing detailed container information.
Given
Container equipment database access is initiated
When
The system queries the FWSWREQ database segment
Then
Retrieve the container equipment record containing detailed container information
R-GCCADDCD-cbl-00176Set Container Not Found Message
Process Rules
Business View: Assuming a waybill relationship database query has been completed during the 'Set Container Not Found Message' routine, when no container relationship is found for the given root key, the system executes logic to ensure that set message eleven indicating container relationship not found and add to report.
Given
A waybill relationship database query has been completed
When
No container relationship is found for the given root key
Then
Set message eleven indicating container relationship not found and add to report
Business View: Assuming container relation search has been performed during the 'Generate Missing Container Relation Error' routine, when no container relation record is found in fwswrwr database, the system executes logic to ensure that set message eleven error flag and add to report index.
Given
Container relation search has been performed
When
No container relation record is found in FWSWRWR database
Then
Set message eleven error flag and add to report index
R-GCCADDCD-cbl-00184Generate System Error - Missing Equipment
Action Rules
Business View: <EXCLUSION CRITERIA> If container relation exists but equipment details query has been executed, and container equipment details are not found in fwswreq database occurs during the 'Generate System Error - Missing Equipment' routine, then the system must guarantee that generate abend message indicating fwswrwr segment exists without fwswreq segment and perform system abend.
EXCLUDING
Container relation exists but equipment details query has been executed
When
Container equipment details are not found in FWSWREQ database
Then
Generate abend message indicating FWSWRWR segment exists without FWSWREQ segment and perform system abend
R-GCCADDCD-cbl-00185Is this a Message Line?
Decision Rules
Business View: Assuming a report line is being processed with a report index during the 'Is this a Message Line?' routine, when the system checks if the line contains a message, the system executes logic to ensure that the system identifies whether this is a message line requiring categorization.
Given
A report line is being processed with a report index
When
The system checks if the line contains a message
Then
The system identifies whether this is a message line requiring categorization
R-GCCADDCD-cbl-00186Error Message?
Decision Rules
Business View: Assuming a message line is being evaluated during the 'Error Message?' routine, when the system checks the message error indicator, the system executes logic to ensure that the system determines if this is an error message requiring error processing.
Given
A message line is being evaluated
When
The system checks the message error indicator
Then
The system determines if this is an error message requiring error processing
R-GCCADDCD-cbl-00187Type 28 Message?
Decision Rules
Business View: Assuming an error message is being processed during the 'Type 28 Message?' routine, when the message type indicator equals 28, the system executes logic to ensure that the system routes this message for pre-spawn count processing instead of regular error count.
Given
An error message is being processed
When
The message type indicator equals 28
Then
The system routes this message for pre-spawn count processing instead of regular error count
R-GCCADDCD-cbl-00188Add 1 to Pre-Spawn Count
Computation Rules
Business View: Assuming a message type 28 error has been identified during the 'Add 1 to Pre-Spawn Count' routine, when the system processes the special message type, the system executes logic to ensure that the pre-spawn count is incremented by 1.
Given
A message type 28 error has been identified
When
The system processes the special message type
Then
The pre-spawn count is incremented by 1
R-GCCADDCD-cbl-00189Add 1 to Error Count
Computation Rules
Business View: <EXCLUSION CRITERIA> If an error message that is not type 28 has been identified, and the system processes the regular error message occurs during the 'Add 1 to Error Count' routine, then the system must guarantee that the error count is incremented by 1.
EXCLUDING
An error message that is not type 28 has been identified
When
The system processes the regular error message
Then
The error count is incremented by 1
R-GCCADDCD-cbl-00190Warning Message?
Decision Rules
Business View: <EXCLUSION CRITERIA> If a message line that is not an error is being evaluated, and the system checks the message warning indicator occurs during the 'Warning Message?' routine, then the system must guarantee that the system determines if this is a warning message requiring warning processing.
EXCLUDING
A message line that is not an error is being evaluated
When
The system checks the message warning indicator
Then
The system determines if this is a warning message requiring warning processing
R-GCCADDCD-cbl-00191Add 1 to Error Count
Computation Rules
Business View: Assuming a warning message has been identified during the 'Add 1 to Error Count' routine, when the system processes the warning message, the system executes logic to ensure that the error count is incremented by 1.
Given
A warning message has been identified
When
The system processes the warning message
Then
The error count is incremented by 1
R-GCCADDCD-cbl-00192Informational Message?
Decision Rules
Business View: Assuming a message line that is neither error nor warning is being evaluated during the 'Informational Message?' routine, when the system checks the message informational indicator, the system executes logic to ensure that the system determines if this is an informational message requiring info processing.
Given
A message line that is neither error nor warning is being evaluated
When
The system checks the message informational indicator
Then
The system determines if this is an informational message requiring info processing
R-GCCADDCD-cbl-00193Add 1 to Info Count
Computation Rules
Business View: Assuming an informational message has been identified during the 'Add 1 to Info Count' routine, when the system processes the informational message, the system executes logic to ensure that the information count is incremented by 1.
Given
An informational message has been identified
When
The system processes the informational message
Then
The information count is incremented by 1
R-GCCADDCD-cbl-00194Request Message?
Decision Rules
Business View: Assuming a message has been categorized by type during the 'Request Message?' routine, when the system checks if the message has a request indicator, the system executes logic to ensure that the system determines if this message requires request error count processing.
Given
A message has been categorized by type
When
The system checks if the message has a request indicator
Then
The system determines if this message requires request error count processing
R-GCCADDCD-cbl-00195Add 1 to Request Error Count
Computation Rules
Business View: Assuming a message with a request indicator has been identified during the 'Add 1 to Request Error Count' routine, when the system processes the request message, the system executes logic to ensure that the request error count is incremented by 1.
Given
A message with a request indicator has been identified
When
The system processes the request message
Then
The request error count is incremented by 1
R-GCCADDCD-cbl-00196Increment Report Index
Process Rules
Business View: Assuming message categorization processing is complete for current line during the 'Increment Report Index' routine, when the system advances to the next report line, the system executes logic to ensure that the report index is incremented by 1.
Given
Message categorization processing is complete for current line
When
The system advances to the next report line
Then
The report index is incremented by 1
R-GCCADDCD-cbl-00198Set Maximum Reached Message
Action Rules
Business View: Assuming the maximum report lines have been reached during the 'Set Maximum Reached Message' routine, when the system needs to indicate capacity exceeded, the system executes logic to ensure that message type 9 is set for the current report line.
Given
The maximum report lines have been reached
When
The system needs to indicate capacity exceeded
Then
Message type 9 is set for the current report line
R-GCCADDCD-cbl-00199Add 1 to Request Error Count
Computation Rules
Business View: Assuming maximum report capacity has been reached and message 9 has been set during the 'Add 1 to Request Error Count' routine, when the system processes the capacity exceeded condition, the system executes logic to ensure that the request error count is incremented by 1.
Given
Maximum report capacity has been reached and message 9 has been set
When
The system processes the capacity exceeded condition
Then
The request error count is incremented by 1
R-GCCADDCD-cbl-00202Any Errors in Report?
Decision Rules
Business View: Assuming report finalization is in progress during the 'Any Errors in Report?' routine, when the system checks for errors in the report, the system executes logic to ensure that if no errors exist, proceed to spawn message processing, otherwise proceed to error handling path.
Given
Report finalization is in progress
When
The system checks for errors in the report
Then
If no errors exist, proceed to spawn message processing, otherwise proceed to error handling path
R-GCCADDCD-cbl-00203Any Messages to Spawn?
Decision Rules
Business View: Assuming report has no errors during the 'Any Messages to Spawn?' routine, when the system checks for messages requiring spawn processing, the system executes logic to ensure that if pre-spawn messages exist, process each spawn message, otherwise complete report processing.
Given
Report has no errors
When
The system checks for messages requiring spawn processing
Then
If pre-spawn messages exist, process each spawn message, otherwise complete report processing
R-GCCADDCD-cbl-00204Process Each Spawn Message
Process Rules
Business View: Assuming pre-spawn messages exist and report has no errors during the 'Process Each Spawn Message' routine, when the system processes spawn messages, the system executes logic to ensure that each pre-spawn input is moved to the processing structure and spawn processing is performed.
Given
Pre-spawn messages exist and report has no errors
When
The system processes spawn messages
Then
Each pre-spawn input is moved to the processing structure and spawn processing is performed
R-GCCADDCD-cbl-00205Send GCT1011E Message to Customs
Action Rules
Business View: Assuming a spawn message needs to be sent during the 'Send GCT1011E Message to Customs' routine, when the system processes the spawn message, the system executes logic to ensure that the gct1011e message is sent to customs via cims and writmsgl calls.
Given
A spawn message needs to be sent
When
The system processes the spawn message
Then
The GCT1011E message is sent to customs via CIMS and WRITMSGL calls
R-GCCADDCD-cbl-00206Set Error Count from Spawn Count
Computation Rules
Business View: Assuming spawn messages have been processed successfully during the 'Set Error Count from Spawn Count' routine, when all spawn messages are completed, the system executes logic to ensure that the pre-spawn count is moved to the report error count.
Given
Spawn messages have been processed successfully
When
All spawn messages are completed
Then
The pre-spawn count is moved to the report error count
R-GCCADDCD-cbl-00207Any Messages to Spawn?
Decision Rules
Business View: Assuming report contains errors during the 'Any Messages to Spawn?' routine, when the system checks for spawn processing requirements, the system executes logic to ensure that if pre-spawn messages exist, review each report line for message type conversion, otherwise complete report processing.
Given
Report contains errors
When
The system checks for spawn processing requirements
Then
If pre-spawn messages exist, review each report line for message type conversion, otherwise complete report processing
R-GCCADDCD-cbl-00208Review Each Report Line
Process Rules
Business View: Assuming report has errors and spawn processing is required during the 'Review Each Report Line' routine, when the system reviews report lines, the system executes logic to ensure that each report line from 1 to last line is examined for message type indicators.
Given
Report has errors and spawn processing is required
When
The system reviews report lines
Then
Each report line from 1 to last line is examined for message type indicators
R-GCCADDCD-cbl-00209Is Message Type 28?
Decision Rules
Business View: Assuming a report line is being reviewed during error processing during the 'Is Message Type 28?' routine, when the system checks the message type indicator, the system executes logic to ensure that if message type is 28, convert to message type 19 and increment error count, otherwise continue to next line.
Given
A report line is being reviewed during error processing
When
The system checks the message type indicator
Then
If message type is 28, convert to message type 19 and increment error count, otherwise continue to next line
R-GCCADDCD-cbl-00210Convert to Message Type 19
Process Rules
Business View: Assuming a report line has message type 28 and report contains errors during the 'Convert to Message Type 19' routine, when the system processes the message conversion, the system executes logic to ensure that message type 28 is converted to message type 19.
Given
A report line has message type 28 and report contains errors
When
The system processes the message conversion
Then
Message type 28 is converted to message type 19
R-GCCADDCD-cbl-00211Increment Error Count
Computation Rules
Business View: Assuming a message type 28 has been converted to message type 19 during the 'Increment Error Count' routine, when the conversion is completed, the system executes logic to ensure that the report error count is incremented by 1.
Given
A message type 28 has been converted to message type 19
When
The conversion is completed
Then
The report error count is incremented by 1
R-GCCADDCD-cbl-00212Check Report Status
Decision Rules
Business View: Assuming a report has been processed with potential errors during the 'Check Report Status' routine, when the system checks if there are any errors in the report, the system executes logic to ensure that the system determines whether to proceed with spawning customs messages or convert error messages.
Given
A report has been processed with potential errors
When
The system checks if there are any errors in the report
Then
The system determines whether to proceed with spawning customs messages or convert error messages
R-GCCADDCD-cbl-00213Any Errors Found?
Decision Rules
Business View: Assuming a report processing has completed during the 'Any Errors Found?' routine, when the system evaluates if rpt-no-error condition is true, the system executes logic to ensure that if no errors exist, proceed with customs message spawning, otherwise convert error messages to warnings.
Given
A report processing has completed
When
The system evaluates if RPT-NO-ERROR condition is true
Then
If no errors exist, proceed with customs message spawning, otherwise convert error messages to warnings
R-GCCADDCD-cbl-00214Pre-spawn Messages Exist?
Decision Rules
Business View: Assuming no errors exist in the report during the 'Pre-spawn Messages Exist?' routine, when the system checks if pre-no-spawn condition is false, the system executes logic to ensure that if pre-spawn messages exist, process them for customs notification, otherwise complete spawn process.
Given
No errors exist in the report
When
The system checks if PRE-NO-SPAWN condition is false
Then
If pre-spawn messages exist, process them for customs notification, otherwise complete spawn process
R-GCCADDCD-cbl-00215Loop Through Pre-spawn Messages
Process Rules
Business View: Assuming pre-spawn messages exist in the queue during the 'Loop Through Pre-spawn Messages' routine, when the system processes messages from index 1 to pre-idx, the system executes logic to ensure that each message in the queue is processed sequentially for customs notification.
Given
Pre-spawn messages exist in the queue
When
The system processes messages from index 1 to PRE-IDX
Then
Each message in the queue is processed sequentially for customs notification
Business View: Assuming a pre-spawn message needs to be sent to customs during the 'Prepare GCT1011E Message Structure' routine, when the system moves ws-gcx101-input data to gcx101-input structure, the system executes logic to ensure that the message structure is prepared for customs system processing.
Given
A pre-spawn message needs to be sent to customs
When
The system moves WS-GCX101-INPUT data to GCX101-INPUT structure
Then
The message structure is prepared for customs system processing
R-GCCADDCD-cbl-00217Send Message to Customs via CIMS
Action Rules
Business View: Assuming a gct1011e message structure is prepared during the 'Send Message to Customs via CIMS' routine, when the system calls cims with chng function and alt-pcb, the system executes logic to ensure that the message is sent to the customs system for processing.
Given
A GCT1011E message structure is prepared
When
The system calls CIMS with CHNG function and ALT-PCB
Then
The message is sent to the customs system for processing
R-GCCADDCD-cbl-00218Write Message Log Entry
Action Rules
Business View: Assuming a customs message has been sent via cims during the 'Write Message Log Entry' routine, when the system calls writmsgl with message details, the system executes logic to ensure that the message transmission is logged with message code, content, length and module name.
Given
A customs message has been sent via CIMS
When
The system calls WRITMSGL with message details
Then
The message transmission is logged with message code, content, length and module name
R-GCCADDCD-cbl-00219Purge Message Queue
Action Rules
Business View: Assuming a customs message has been logged successfully during the 'Purge Message Queue' routine, when the system calls cims with purg function, the system executes logic to ensure that the message queue is purged to prepare for next message.
Given
A customs message has been logged successfully
When
The system calls CIMS with PURG function
Then
The message queue is purged to prepare for next message
R-GCCADDCD-cbl-00220More Messages to Send?
Decision Rules
Business View: Assuming a pre-spawn message has been processed during the 'More Messages to Send?' routine, when the system checks if spn-idx is less than or equal to pre-idx, the system executes logic to ensure that if more messages exist, continue processing, otherwise proceed to update error count.
Given
A pre-spawn message has been processed
When
The system checks if SPN-IDX is less than or equal to PRE-IDX
Then
If more messages exist, continue processing, otherwise proceed to update error count
R-GCCADDCD-cbl-00221Update Error Count with Spawn Count
Computation Rules
Business View: Assuming all pre-spawn messages have been processed successfully during the 'Update Error Count with Spawn Count' routine, when the system completes the spawn processing loop, the system executes logic to ensure that the pre-spawn-cnt is moved to rpt-error-cnt to reflect spawned message count.
Given
All pre-spawn messages have been processed successfully
When
The system completes the spawn processing loop
Then
The PRE-SPAWN-CNT is moved to RPT-ERROR-CNT to reflect spawned message count
R-GCCADDCD-cbl-00222Convert Error Messages to Warnings
Process Rules
Business View: Assuming errors exist in the report and pre-spawn messages are available during the 'Convert Error Messages to Warnings' routine, when the system finds message type 28 in the report lines, the system executes logic to ensure that message type 28 is converted to message type 19 and error count is incremented.
Given
Errors exist in the report and pre-spawn messages are available
When
The system finds message type 28 in the report lines
Then
Message type 28 is converted to message type 19 and error count is incremented
Business View: Assuming a cargo control number exists and border crossing information is available during the 'Prepare GCT1011E Message Structure' routine, when the system needs to send a message to customs, the system executes logic to ensure that the system moves the prepared input data to the gct1011e message structure.
Given
A cargo control number exists and border crossing information is available
When
The system needs to send a message to customs
Then
The system moves the prepared input data to the GCT1011E message structure
R-GCCADDCD-cbl-00294Clear Accept Status
Process Rules
Business View: Assuming a message needs to be sent to customs system during the 'Clear Accept Status' routine, when the system prepares to initialize communication, the system executes logic to ensure that the system clears the accept status to ensure clean communication channel.
Given
A message needs to be sent to customs system
When
The system prepares to initialize communication
Then
The system clears the accept status to ensure clean communication channel
R-GCCADDCD-cbl-00295Call CIMS to Initialize Message
Action Rules
Business View: Assuming the message structure is prepared and communication channel is cleared during the 'Call CIMS to Initialize Message' routine, when the system needs to establish communication with customs, the system executes logic to ensure that the system calls cims with chng function and alt-pcb to initialize the message channel.
Given
The message structure is prepared and communication channel is cleared
When
The system needs to establish communication with customs
Then
The system calls CIMS with CHNG function and ALT-PCB to initialize the message channel
R-GCCADDCD-cbl-00296Call WRITMSGL to Write Message
Action Rules
Business View: Assuming the cims communication channel is initialized and message is prepared during the 'Call WRITMSGL to Write Message' routine, when the system needs to transmit the message to customs, the system executes logic to ensure that the system calls writmsgl with message code, content, length and module name to write the message to customs queue.
Given
The CIMS communication channel is initialized and message is prepared
When
The system needs to transmit the message to customs
Then
The system calls WRITMSGL with message code, content, length and module name to write the message to customs queue
R-GCCADDCD-cbl-00297Call CIMS to Purge Message Queue
Process Rules
Business View: Assuming the message has been written to the customs system queue during the 'Call CIMS to Purge Message Queue' routine, when the message transmission is complete, the system executes logic to ensure that the system calls cims with purg function to purge the communication channel and clean up resources.
Given
The message has been written to the customs system queue
When
The message transmission is complete
Then
The system calls CIMS with PURG function to purge the communication channel and clean up resources
R-GCCADDCD-cbl-00342Move GCX101 Input Data to GCT1011E Message
Process Rules
Business View: Assuming a gcx101 input record contains canadian cargo control information for border crossing during the 'Move GCX101 Input Data to GCT1011E Message' routine, when the system needs to notify customs of cargo status changes, the system executes logic to ensure that the gcx101 input data must be moved to the gct1011e message structure to prepare for customs transmission.
Given
A GCX101 input record contains Canadian cargo control information for border crossing
When
The system needs to notify customs of cargo status changes
Then
The GCX101 input data must be moved to the GCT1011E message structure to prepare for customs transmission
R-GCCADDCD-cbl-00343Clear Accept Status
Process Rules
Business View: Assuming a new customs message is being prepared for transmission during the 'Clear Accept Status' routine, when the message initialization process begins, the system executes logic to ensure that the accept status field must be cleared to spaces to indicate a fresh transaction state.
Given
A new customs message is being prepared for transmission
When
The message initialization process begins
Then
The accept status field must be cleared to spaces to indicate a fresh transaction state
R-GCCADDCD-cbl-00344Call CIMS with CHNG Function
Action Rules
Business View: Assuming a customs message requires processing through the messaging system during the 'Call CIMS with CHNG Function' routine, when the message has been prepared and status cleared, the system executes logic to ensure that the cims system must be called with chng function, communication control block, and alternate pcb to initiate message processing.
Given
A customs message requires processing through the messaging system
When
The message has been prepared and status cleared
Then
The CIMS system must be called with CHNG function, communication control block, and alternate PCB to initiate message processing
R-GCCADDCD-cbl-00345Initialize Message Structure
Action Rules
Business View: Assuming a gct1011e message has been prepared for customs notification during the 'Initialize Message Structure' routine, when the message processing system has been initialized, the system executes logic to ensure that the writmsgl utility must be called with the message code, message content, message length, and module name to transmit the message to external customs systems.
Given
A GCT1011E message has been prepared for customs notification
When
The message processing system has been initialized
Then
The WRITMSGL utility must be called with the message code, message content, message length, and module name to transmit the message to external customs systems
R-GCCADDCD-cbl-00346Message Ready for Processing
Process Rules
Business View: Assuming a customs message has been successfully transmitted to external systems during the 'Message Ready for Processing' routine, when the message transmission is complete, the system executes logic to ensure that the cims system must be called with purg function and alternate pcb to purge the message transaction and release system resources.
Given
A customs message has been successfully transmitted to external systems
When
The message transmission is complete
Then
The CIMS system must be called with PURG function and alternate PCB to purge the message transaction and release system resources
R-GCCADDCD-cbl-00347Move GCX101-INPUT to GCT1011E-MSG
Action Rules
Business View: Assuming a gcx101 input record has been prepared with border crossing information during the 'Move GCX101-INPUT to GCT1011E-MSG' routine, when the system needs to format the message for transmission, the system executes logic to ensure that the gcx101 input data should be moved to the gct1011e message structure.
Given
A GCX101 input record has been prepared with border crossing information
When
The system needs to format the message for transmission
Then
The GCX101 input data should be moved to the GCT1011E message structure
R-GCCADDCD-cbl-00348Clear Accept Status
Process Rules
Business View: Assuming a message is ready to be processed during the 'Clear Accept Status' routine, when the system prepares to send the message, the system executes logic to ensure that the accept status should be cleared to spaces to initialize communication state.
Given
A message is ready to be processed
When
The system prepares to send the message
Then
The accept status should be cleared to spaces to initialize communication state
R-GCCADDCD-cbl-00349Call CIMS with CHNG Function
Action Rules
Business View: Assuming a border crossing message needs to be sent to customs during the 'Call CIMS with CHNG Function' routine, when the system initiates message processing, the system executes logic to ensure that a cims change transaction should be started using the alternate pcb.
Given
A border crossing message needs to be sent to customs
When
The system initiates message processing
Then
A CIMS change transaction should be started using the alternate PCB
R-GCCADDCD-cbl-00350Call WRITMSGL to Write Message
Action Rules
Business View: Assuming a gct1011e message has been formatted with border crossing data during the 'Call WRITMSGL to Write Message' routine, when the system needs to transmit the message to customs, the system executes logic to ensure that the writmsgl service should be called with message code, message text, message length, and module name.
Given
A GCT1011E message has been formatted with border crossing data
When
The system needs to transmit the message to customs
Then
The WRITMSGL service should be called with message code, message text, message length, and module name
R-GCCADDCD-cbl-00351Call CIMS with PURG Function
Action Rules
Business View: Assuming a border crossing message has been written to the customs system during the 'Call CIMS with PURG Function' routine, when the message processing is complete, the system executes logic to ensure that a cims purge transaction should be executed to commit the message.
Given
A border crossing message has been written to the customs system
When
The message processing is complete
Then
A CIMS purge transaction should be executed to commit the message
R-GCCADDCD-cbl-00224Are there messages to spawn?
Decision Rules
Business View: Assuming existing errors have been found in the report during the 'Are there messages to spawn?' routine, when the system checks for available pre-spawn messages, the system executes logic to ensure that the system determines whether to proceed with message conversion logic based on spawn message availability.
Given
Existing errors have been found in the report
When
The system checks for available pre-spawn messages
Then
The system determines whether to proceed with message conversion logic based on spawn message availability
R-GCCADDCD-cbl-00225Loop through all report lines
Process Rules
Business View: Assuming errors exist in the report and spawn messages are available during the 'Loop through all report lines' routine, when the system processes each report line sequentially, the system executes logic to ensure that each report line is evaluated for message type conversion requirements.
Given
Errors exist in the report and spawn messages are available
When
The system processes each report line sequentially
Then
Each report line is evaluated for message type conversion requirements
R-GCCADDCD-cbl-00226Is message type 28 Transit Code Error?
Decision Rules
Business View: Assuming a report line is being processed during error handling during the 'Is message type 28 Transit Code Error?' routine, when the system evaluates the message type indicator for the current report line, the system executes logic to ensure that the system determines if the message is type 28 requiring conversion to a warning message.
Given
A report line is being processed during error handling
When
The system evaluates the message type indicator for the current report line
Then
The system determines if the message is type 28 requiring conversion to a warning message
R-GCCADDCD-cbl-00227Convert message type 28 to message type 19 Warning
Action Rules
Business View: Assuming a report line contains message type 28 transit code error during the 'Convert message type 28 to message type 19 Warning' routine, when the system performs error message conversion during error handling, the system executes logic to ensure that the message type 28 is converted to message type 19 warning status.
Given
A report line contains message type 28 transit code error
When
The system performs error message conversion during error handling
Then
The message type 28 is converted to message type 19 warning status
R-GCCADDCD-cbl-00228Increment error count by 1
Computation Rules
Business View: Assuming a message type 28 has been converted to message type 19 during the 'Increment error count by 1' routine, when the system updates error tracking counters, the system executes logic to ensure that the total error count is incremented by one to reflect the converted message.
Given
A message type 28 has been converted to message type 19
When
The system updates error tracking counters
Then
The total error count is incremented by one to reflect the converted message
R-GCCADDCD-cbl-00229Set MERLIN Message Parameters
Process Rules
Business View: Assuming a report needs to be sent to customs personnel during the 'Set MERLIN Message Parameters' routine, when the system prepares merlin message parameters, the system executes logic to ensure that the from user code is set to om01247, to user code is set to om01247, and destination filename is set to request.
Given
A report needs to be sent to customs personnel
When
The system prepares MERLIN message parameters
Then
The from user code is set to OM01247, to user code is set to OM01247, and destination filename is set to REQUEST
R-GCCADDCD-cbl-00230Build Message Subject with Train and Timestamp
Process Rules
Business View: Assuming merlin message parameters are configured and system timestamp is available during the 'Build Message Subject with Train and Timestamp' routine, when the system builds the message subject, the system executes logic to ensure that the subject includes acf2 user id, train number, year, month, day, hour, and minute from system timestamp.
Given
MERLIN message parameters are configured and system timestamp is available
When
The system builds the message subject
Then
The subject includes ACF2 user ID, train number, year, month, day, hour, and minute from system timestamp
R-GCCADDCD-cbl-00231Initialize Return Status Flag
Process Rules
Business View: Assuming message subject has been built with train and timestamp information during the 'Initialize Return Status Flag' routine, when the system prepares for merlin communication, the system executes logic to ensure that the emi return status flag is initialized to clear any previous status.
Given
Message subject has been built with train and timestamp information
When
The system prepares for MERLIN communication
Then
The EMI return status flag is initialized to clear any previous status
R-GCCADDCD-cbl-00232Call MERLIN Messaging System
Action Rules
Business View: Assuming return status flag is initialized and message parameters are configured during the 'Call MERLIN Messaging System' routine, when the system establishes merlin connection, the system executes logic to ensure that cciscom utility is called with cccom and iscom parameters to establish messaging connection.
Given
Return status flag is initialized and message parameters are configured
When
The system establishes MERLIN connection
Then
CCISCOM utility is called with CCCOM and ISCOM parameters to establish messaging connection
R-GCCADDCD-cbl-00233Send Report Table via EMCSEND2
Action Rules
Business View: Assuming merlin messaging connection is established and report table contains error information during the 'Send Report Table via EMCSEND2' routine, when the system transmits the report, the system executes logic to ensure that emcsend2 utility is called with from user code, destination filename, to user code, copy user code, subject, keywords, report table, return status flag, segment numbers, and item type parameters.
Given
MERLIN messaging connection is established and report table contains error information
When
The system transmits the report
Then
EMCSEND2 utility is called with from user code, destination filename, to user code, copy user code, subject, keywords, report table, return status flag, segment numbers, and item type parameters
R-GCCADDCD-cbl-00234Message Send Successful?
Validation Rules
Business View: Assuming report has been transmitted via emcsend2 utility during the 'Message Send Successful?' routine, when the system checks transmission status, the system executes logic to ensure that if emi return status is not successful, the system prepares for abend with 'send to merlin failed' message.
Given
Report has been transmitted via EMCSEND2 utility
When
The system checks transmission status
Then
If EMI return status is not successful, the system prepares for abend with 'SEND TO MERLIN FAILED' message
R-GCCADDCD-cbl-00235Purge Message Queue
Process Rules
Business View: Assuming message transmission to merlin was successful during the 'Purge Message Queue' routine, when the system completes merlin communication, the system executes logic to ensure that iscccom utility is called with iscom and cccom parameters, accept status is initialized, and cims is called with purg function to purge the alternate pcb message queue.
Given
Message transmission to MERLIN was successful
When
The system completes MERLIN communication
Then
ISCCCOM utility is called with ISCOM and CCCOM parameters, accept status is initialized, and CIMS is called with PURG function to purge the alternate PCB message queue
R-GCCADDCD-cbl-00236System Abend - Send Failed
Process Rules
Business View: Assuming message transmission to merlin failed during the 'System Abend - Send Failed' routine, when the system detects transmission failure, the system executes logic to ensure that the abend message is set to 'send to merlin failed' and system abend procedure is performed.
Given
Message transmission to MERLIN failed
When
The system detects transmission failure
Then
The abend message is set to 'SEND TO MERLIN FAILED' and system abend procedure is performed
R-GCCADDCD-cbl-00298Get Current User ID from System
Action Rules
Business View: Assuming a message subject needs to be built for customs notification during the 'Get Current User ID from System' routine, when the system processes the message subject creation, the system executes logic to ensure that the current acf2 user id is extracted from the system control block and assigned to the message subject.
Given
A message subject needs to be built for customs notification
When
The system processes the message subject creation
Then
The current ACF2 user ID is extracted from the system control block and assigned to the message subject
R-GCCADDCD-cbl-00299Extract Train Number from Input
Process Rules
Business View: Assuming a train crossing operation is being processed during the 'Extract Train Number from Input' routine, when the system builds the message subject, the system executes logic to ensure that the train number is extracted from the input parameters and assigned to the message subject.
Given
A train crossing operation is being processed
When
The system builds the message subject
Then
The train number is extracted from the input parameters and assigned to the message subject
R-GCCADDCD-cbl-00300Extract Year Component
Process Rules
Business View: Assuming a message subject with timestamp needs to be created during the 'Extract Year Component' routine, when the system processes the date components, the system executes logic to ensure that the current year is extracted from the system control block and assigned to the message subject.
Given
A message subject with timestamp needs to be created
When
The system processes the date components
Then
The current year is extracted from the system control block and assigned to the message subject
R-GCCADDCD-cbl-00301Extract Month Component
Process Rules
Business View: Assuming a message subject with timestamp needs to be created during the 'Extract Month Component' routine, when the system processes the date components, the system executes logic to ensure that the current month is extracted from the system control block and assigned to the message subject.
Given
A message subject with timestamp needs to be created
When
The system processes the date components
Then
The current month is extracted from the system control block and assigned to the message subject
R-GCCADDCD-cbl-00302Extract Day Component
Process Rules
Business View: Assuming a message subject with timestamp needs to be created during the 'Extract Day Component' routine, when the system processes the date components, the system executes logic to ensure that the current day is extracted from the system control block and assigned to the message subject.
Given
A message subject with timestamp needs to be created
When
The system processes the date components
Then
The current day is extracted from the system control block and assigned to the message subject
R-GCCADDCD-cbl-00303Extract Hour Component
Process Rules
Business View: Assuming a message subject with timestamp needs to be created during the 'Extract Hour Component' routine, when the system processes the time components, the system executes logic to ensure that the current hour is extracted from the system control block and assigned to the message subject.
Given
A message subject with timestamp needs to be created
When
The system processes the time components
Then
The current hour is extracted from the system control block and assigned to the message subject
R-GCCADDCD-cbl-00304Extract Minute Component
Process Rules
Business View: Assuming a message subject with timestamp needs to be created during the 'Extract Minute Component' routine, when the system processes the time components, the system executes logic to ensure that the current minute is extracted from the system control block and assigned to the message subject.
Given
A message subject with timestamp needs to be created
When
The system processes the time components
Then
The current minute is extracted from the system control block and assigned to the message subject
R-GCCADDCD-cbl-00305Combine Train and Timestamp into Subject
Computation Rules
Business View: Assuming all message subject components have been extracted (user id, train number, year, month, day, hour, minute) during the 'Combine Train and Timestamp into Subject' routine, when the system creates the final message subject, the system executes logic to ensure that all components are combined into the merlin-subject field for the customs notification message.
Given
All message subject components have been extracted (user ID, train number, year, month, day, hour, minute)
When
The system creates the final message subject
Then
All components are combined into the MERLIN-SUBJECT field for the customs notification message
R-GCCADDCD-cbl-00352Extract Year from System Date
Action Rules
Business View: Assuming the system has access to current machine date information during the 'Extract Year from System Date' routine, when preparing to send a report to customs system, the system executes logic to ensure that the year component from machine date is extracted and stored for message subject formatting.
Given
The system has access to current machine date information
When
Preparing to send a report to customs system
Then
The year component from machine date is extracted and stored for message subject formatting
R-GCCADDCD-cbl-00353Extract Month from System Date
Action Rules
Business View: Assuming the system has access to current machine date information during the 'Extract Month from System Date' routine, when preparing to send a report to customs system, the system executes logic to ensure that the month component from machine date is extracted and stored for message subject formatting.
Given
The system has access to current machine date information
When
Preparing to send a report to customs system
Then
The month component from machine date is extracted and stored for message subject formatting
R-GCCADDCD-cbl-00354Extract Day from System Date
Action Rules
Business View: Assuming the system has access to current machine date information during the 'Extract Day from System Date' routine, when preparing to send a report to customs system, the system executes logic to ensure that the day component from machine date is extracted and stored for message subject formatting.
Given
The system has access to current machine date information
When
Preparing to send a report to customs system
Then
The day component from machine date is extracted and stored for message subject formatting
R-GCCADDCD-cbl-00355Extract Hour from System Time
Action Rules
Business View: Assuming the system has access to current machine time information during the 'Extract Hour from System Time' routine, when preparing to send a report to customs system, the system executes logic to ensure that the hour component from machine time is extracted and stored for message subject formatting.
Given
The system has access to current machine time information
When
Preparing to send a report to customs system
Then
The hour component from machine time is extracted and stored for message subject formatting
R-GCCADDCD-cbl-00356Extract Minutes from System Time
Action Rules
Business View: Assuming the system has access to current machine time information during the 'Extract Minutes from System Time' routine, when preparing to send a report to customs system, the system executes logic to ensure that the minutes component from machine time is extracted and stored for message subject formatting.
Given
The system has access to current machine time information
When
Preparing to send a report to customs system
Then
The minutes component from machine time is extracted and stored for message subject formatting
R-GCCADDCD-cbl-00357Format Time Components for Message Subject
Computation Rules
Business View: Assuming all date and time components have been extracted and user acf2 id and train information are available during the 'Format Time Components for Message Subject' routine, when creating the complete message subject for customs notification, the system executes logic to ensure that all components are formatted into the merlin-subject field for transmission to customs system.
Given
All date and time components have been extracted and user ACF2 ID and train information are available
When
Creating the complete message subject for customs notification
Then
All components are formatted into the MERLIN-SUBJECT field for transmission to customs system
R-GCCADDCD-cbl-00237Check Information Message Count
Decision Rules
Business View: Assuming equipment processing has completed and informational messages have been counted during the 'Check Information Message Count' routine, when the system checks if any informational messages were generated during processing, the system executes logic to ensure that if informational message count is greater than zero, set return status to no-waybill and terminate processing.
Given
Equipment processing has completed and informational messages have been counted
When
The system checks if any informational messages were generated during processing
Then
If informational message count is greater than zero, set return status to NO-WAYBILL and terminate processing
R-GCCADDCD-cbl-00238Check Error Message Count
Decision Rules
Business View: Assuming equipment processing has completed with zero informational messages and error messages have been counted during the 'Check Error Message Count' routine, when the system checks if any error messages were generated during processing, the system executes logic to ensure that if error message count is greater than zero, set return status to errors, otherwise proceed to success processing.
Given
Equipment processing has completed with zero informational messages and error messages have been counted
When
The system checks if any error messages were generated during processing
Then
If error message count is greater than zero, set return status to ERRORS, otherwise proceed to success processing
R-GCCADDCD-cbl-00239Set Return Status to OK
Decision Rules
Business View: Assuming equipment processing has completed with zero informational messages and zero error messages during the 'Set Return Status to OK' routine, when the system determines that processing completed without issues, the system executes logic to ensure that set return status to ok indicating successful processing.
Given
Equipment processing has completed with zero informational messages and zero error messages
When
The system determines that processing completed without issues
Then
Set return status to OK indicating successful processing
R-GCCADDCD-cbl-00241Set Return Status to ERRORS
Action Rules
Business View: Assuming equipment processing has completed with error messages generated during the 'Set Return Status to ERRORS' routine, when the system determines that errors occurred during processing, the system executes logic to ensure that set return status to errors and invoke customs reporting process to send error details to external customs system.
Given
Equipment processing has completed with error messages generated
When
The system determines that errors occurred during processing
Then
Set return status to ERRORS and invoke customs reporting process to send error details to external customs system