As an EDI Gateway Service,
I want to orchestrate and execute all GCCTBIO EDI data mapping and validation logic,
So that I can ensure strict compliance with US Customs (P140) automated payload constraints in a single consolidated service.
I want to orchestrate and execute all GCCTBIO EDI data mapping and validation logic,
So that I can ensure strict compliance with US Customs (P140) automated payload constraints in a single consolidated service.
Prerequisites & Setup
- [8:Initialize Root Segment SSA]
The SSA flag indicates qualified search is required → The system sets the root segment key value for targeted access - [9:Initialize Dependent Segment SSA]
The unqualified SSA flag is not set → The system sets both root segment key value and dependent segment key value for hierarchical access - [9:Initialize Dependent Segment SSA]
The segment name is neither GCSTBRT (root) nor GCSTBDP (dependent) → The system marks the operation as not valid and prevents database access
Core Acceptance Criteria
- [10:Handle Dependent Segment Unqualified Access]
Either the unqualified SSA flag is set or the SSA flag indicates unqualified search → The system sets only the root segment key value and configures unqualified SSA for broader search scope - [11:Route Root Segment Access, 14:Route Dependent Segment Access]
The operation is ready for database access → The system routes to primary PCB if second PCB flag is not set, otherwise routes to secondary PCB - [12:Execute Root Segment Database Call with Primary PCB]
The SSA configuration determines the call parameters → The system calls CIMS with appropriate SSA parameters: qualified SSA for targeted access, unqualified SSA for broader access, or no SSA for direct operations - [13:Execute Root Segment Database Call with Secondary PCB]
The SSA configuration determines the call parameters → The system calls CIMS with secondary PCB and appropriate SSA parameters: qualified SSA for targeted access, unqualified SSA for broader access, or no SSA for direct operations - [15:Execute Dependent Segment Database Call with Primary PCB]
The SSA configuration determines the call parameters → The system calls CIMS with hierarchical SSA parameters: both root and dependent qualified SSAs for targeted access, root qualified and dependent unqualified SSAs for mixed access, or no SSA for direct operations - [16:Execute Dependent Segment Database Call with Secondary PCB]
The SSA configuration determines the call parameters → The system calls CIMS with secondary PCB and hierarchical SSA parameters: both root and dependent qualified SSAs for targeted access, root qualified and dependent unqualified SSAs for mixed access, or no SSA for direct operations - [Configure Unqualified SSA for Insert]
The system configures the segment search argument → The SSA flag should be set to unqualified SSA type for insert processing - [Check if Segment is Root Segment]
If the segment name against the root segment identifier → The system determines if the segment is a root segment type and routes accordingly - [SSA Type = QUALIFIED-SSA?]
The system checks the SSA flag type for qualified search requirements → The system determines whether to use qualified or unqualified SSA for the root segment access - [Set Root Segment Key Value]
The SSA flag indicates qualified search is needed → The system assigns the root segment key value to enable precise segment access - [Skip Key Setup]
The SSA flag indicates unqualified search is acceptable → The system skips the key value assignment and continues processing without specific key setup - [Set Root Segment Key Value Set Dependent Segment Key Value]
The system initializes the SSA structure for dependent segment access → The system sets the root segment key value from GCSTBRT-KEY and sets the dependent segment key value from GCSTBDP-KEY - [Set Root Segment Key Value Change SSA Type to Unqualified]
The system initializes the SSA structure for dependent segment access → The system sets the root segment key value from GCSTBRT-KEY and changes the SSA flag to unqualified SSA - [Set Root Segment Key Value Change SSA Type to Unqualified]
The system initializes the SSA structure for dependent segment access → The system sets the root segment key value from GCSTBRT-KEY and ensures the SSA flag is set to unqualified SSA - [Set Root Segment Key Value]
The system initializes the SSA configuration → The system sets both the root segment key value from GCSTBRT-KEY and the dependent segment key value from GCSTBDP-KEY - [Use Alternative SSA Configuration]
The system initializes the SSA configuration → The system sets only the root segment key value from GCSTBRT-KEY and changes the SSA flag to unqualified - [Use Alternative SSA Configuration]
The system initializes the SSA configuration → The system sets the root segment key value from GCSTBRT-KEY and ensures the SSA flag is set to unqualified - [Set Root Key Value]
SSA initialization is performed → Root key value is set from GCSTBRT-KEY AND dependent key value is set from GCSTBDP-KEY - [Set Root Key Value Only]
SSA initialization is performed → Root key value is set from GCSTBRT-KEY AND SSA type is changed to unqualified - [Set Root Key Value]
SSA initialization is performed → Root key value is set from GCSTBRT-KEY AND SSA type is set to unqualified - [Is SSA Type Qualified?]
If the SSA flag type → The system determines if the SSA type is qualified or not - [Is Unqualified Flag Set?]
The system checks the unqualified SSA flag status → The system determines if the unqualified flag is set (not space) or not set (space) - [Set Root Key Value, Set Dependent Key Value, Keep Qualified SSA Type]
The system configures the SSA parameters → The system sets both root key value and dependent key value while maintaining qualified SSA type - [Set Root Key Value Only, Change to Unqualified SSA Type]
The system configures the SSA parameters → The system sets only the root key value and changes the SSA type to unqualified - [Is SSA Type Unqualified?]
If the SSA flag type → The system determines if the SSA type is unqualified - [Set Root Key Value, Force Unqualified SSA Type]
The system configures the SSA parameters → The system sets the root key value and forces the SSA type to unqualified - [Route to Primary PCB]
The second PCB flag is spaces (not set) → The system routes the request to primary PCB processing (B310-ACCESS-ROOT-PCB1) - [Route to Secondary PCB]
The second PCB flag is not spaces (is set) → The system routes the request to secondary PCB processing (B320-ACCESS-ROOT-PCB2) - [Execute Database Call with Qualified SSA]
The database call is executed for root segment using primary PCB → The system calls the database interface with qualified root segment search arguments to retrieve specific records - [Execute Database Call with Unqualified SSA]
The database call is executed for root segment using primary PCB → The system calls the database interface with unqualified root segment search arguments to retrieve records without specific criteria - [Execute Database Call without SSA]
The database call is executed for root segment using primary PCB → The system calls the database interface without any segment search arguments - [SSA Type Check]
The SSA type needs to be determined for the database operation → The system checks the WS-SSA-FLAG to determine whether to use qualified SSA, unqualified SSA, or no SSA for the database call - [Execute Database Call with Qualified SSA]
A database operation is requested on the root segment → Execute database call using secondary PCB with qualified root segment search arguments - [Execute Database Call with Unqualified SSA]
A database operation is requested on the root segment → Execute database call using secondary PCB with unqualified root segment search arguments - [Execute Database Call with No SSA]
A database operation is requested on the root segment → Execute database call using secondary PCB without any search arguments - [Execute Database Call with Qualified SSA]
A database operation is requested for dependent segment access → The system calls the database interface with the secondary PCB, user function code, segment data, and both qualified root and dependent SSA parameters - [Execute Database Call with Unqualified SSA]
A database operation is requested for dependent segment access → The system calls the database interface with the secondary PCB, user function code, segment data, qualified root SSA, and unqualified dependent SSA parameters - [Execute Database Call with No SSA]
A database operation is requested for dependent segment access → The system calls the database interface with only the secondary PCB, user function code, and segment data parameters - [Check PCB Selection Flag]
The system checks the second PCB flag status → If the second PCB flag is spaces (not set), route to primary PCB processing, otherwise route to secondary PCB processing - [Route to Primary PCB]
The system routes the operation → The operation is directed to the primary PCB dependent segment processing routine - [Route to Secondary PCB]
The system routes the operation → The operation is directed to the secondary PCB dependent segment processing routine - [Execute Dependent Segment Operation via Primary PCB]
The system executes the database operation → Call the database interface with primary PCB, function code, segment data, qualified root SSA, and qualified dependent SSA - [Execute Dependent Segment Operation via Primary PCB]
The system executes the database operation → Call the database interface with primary PCB, function code, segment data, qualified root SSA, and unqualified dependent SSA - [Execute Dependent Segment Operation via Primary PCB]
The system executes the database operation → Call the database interface with primary PCB, function code, and segment data only - [Execute Dependent Segment Operation via Secondary PCB]
The system executes the database operation → Call the database interface with secondary PCB, function code, segment data, qualified root SSA, and qualified dependent SSA - [Execute Dependent Segment Operation via Secondary PCB]
The system executes the database operation → Call the database interface with secondary PCB, function code, segment data, qualified root SSA, and unqualified dependent SSA - [Execute Dependent Segment Operation via Secondary PCB]
The system executes the database operation → Call the database interface with secondary PCB, function code, and segment data only - [Check Operation Status]
The system checks the operation status code → If the status code is spaces, set return flag to successful, otherwise set return flag to unsuccessful - [Execute Database Call with Qualified SSA - Root Segment SSA - Dependent Segment SSA]
The database call is executed → The system calls the database interface with the function code, primary PCB, segment data, root segment qualified SSA, and dependent segment qualified SSA - [Execute Database Call with Unqualified SSA - Root Segment SSA - Unqualified Dependent SSA]
The database call is executed → The system calls the database interface with the function code, primary PCB, segment data, root segment qualified SSA, and dependent segment unqualified SSA - [Execute Database Call with No SSA - No SSA Parameters]
The database call is executed → The system calls the database interface with only the function code, primary PCB, and segment data without any SSA parameters - [SSA Type?]
The system checks the SSA flag value → The system routes to qualified SSA call if flag equals qualified SSA, routes to unqualified SSA call if flag equals unqualified SSA, or routes to no SSA call for any other value - [Execute Database Call with Qualified SSA]
The system determines the SSA type for database call execution → The system calls the database interface with both root segment qualified SSA and dependent segment qualified SSA parameters - [Execute Database Call with Unqualified SSA]
The system determines the SSA type for database call execution → The system calls the database interface with root segment qualified SSA and dependent segment unqualified SSA parameters - [Execute Database Call with No SSA]
The system determines the SSA type for database call execution → The system calls the database interface without any SSA parameters, using only basic operation parameters - [Execute Database Call with Qualified SSA]
The database call is executed for dependent segment access → The system calls the database interface with secondary PCB, function code, segment data, root segment SSA, and dependent segment SSA - [Execute Database Call with Unqualified SSA]
The database call is executed for dependent segment access → The system calls the database interface with secondary PCB, function code, segment data, root segment SSA, and dependent segment unqualified SSA - [Execute Database Call with No SSA]
The database call is executed for dependent segment access → The system calls the database interface with secondary PCB, function code, and segment data only - [Execute Database Call with Qualified SSA]
Database call is executed for dependent segment operation → System calls CIMS with user function code, secondary PCB, segment data, root qualified SSA, and dependent qualified SSA - [Execute Database Call with Unqualified SSA]
Database call is executed for dependent segment operation → System calls CIMS with user function code, secondary PCB, segment data, root qualified SSA, and dependent unqualified SSA - [Execute Database Call with No SSA]
Database call is executed for dependent segment operation → System calls CIMS with user function code, secondary PCB, and segment data only
Structural Validations
- [Is Segment GCSTBDP?]
The system checks the segment type → The system identifies whether it is a dependent segment (GCSTBDP-KEY-NAME) or not - [Invalid Segment - Set Error Flag]
The system processes the segment → The system sets the return flag to indicate an invalid segment error