Jump to: navigation, search

Response Block

The Response block works with the <response> Action Element, an Orchestration Server extension, which can be used in SCXML code. For more information, see the Orchestration Server Developer’s Guide, Core Extensions, Web Services Interface, Action Elements, <response> Action Element.

Use the Responses block to send a response to a request-based event from an external application to the Orchestration Platform.

In summary, the Response block:

  • Waits for and responds to a particular request sent to Orchestration Server's HTTP interface.
  • Responds to a particular request that was received earlier and referenced by its _sendid.
  • Supports a timeout capability to transition out if no request is received within a specified time range.
  • Reads parameters from the request.
  • Specifies parameters in the response.

Name Property

Find this property's details under Common Properties for Workflow Blocks.

Block Notes Property

Find this property's details under Common Properties for Workflow Blocks.

Exceptions Property

This property provides the ability to define a set of exceptions handled by this block. Find more detail under Common Properties.

Condition Property

Find this property's details under Common Properties for Workflow Blocks.

Logging Details Property

Find this property's details under Common Properties for Workflow Blocks.

Log Level Property

Find this property's details under Common Properties for Workflow Blocks.

Event Property

Use this optional property to store the content of the request (JSON data) in a variable. Click the down arrow and select a variable. The default value is system.ANI set in the Entry block, Variables property.

Request ID Property

Use requestid to create an expression identifying the request to which the Response block is going to reply. Expression Builder will show _event.sendid representing the request that was received earlier. The default value is _event.sendid where _event is the last event received by this session.

Requests Property

When this property is specified, the Response block will block the application execution (or the parallel leg of the application it belongs to) until one of the specified events is received and the (optional) associated condition expression returns true. The Request ID Property should be assigned to its _event.sendid default value.

Parameters Property

Use this property to specify parameters and values for the response to the external request.

  1. Click the Parameters row in the block's property table.
  2. Click the OpenDialogBoxButton.gif button to open a dialog box and ExpressionBuilder for configuring the parameters and values for the response to the external request.

Result Property

Use the Result property to create a string which will represent the result code associated with the response to the external request. For more information see the Orchestration Server Developer's Guide, Action Elements, resultcode.

Type Property

Use the Type property to specify whether the response to the external request is positive or negative. For more information, see the Orchestration Server Developer's Guide, Action Elements, type.

Timeout Property

Use this property to select a variable containing a timeout value, which will be used to transition out if no request is received within a specified time range or keep the default of 30 (added starting with 8.1.440.18).

This property supports the following:

  • Literal integer value. For example: Timeout=4 & Unit=second <send event="'WaitEvent1.wait.timeout'" delay="'4s'"/>.
  • Variable with integer value. For example: Timeout=Variable(4) & Unit=second <send event="'WaitEvent1.wait.timeout'" delay="'4s'"/>.
  • Variable with string value. For example: Timeout=Variable('6') & Unit=second <send event="'WaitEvent1.wait.timeout'" delay="'6s'"/>.
  • Variable with string value including unit. For example: Timeout=Variable('6ms') & Unit=second <send event="'WaitEvent1.wait.timeout'" delay="'6ms'"/>. In this case, the unit specified in the variable is used instead of the static property unit.

Unit Property

Use this property to specify the units for the Timeout property.

Enable Status Property

This property controls whether or not a block contributes code to the application. You may wish to use this property if there is a need to temporarily remove a block during debugging or, for other reasons during development, temporarily disable a block. This saves the effort of having to remove the block and then add it back later.

ORS Extensions Property

Starting with 8.1.4, Composer blocks used to build routing applications (with the exception of the Disconnect and EndParallel blocks) add a new ORS Extensions property.

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on 12 May 2017, at 06:31.