ResetContentDescriptor node

This topic contains the following sections:

Purpose

Use the ResetContentDescriptor node to request that the message is reparsed by a different parser. If the new parser is MRM, you can also specify a different message template (message set, type, and format). This node does not reparse the message, but the properties that you set for this node determine how the message is parsed when it is next reparsed by the message flow.

The node associates the new parser information with the input message bit stream. If the message has already been parsed to create a message tree, and the contents of the tree have been modified (for example, by a Compute node), the ResetContentDescriptor node must invoke the current parser associated with the message to parse the message and recreate the bit stream.

If your message flow has updated the message before it is received by the ResetContentDescriptor node, you must ensure that the changed message contents are still valid for the current parser. If this is not the case, the parser generates an error when it attempts to recreate the bit stream from the message tree, and the ResetContentDescriptor node raises an exception. For example, if you have added a new field to a message in the MRM domain, and the field is not present in the model, the recreation of the bit stream fails.

The ResetContentDescriptor node does not:

  • Change the message content. It changes message properties to specify the way in which the bit stream is parsed next time that the parser is invoked.
  • Convert the message from one format to another. For example, if the incoming message has a Message Format of XML and the outgoing Message Format is CWF, the ResetContentDescriptor node does not do any reformatting. It invokes the parser to recreate the bit stream of the incoming XML message, which retains the XML tags in the message. When the message is reparsed by a subsequent node, the XML tags are invalid and the reparse fails.

The ResetContentDescriptor node is represented in the workbench by the following icon:

ResetContentDescriptor node icon

Using this node in a message flow

For an example of how to use this node, assume that you want to swap between the BLOB and the MRM domains. The format of an incoming message might be unknown when it enters a message flow, so the BLOB parser is invoked. Later on in the message flow, you might decide that the message is predefined as a message in the MRM domain, and you can use the ResetContentDescriptor node to set the correct values to use when the message is parsed by a subsequent node in the message flow.

The following table shows typical ResetContentDescriptor node properties.

Property Value
Message Domain MRM
Reset Message Domain Selected
Message Set DH53CU406U001
Reset Message Set Selected
Message Type m_MESSAGE1
Reset Message Type Selected
Message Format CWF
Reset Message Format Selected

The Message Domain is set to MRM, and the MRM parser is invoked when the message is next parsed. The message set, type, and format are the message template values that define the message model, and all the reset check boxes are selected because all the properties need to change.

The ResetContentDescriptor node causes the BLOB parser associated with the input message to construct the physical bit stream of the message (not the logical tree representation of it) which is later passed to the MRM parser. The MRM parser then parses the bit stream using the message template (Message Set, Message Type, and Message Format) specified in this ResetContentDescriptor node.

Configuring the ResetContentDescriptor node

When you have put an instance of the ResetContentDescriptor node into a message flow, you can configure it. Right-click the node in the editor view and click Properties. The node's basic properties are displayed.

All mandatory properties for which you must enter a value (those that do not have a default value defined) are marked with an asterisk on the properties dialog.

Configure the ResetContentDescriptor node as follows:

  1. If you want a different parser associated with the message, specify the new domain In Message Domain:
    • MRM
    • XML
    • JMSMap
    • JMSStream
    • MIME
    • BLOB

    You can also specify a user-defined parser if appropriate.

    Select the Reset Message Domain check box.

  2. If the MRM parser is to reparse the message, specify the other properties of the model that are to be associated with the input message, and select the Reset... check box beneath each field. If the MRM parser is already associated with the input message, you have to specify only the properties that are to change.
    1. Enter the message set in Message Set. Choose a value from the drop-down list of available message sets (the name and identifier of the message set are shown).
    2. Enter the identifier of the message in Message Type. You can find this identifier in the properties of the message in the editor view. You specified the message identifier when you created the message. Enter the identifier exactly as shown in the message properties.
    3. Enter the format of the message in Message Format. This specifies the wire format for the MRM parser. You can select one of the formats from the drop-down list (which lists the identifiers of those formats that you have defined on the message set specified above).

    These properties set the domain, set, type, and format that you want in the message header of the message that you want to pass through the ResetContentDescriptor node. However, this only happens if suitable headers already exist. If the message does not have an MQRFH2 header, the node does not create one.

  3. Leave Message Set, Message Type, and Message Format blank if you have specified the XML, JMS, MIME, or BLOB parser.
  4. Select Validation in the properties dialog navigator if you want the MRM parser to validate the body of messages against the dictionary generated from the message set. (If a message is propagated to the failure terminal of the node, it is not validated.)

    For more details refer to Validating messages and Validation properties for messages in the MRM domain.

  5. Select Description in the properties dialog navigator to enter a short description, a long description, or both.
  6. Click Apply to make the changes to the ResetContentDescriptor node without closing the properties dialog. Click OK to apply the changes and close the properties dialog.

    Click Cancel to close the dialog and discard all the changes that you have made to the properties.

