Ens.X12.FunctionSet
class Ens.X12.FunctionSet extends Ens.Rule.FunctionSet
Utility functions for creating X12 DocumentsMethod Inventory
- X12BatchErrors()
- X12BatchReply()
- X12BatchSuccesses()
- X12CompleteTrailerAndReturnClear()
- X12NewFunctionalGroup()
- X12NewTransactionSet()
- X12SaveDocumentAndReturnClear()
- X12ValidateDocument()
Methods
ValidationLevel is either the SNIP level or the validation flags to use.
The X12Document must have a Document Type set first in order to perform validation. BatchReplyType is string indicating what kind of batch reply should we construct for an Interchange batch we have received Note that all the options here that relate to TA1 segments are used to force a TA1 segment to be generated, often as the only body segment of the reply interchange. This is used to represent the presence or absence of errors in the whole inbound Interchange. However if an error is found in the incoming ISA or IEA that can only be reported in a TA1 segment, then a TA1 will be generated even if the configured setting does not force a TA1 to appear.
- All : Generate a reply Interchange containing a reply notification for every TransactionSet in the Interchange we received
- All+TA1 : Generate a reply Interchange containing a TA1 segment that indicates acceptance or error status for the whole Interchange, and a reply notification for every TransactionSet in the Interchange we received
- All+ISA14TA1 : Generate a reply Interchange containing a TA1 segment only if either a 1 appears in field ISA:14 of the ISA header segment or if there is an error at the Interchange level. If no error at the Interchange level, then send a reply for each Transaction Set we received.
- Errors : Generate a reply Interchange containing reply notifications only for TransactionSets in which errors are detected, or an empty Interchange if no error is found
- OnlyIfErrors : Only if errors are found, generate a reply Interchange containing reply notifications only for TransactionSets in which errors are detected
- Successes : Generate a reply Interchange containing reply notifications only for TransactionSets in which no errors are detected, or an empty Interchange if only errors are found
- TA1 : Generate a reply Interchange containing only a TA1 segment that indicates acceptance or error status for the whole Interchange we received
- OnlyIfErrorTA1 : Only if errors are found, generate a reply Interchange containing only a TA1 segment that indicates error status for the whole Interchange we received
- ISA14-TA1 : Generate a reply Interchange containing only a TA1 segment if a 1 appears in field ISA:14 of the ISA header segment of the incoming Interchange; otherwise return nothing.
- ISA14-OnlyIfErrorTA1 : Only if errors are found and field ISA:14 of the incoming ISA header segment is set to 1, generate a reply Interchange containing only an error TA1 segment; otherwise return nothing.
ValidationType can be either SNIP or Flags.
ValidationLevel is either the SNIP level or the validation flags to use.
BatchErrorAction is a string indicating what to do when detecting a validation error in a batch Interchange document:
- Reject With All Errors : Reject the whole batch if any error is found in any document within it. Enumerate all errors found if BatchReplyType allows for reporting them. This will prevent forwarding any documents in a batch until all have been read and validated.
- Accept With Errors : Accept documents with errors, but do take note of all errors found if BatchReplyType allows for reporting them. This will prevent forwarding any documents in a batch until all have been read and validated.
- Reject On First Error : Reject the whole batch when the first error is found in any document within it. Don't bother checking for more errors or parsing any further contents of the Interchange. This will prevent forwarding any documents in a batch until all have been read and validated.
- Reject Individual Errors : Reject only those documents within the Interchange that have errors. Forward each acceptable child document to the target config item(s) as soon as it has been read and validated.
LocalApplicationID is colon-separated Local ID:Qualifier codes representing this (receiving) facility and application
These are used in constructing reply document headers.
The '@' symbol represents using the corresponding field from the incoming message.
If your ID must contain a literal @ symbol, escape it with backslash: '\@'
ValidationLevel is either the SNIP level or the validation flags to use.
If the optional Save is true (the default is false) then the X12Document will be saved.
The method returns the empty string allowing the unloading of an object via assignment.
If an Error is encountered it will be thrown.
The separators will be taken from the InterchangeParent.
The Document Category will be taken from InterchangeParent unless specified in optional Doctype
The Document Name will be taken from Doctype if given otherwise it will be FunctionalGroup
The optional Doctype may specify just a document name and does not need to include the Document category as that can be taken from the InterchangeParent.
The new document will be set as a batch child of InterchangeParent
The document will have a TransactionSet place holder segment.
If ForceNewPlaceHolderInParent is true (the default is false) then a new GroupDocsRef place holder segment will be made in the InterchangeParent
If an Error is encountered it will be thrown.
The separators will be taken from the GroupParent.
The Document Category will be taken from GroupParent unless specified in Doctype
The Document Name will be taken from Doctype
The Doctype may specify just a document name and does not need to include the Document category as that can be taken from the GroupParent.
The new document will be set as a batch child of GroupParent
If ForceNewPlaceHolderInParent is true (the default is false) then a new TransactionSetDocsRef place holder segment will be made in the GroupParent
If an Error is encountered it will be thrown.
The method returns the empty string allowing the unloading of an object via assignment.
If an Error is encountered it will be thrown.
ValidationLevel is either the SNIP level or the validation flags to use.
Inherited Members
Inherited Methods
- Contains()
- ConvertDateTime()
- CurrentDateTime()
- DoesNotContain()
- DoesNotIntersectList()
- DoesNotMatch()
- DoesNotStartWith()
- Exists()
- If()
- In()
- InFile()
- InFileColumn()
- IntersectsList()
- Length()
- Like()
- Lookup()
- Matches()
- Max()
- Min()
- Not()
- NotIn()
- NotInFile()
- NotLike()
- Pad()
- Piece()
- RegexMatch()
- ReplaceStr()
- Round()
- Rule()
- Schedule()
- StartsWith()
- Strip()
- SubString()
- ToLower()
- ToUpper()
- Translate()
- replace()