ICRF
Purpose¶
For use with EDI systems to identify message envelopes.
Methods¶
Binding name: p6.icrf
getNextISA¶
Increments the named X.12 Interchange Control Reference returning its new value.
Syntax
int p6.icrf.getNextISA(String name)
Info
If the named reference is not found then it will be created automatically.
Example
// Get the next X.12 interchange control number for ACME partner
def isaRef = p6.icrf.getNextISA('ACME-CORP-X12')
p6.log.debug 'Next ISA control number: ' + isaRef
getNextISAStr¶
Increments the named X.12 Interchange Control Reference returning its new value as a zero padded string.
Syntax
String p6.icrf.getNextISAStr(String name)
Info
If the named reference is not found then it will be created automatically.
Example
// Get zero-padded ISA reference for X.12 envelope header
def isaStr = p6.icrf.getNextISAStr('ACME-CORP-X12')
p6.log.debug 'ISA control number: ' + isaStr
// Output: 000000042
getNextUNB¶
Increments the named EDIFACT Interchange Control Reference returning its new value.
Syntax
long p6.icrf.getNextUNB(String name)
Info
If the named reference is not found then it will be created automatically.
Example
// Get the next EDIFACT interchange control reference for a partner
def unbRef = p6.icrf.getNextUNB('GLOBALTRADE-EDIFACT')
p6.log.debug 'Next UNB reference: ' + unbRef
getNextUNBStr¶
Increments the named EDIFACT Interchange Control Reference returning its new value as a zero padded string.
Syntax
String p6.icrf.getNextUNBStr(String name)
Info
If the named reference is not found then it will be created automatically.
Tip
The minimum value of a named ICRF is 1 and the maximum is 999999999 (X.12) or 99999999999999 (EDIFACT).
Example
// Get zero-padded UNB reference for EDIFACT envelope
def unbStr = p6.icrf.getNextUNBStr('GLOBALTRADE-EDIFACT')
p6.log.debug 'UNB reference: ' + unbStr
// Output: 00000000000042
Monitoring¶
The ICRF manager is implemented as a JMX MBean.
A JMX Console like Hawtio or Jconsole may be used for finer control of ICRF values.
Info
ICRF values are persisted so preserving their values beyond a restart.