SCADAInput node

This topic contains the following sections:

Purpose

Use the SCADAInput node to receive messages from clients that connect to the broker across the WebSphere MQ Telemetry Transport. SCADA device clients use the MQIsdp protocol to send messages, which are converted by the SCADAInput node into a format recognized by WebSphere Message Broker. The node also establishes the processing environment for these messages.

Message flows that handle messages received from SCADA devices must always start with a SCADAInput node. Set the SCADAInput node's properties to control the way that messages are received: for example, you can indicate that a message is to be processed under transaction control.

When you deploy message flows containing SCADA nodes to a broker, you must deploy them to a single execution group, regardless of the number of message flows.

Because SCADA is primarily publish/subscribe, you typically include a Publication node to terminate the flow. In scenarios where you do not want a Publication node, you can include a SCADAOutput node. If you do so, you must also include a SCADAInput node regardless of the source of the messages, because the SCADAInput node provides the connectivity information required by the SCADAOutput node.

If you include an output node in a message flow that starts with a SCADAInput node, it can be any of the supported output nodes, including user-defined output nodes. You can create a message flow that receives messages from SCADA devices and generates messages for clients that use all supported transports to connect to the broker, because you can configure the message flow to request the broker to provide any necessary conversion.

You can request that the broker start or stop a SCADA listener by publishing messages with a specific topic. This can be done for all ports or for a single port identified in the message.

The SCADAInput node handles messages in the following message domains:

  • MRM
  • XML
  • XMLNS
  • XMLNSC
  • JMSMap
  • JMSStream
  • MIME
  • BLOB
  • IDOC

You cannot use SCADAInput nodes in message flows that are to be deployed on z/OS systems.

If you want to process the data in an incoming SCADA message, include a node like the ResetContentDescriptor node and set its properties to force the bit stream to be re-parsed by a subsequent node.

If you create a message flow to use as a subflow, you cannot use a standard input node, you must use an instance of the Input node as the first node to create an in terminal for the subflow.

If your message flow does not receive messages across SCADA connections, you can choose one of the supported input nodes.

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

SCADAInput node icon

Using this node in a message flow

For an example of how to use this node, assume that you create a message flow with a SCADAInput node that receives messages from a remote sensor when it detects a change in its operating environment (for example, a drop in outside temperature). You connect the node to an MQOutput node that makes these messages available on a queue serviced by a WebSphere MQ application that analyses and responds to the information received.

In a second example, you create a message flow with a SCADAInput node that receives messages each minute from a remote system. The messages contain details of the system's switch settings. The data received is fed into a ResetContentDescriptor node to cast the data from binary (BLOB) to MRM message format. The information about the system is stored in a database using the Database node, and enriched using a Compute node to create an XML message, which is published using a Publication node.

Because XML messages are expensive to send (because satellite transmission has a high cost for each byte), it is advantageous to use this method because data is enriched by the broker.

Configuring the SCADAInput node

When you have put an instance of the SCADAInput 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 in the properties dialog.

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 SCADAInput node as follows:

  1. Set the following basic properties:
    1. The Enable listener on startup check box is initially selected. This means that the listener for MQIsdp clients is initialized when the message flow is deployed.

      You can update the status of the listener by publishing on the control topic $SYS/SCADA/MQIsdpListener/<port_number> with the Payload part of the message set to ON or OFF.

    2. Specify the Port number on which the MQIsdp server is to listen. This must be a unique port, and must not conflict with other listeners (for example, those set up for WebSphere MQ or WebSphere MQ Everyplace). The default number is 1883.
    3. Set the Max Threads value to indicate the maximum number of threads available to the MQIsdp server to support clients. The default value is 500.

      If you are using DB2 for your broker database, you must specify a value that is less than or equal to the value that you have set for the DB2 configuration parameters maxappls and maxagents. See Connecting to the databases for further information.

    4. Select Use Thread Pooling if you want the node to use a pool of threads to service clients. If you select this option, the number of threads available to the MQIsdp server is limited by Max Threads, which you are recommended to set to a value of between 20 and 40. If you do not select this option, a new thread is created for each client that connects. The check box is initially clear.

      Use this option only if you expect a large number of clients (greater than 200) to connect.

  2. Select Default in the properties dialog navigator and set values for the properties that describe the message domain, message set, message type, and message format that the node uses to determine how to parse the incoming message, and the default topic associated with the message.
    • If the incoming message has an MQRFH2 header, you do not have to set values for the Default properties because the values can be derived from the <mcd> folder in the MQRFH2 header. For example:
      <mcd><Msd>MRM</Msd><Set>DHM4UO906S001</Set><Type>receiptmsg1</Type>
      <Fmt>XML</Fmt></mcd>

      If you set values, and those values differ from those in the MQRFH2 header, the MQRFH2 header values take precedence.

    • In Message Domain, select the name of the parser that you are using from the drop-down list. You can choose from the following names:
      • MRM
      • XML
      • XMLNS
      • XMLNSC
      • JMSMap
      • JMSStream
      • MIME
      • BLOB
      • IDOC
    • If you are using the MRM or IDOC parser, select the correct message set from the drop-down list in Message Set. This list is populated with available message sets when you select MRM or IDOC as the domain.

      Leave Message Set blank for XML, XMLNS, XMLNSC, JMS, MIME, and BLOB parsers.

    • If you are using the MRM parser, select the correct message from the drop-down list in Message Type. This list is populated with messages that are defined in the message set that you have selected.

      Leave Message Type blank for XML, XMLNS, XMLNSC, JMS, MIME, BLOB, and IDOC parsers.

    • If you are using the MRM or IDOC parser, select the format of the message from the drop-down list in Message Format. This list includes all the physical formats that you have defined for this message set.

      Leave Message Format blank for XML, XMLNS, XMLNSC, JMS, MIME, and BLOB parsers.

  3. Select Advanced in the properties dialog navigator and set the required value for Transaction Mode to define the transactional characteristics of how this message is handled:
    • If you select Automatic, the incoming message is received under syncpoint if it is marked persistent, otherwise it is not. The transactionality of any derived messages subsequently sent by an output node is determined by the incoming persistence property, unless the output node has explicitly overridden transactionality.
    • If you select Yes, the incoming message is received under syncpoint. Any derived messages subsequently sent by an output node in the same instance of the message flow are sent transactionally, unless the output node has explicitly overridden transactionality.
    • If you select No, the incoming message is not received under syncpoint. Any derived messages subsequently sent by an output node in the flow are sent non-transactionally, unless the output node has specified that the message should be put under syncpoint.
  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 General Message Options in the properties dialog navigator. Parse Timing is, by default, set to On Demand. This causes validation to be delayed until it is parsed by partial parsing. If you change this to Immediate, partial parsing is overridden and everything in the message is parsed and validated, except those complex types with a Composition of Choice or Message that cannot be resolved at the time. If you change this to Complete, partial parsing is overridden and everything in the message is parsed and validated; complex types with a Composition of Choice or Message that cannot be resolved at the time cause a validation failure.
  6. Select Description in the properties dialog navigator to enter a short description, a long description, or both.
  7. Click Apply to make the changes to the SCADAInput 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.

