👨💻 Technical ACs (Gherkin)
Context: A log dependent segment needs to be created
GIVEN
A log dependent segment needs to be created
Applied to: Initialize Dependent Segment
WHEN
The format log dependent process begins
THEN
The dependent segment structure is initialized to clear any previous data
Context: Input contains date and time information
GIVEN
Input contains date and time information
Applied to: Set Date and Time Information
WHEN
Formatting the log dependent segment
THEN
The date is moved to the dependent segment date field and time is moved to the dependent segment time field
Context: Date and time information is available
GIVEN
Date and time information is available
Applied to: Generate Unique Key from Date/Time
WHEN
Creating a log dependent segment
THEN
A unique key is computed as nines complement minus the combined date-time value and assigned to the dependent segment key
Context: Input contains action code, user ID, and sending transaction information
GIVEN
Input contains action code, user ID, and sending transaction information
Applied to: Set Action Code and User Information
WHEN
Formatting the log dependent segment
THEN
The action code is moved to dependent segment action code field, ACF2 ID is moved to user code field, and sending transaction is moved to transaction field
Context: Action code is 'MMR'
GIVEN
Action code is 'MMR'
Applied to: Format Manual Release Message - MMR
WHEN
Processing a manual release action
THEN
The input message is moved to MMR message info structure and then to the dependent segment message field
Context: Action code is 'ZZZ'
GIVEN
Action code is 'ZZZ'
Applied to: Format Direct Message - ZZZ
WHEN
Processing a direct message action
THEN
The input message is moved directly to the dependent segment message field without additional formatting
Context: Action code is 'CAT'
GIVEN
Action code is 'CAT'
Applied to: Format Cargo Added to Train - CAT
WHEN
Processing a cargo added to train action
THEN
The input message is moved to CAT message info structure and then to the dependent segment message field
Context: Action code is 'CDT'
GIVEN
Action code is 'CDT'
Applied to: Format Cargo Deleted from Train - CDT
WHEN
Processing a cargo deleted from train action
THEN
The input message is moved to CDT message info structure and then to the dependent segment message field
Context: Action code is 'CFR'
GIVEN
Action code is 'CFR'
Applied to: Format Cargo Print Faxing - CFR
WHEN
Processing a cargo print faxing action
THEN
The input message is moved to CFR message info structure and then to the dependent segment message field
Context: Action code is 'CPR'
GIVEN
Action code is 'CPR'
Applied to: Format Cargo Print Merlin ID - CPR
WHEN
Processing a cargo print Merlin ID action
THEN
The input message is moved to CPR message info structure and then to the dependent segment message field
Context: Action code is 'CPZ'
GIVEN
Action code is 'CPZ'
Applied to: Format Cargo Print Zebra - CPZ
WHEN
Processing a cargo print Zebra action
THEN
The input message is moved to CPZ message info structure and then to the dependent segment message field
Context: Action code is 'CTP'
GIVEN
Action code is 'CTP'
Applied to: Format Cargo Transfer Print - CTP
WHEN
Processing a cargo transfer print action
THEN
The input message is moved to CTP message info structure and then to the dependent segment message field
Context: Action code is 'RNO'
GIVEN
Action code is 'RNO'
Applied to: Format Cargo Renumber Old - RNO
WHEN
Processing a cargo renumber old action
THEN
The input message is moved to RNO message info structure and then to the dependent segment message field
Context: Action code is 'RNN'
GIVEN
Action code is 'RNN'
Applied to: Format Cargo Renumber New - RNN
WHEN
Processing a cargo renumber new action
THEN
The input message is moved to RNN message info structure and then to the dependent segment message field
Context: Action code is 'MC'
GIVEN
Action code is 'MC'
Applied to: Format Manual Cargo Change - MC
WHEN
Processing a manual cargo change action
THEN
The input message is moved to MC reason code field, bond type is moved to MC bond type field, and the complete MC message is moved to dependent segment message field
Context: Action code is 'TFF'
GIVEN
Action code is 'TFF'
Applied to: Format Transfer From - TFF
WHEN
Processing a transfer from action
THEN
The input message is moved to TFF message info structure and then to the dependent segment message field
Context: Action code is 'TFT'
GIVEN
Action code is 'TFT'
Applied to: Format Transfer To - TFT
WHEN
Processing a transfer to action
THEN
The input message is moved to TFT message info structure and then to the dependent segment message field
Context: Action code is 'MD'
GIVEN
Action code is 'MD'
Applied to: Format Manual Cargo Delete - MD
WHEN
Processing a manual cargo delete action
THEN
The input message is moved to MD reason code field, bond type is moved to MD bond type field, and the complete MD message is moved to dependent segment message field
Context: Action code is 'HNF'
GIVEN
Action code is 'HNF'
Applied to: Format Equipment Hold Not Found - HNF
WHEN
Processing an equipment hold not found action
THEN
The input message is moved to HNF message equipment ID field and the complete HNF message is moved to dependent segment message field
Context: Action code is 'HID'
GIVEN
Action code is 'HID'
Applied to: Format Equipment Hold ID - HID
WHEN
Processing an equipment hold ID action
THEN
The input message is moved to HID message equipment ID field and the complete HID message is moved to dependent segment message field
Context: Action code is 'RID'
GIVEN
Action code is 'RID'
Applied to: Format Equipment Release ID - RID
WHEN
Processing an equipment release ID action
THEN
The input message is moved to RID message equipment ID field and the complete RID message is moved to dependent segment message field
Context: Action code is 'SZI'
GIVEN
Action code is 'SZI'
Applied to: Format Equipment Seize ID - SZI
WHEN
Processing an equipment seize ID action
THEN
The input message is moved to SZI message equipment ID field and the complete SZI message is moved to dependent segment message field
Context: Action code is 'SZR'
GIVEN
Action code is 'SZR'
Applied to: Format Equipment Seize Release - SZR
WHEN
Processing an equipment seize release action
THEN
The input message is moved to SZR message equipment ID field and the complete SZR message is moved to dependent segment message field
Context: Action code does not match any predefined codes
GIVEN
Action code does not match any predefined codes
Applied to: Lookup Unknown Action Code in Table
WHEN
Processing an unknown action code
THEN
The system searches the log table for the action code and uses the corresponding message, or generates an error message with the unknown action code if not found
Context: Action code is 'CA' and bond type is not spaces
GIVEN
Action code is 'CA' and bond type is not spaces
Applied to: Lookup Unknown Action Code in Table
WHEN
Processing a cargo created automatically action with bond type
THEN
The message is formatted as 'CARGO CREATED AUTOMATICALLY TP:' concatenated with the bond type
Context: A log dependent segment is being formatted
GIVEN
A log dependent segment is being formatted
Applied to: Set Load Date and Time
WHEN
Completing the dependent segment formatting
THEN
The current machine date is moved to load date field and current machine time is moved to load time field