Configuring Customized MX Java Rules

You can configure customized MX Java rules for the plug-in to support additional MX message type schemas.

Procedure

  1. Open a code writing software to write the Java code. See MX Java Rule Code Example for more information.
    Note: When writing an MX Java rule code:
    • You have to extend the MXValidationRule Java class and override the eval() method.
    • The Java class name must be the same as the rule name in the SWIFT Standard MX file.
    • The Java rule code depends on the dom4j-2.1.3.jar file and the com.tibco.bw.palette.swift.common_6.x.x.0xx.jar file, which are located in the TIBCO_HOME/bw/palettes/swift/version_number/tools/lib and TIBCO_HOME/bw/palettes/swift/version_number/runtime/plugins directory.
  2. After writing the Java code, export the Java code to a JAR file and save it to the TIBCO_HOME/bw/palettes/swift/version_number/lib directory.
  3. Add a customized MX message type to the KnownMessages.xml file, which is located in the TIBCO_HOME/bw/palettes/swift/version_number/bin/mxdata/year directory.
  4. Configure a customized MX message rule in a specific XML file in the TIBCO_HOME/bw/palettes/swift/version_number/bin/mxdata/year directory based on the message type.
    Note: The prefix of the MX message type name in an MX message rule must be the same as the suffix of a specific XML file in the TIBCO_HOME/bw/palettes/swift/version_number/bin/mxdata/year directory.

    For example,

    • The semt.021.001.07 MX message rule must be configured in the MXsemt.xml file, which is located in the TIBCO_HOME/bw/palettes/swift/6.7/bin/mxdata/2021 directory.
    • The pacs.003.001.09 MX message rule must be configured in the MXpacs.xml file, which is located in the TIBCO_HOME/bw/palettes/swift/6.7/bin/mxdata/2021 directory.
    • The acmt.001.001.08 MX message rule must be configured in the MXacmt.xml file, which is located in the TIBCO_HOME/bw/palettes/swift/6.7/bin/mxdata/2021 directory.

    For detailed information about an example of the MX message rule, see MX Message Rule Example.

  5. Restart TIBCO Business Studio.

Result

The customized MX Java rule becomes available, and the plug-in supports the corresponding MX message.