Connecting the terminals

SCADAInput routes each message that it retrieves successfully to the out terminal. If this fails, the message is propagated to the failure terminal; you can connect nodes to this terminal to handle this condition. If you have not connected the failure terminal, the message loops continually through the node until the problem is resolved.

If the message is caught by this node after an exception has been thrown further on in the message flow, the message is routed to the catch terminal. If you have not connected the catch terminal, the message loops continually through the node until the problem is resolved. Ensure that a node is always connected to this terminal if there is the possibility of the message rolling back within a message flow.

Configuring for coordinated transactions

When you include a SCADAInput node in a message flow, the value that you set for Transaction Mode defines whether messages are received under syncpoint:

  • If you set it to Yes (the default), the message is received under syncpoint (that is, within a WebSphere MQ unit of work). Any messages subsequently sent by an output node in the same instance of the message flow are put under syncpoint, unless the output node has explicitly overridden this.
  • If you set it to Automatic, the message is received under syncpoint if the incoming message is marked persistent. Otherwise, it is not. Any message subsequently sent by an output node is put under syncpoint, as determined by the incoming persistence property, unless the output node has explicitly overridden this.
  • If you set it to No, the message is not received under syncpoint. Any messages subsequently sent by an output node in the flow are not put under syncpoint, unless an individual output node has specified that the message should be put under syncpoint.

(The MQOutput node is the only output node that you can configure to override this option.)

Terminals and properties

The SCADAInput node terminals are described in the following table.

Terminal Description
Failure The output terminal to which the message is routed if an error occurs.
Out The output terminal to which the message is routed if it is successfully retrieved from the queue.
Catch The output terminal to which the message is routed if an exception is thrown downstream and caught by this node.

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 SCADAInput node Basic properties are described in the following table.

Property M C Default Description
Enable listener on startup Yes No Selected When the listener is started. If you select the check box, the listener starts when the message flow is started by the broker. If you clear the check box, the listener starts on the arrival of a message on the specified port.
Port Yes Yes 1883 The port on which the SCADA protocol is listening.
Max Threads Yes Yes 500 The maximum number of threads to be started to support SCADA devices.
Use Thread Pooling Yes Yes Cleared Whether to use thread pooling. If you select the check box, this action is performed.

The SCADAInput node Default properties are described in the following table.

Property M C Default Description
Message Domain No No   The domain that will be used to parse the incoming message.
Message Set No No   The name or identifier of the message set in which the incoming message is defined.
Message Type No No   The name of the incoming message.
Message Format No No   The name of the physical format of the incoming message.

The SCADAInput node Advanced property are described in the following table.

Property M C Default Description
Transaction Mode Yes No Yes Whether the incoming message is received under syncpoint. Valid values are Automatic, Yes, and No.

The Validation properties of the SCADAInput 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 and Value, and Content.
Failure Action Yes No Exception What happens if validation fails. You can set this property only if you set Validate to Content or Content and Value. 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.

The properties of the General Message Options for the SCADAInput 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 properties of the XMLNSC Parser Options for the SCADAInput 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 Description properties of the SCADAInput node 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.