Terminals and properties

The ResetContentDescriptor node terminals are described in the following table.

Terminal Description
In The input terminal that accepts a message for processing by the node.
Failure The output terminal to which the message is routed if an error is detected by the node.
Out The output terminal to which the message is routed if a new parser is identified by the properties.

The following tables describe the node properties; the column headed M indicates whether the property is mandatory (marked with an asterisk on the properties dialog if you must enter a value when no default is defined), the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the bar file to deploy it).

The ResetContentDescriptor node Basic properties are described in the following table.

Property M C Default Description
Message Domain No No   The message domain associated with the message that you want to reparse.
Reset Message Domain Yes No Cleared Whether to reset the message domain. If you select the check box, this action is performed.
Message Set No No   The message set associated with the message that you want to reparse.
Reset Message Set Yes No Cleared Whether to reset the message set. If you select the check box, this action is performed.
Message Type No No   The message type associated with the message that you want to reparse.
Reset Message Type Yes No Cleared Whether to reset the message type. If you select the check box, this action is performed.
Message Format No No   The message format associated with the message that you want to reparse.
Reset Message Format Yes No Cleared Whether to reset the message format. If you select the check box, this action is performed.

The Validation properties of the ResetContentDescriptor node are described in the following table. Refer to Validation properties for messages in the MRM domain for a full description of these properties.

Property M C Default Description
Validate Yes Yes None Whether validation takes place. Valid values are None, Content, Content and Value, and Inherit.
Failure Action Yes No Exception What happens if validation fails. You can set this property only if you set Validate to Content and Value or Content. Valid values are User Trace, Local Error Log, Exception, and Exception List.
Include All Value Constraints Yes No Selected This property cannot be edited. The default action, indicated by the check box being selected, is that basic value constraint checks are included in Content and Value validation.
Fix Yes No None This property cannot be edited. Valid values are None, and Full.

The properties of the General Message Options for the ResetContentDescriptor node are described in the following table.

Property M C Default Description
Parse Timing Yes No On Demand This property controls when an input message is parsed. Valid values are On Demand, Immediate, and Complete.

Refer to Parsing on demand for a full description of this property.

Use MQRFH2C Compact Parser for MQRFH2 Domain No No False This property controls whether the MQRFH2C Compact Parser, instead of the MQRFH2 parser, is used for MQRFH2 headers.

The XMLNSC parser options for the ResetContentDescriptor node are described in the following table.

Property M C Default Description
Use XMLNSC Compact Parser for XMLNS Domain Yes Cleared No Start of changeThis property gives you control over whether the XMLNSC Compact Parser is used for messages in the XMLNS Domain. Note that if you set this property, the message data will appear under XMLNSC in nodes that are connected to the output terminal when the input RFH2 header or Default properties Domain is XMLNS.End of change
Mixed Content Retain Mode Yes No None This property controls whether the XMLNSC parser creates elements in the message tree when it encounters mixed text in an input message. Valid values are None and All. Selecting All means that elements are created for mixed text. Selecting None means that mixed text is ignored and no elements are created.
Comments Retain Mode Yes No None This property controls whether the XMLNSC parser creates elements in the message tree when it encounters comments in an input message. Valid values are None and All. Selecting All means that elements are created for comments. Selecting None means that comments are ignored and no elements are created.
Processing Instructions Retain Mode Yes No None This property controls whether the XMLNSC parser creates elements in the message tree when it encounters processing instructions in an input message. Valid values are None and All. Selecting All means that elements are created for processing instructions. Selecting None means that processing instructions are ignored and no elements are created.

The ResetContentDescriptor node Description properties are described in the following table.

Property M C Default Description
Short Description No No   A brief description of the node.
Long Description No No   Text that describes the purpose of the node in the message flow.