StepMessage

更新时间:
复制 MD 格式

Introduction

An engine defines the data structure of messages passed between nodes in an integration flow.

Coordinate: com.alibaba.bwif.script.core.StepMessage

Structure

Property

Type

Description

id

String

The unique ID of a message. The input and output messages for each node have different IDs.

attribute

Map

  • Purpose: Stores the specific configuration values of the node for the current runtime.

  • Retrieve content: Use getAttribute() in a script to retrieve the content.

  • Modify content: The DPI engine automatically assigns a value after the node executes successfully. Developers cannot assign values to this property.

payload

Object

  • Purpose: The message content. For example, for the output message of an HTTP request node, the payload is the HTTP Response from the peer application. Different types of nodes produce different types of payloads. For more information, see the documentation for each node.

  • Retrieve content: Use getPayload() in a script to retrieve the content.

  • Modify content: The DPI engine automatically assigns a value after the node executes successfully. You cannot assign a value to the payload in a script. The payload can only be modified using a set payload node.

variable

Map

  • Purpose: A variable. Used to stage intermediate values as a message passes through the stream.

  • Retrieve content: Use getVariable() in a script to retrieve the content.

  • Modify content: Developers specify variables in the stream designer. You must use set variable or delete variable nodes to manage them. Some nodes, such as the traverse node, also use variables during execution. For more information, see the documentation for the specific node. You cannot modify or delete variable content in a script.

error

StepException

Stores the error message.

Construction

Only the integration stream engine can construct this object. You cannot construct it in a script.

Method list

Method

Description

String getTrackId()

The ID for a single stream run. It corresponds to the TraceID in the debugger and the operational log.

String getId()

The unique ID for a message at a specific node. The ID changes each time the message passes through a processing node.

Object getPayload()

Gets the payload. The returned object is of type Object and must be cast to the appropriate type. For example: HttpRequest request = (HttpRequest) message.getPayload();.

Map getVariable()

The variable's data type is Map.

Map getAttribute()

The configuration properties of the node. This includes the node's configuration information and the parameters for any configured connectors.

StepException getError()

The error message passed down from the previous node. For more information, see com.alibaba.bwif.script.core.StepException.