Wait for HTTP Request

Wait for HTTP Request is a signal-in activity that waits for an incoming HTTP request in a process. The process instance suspends until the incoming HTTP request is received.

General

The General tab has the following fields.

Field Literal Value/Process Property/Module Property Description
Name None The name to be displayed as the label for the activity in the process.
HTTP Connection Yes HTTP Connector shared resource that describes the host name and the port number on which the process waits for the incoming message.

For more information about specifying shared resources, see HTTP Connector .

Context Path

Yes This is the prefix of a URL path used to select the contexts to which an incoming request is passed.

You can either specify both Context Path and Path Spec, any, or none of these elements. For example, the path displays in http://hostname.com/contextPath/pathSpec format.

In a Send HTTP POST request where a Path Spec is not provided, add a forward slash (/) after the Context Path (for example: http://<host>:<port>/<contextPath>/). If you do not add the forward slash, the POST request is redirected as a GET request for the resource at <context_path>.

In a Send HTTP POST request where a Path Spec is provided no forward slash (/) is required (for example: http://<host>:<port>/<contextPath>/<pathSpec>).

Path Spec Yes If specified, it is added as a prefix of a URL of the form http://hostname.com/contextPath/pathSpec.
Output Style None The output message format. You can select either String or Binary format for the output messages.
Parse Post Method Data None Specifies whether the message body of the HTTP request should be parsed into a schema for the out of the activity.

When you select this check box, the parameters specified in the Parameters field are used to validate the incoming request and parse it into the output schema. This field is present only when the Output Style is String.

Note: For an incoming GET request, there is no message body, so this field has no effect on the incoming GET message body requests.
Parameters None The parameters of the incoming HTTP request. You can specify parameters in this table for the incoming request to be parsed and represented as a schema in this output of the activity. For each parameter, you must provide a name, datatype, and whether the field is Required, Optional, or Repeating.

Use the button to add parameters and button to remove parameters. Use the up and down arrows to move parameters to new positions in the table.

Note: Specifying parameters in this field parses the query string of the request into the output schema, regardless of whether the Parse Post Method Data check box is selected. Selecting the Parse Post Method Data check box and specifying the parameters in this field is required to parse the message body along with the query string of the request.
Expose Security Context None Select this check box meant for Security Context Propagation and Security Context, to make it available as a transport data in the mapping panel.
Default Encoding Yes Specifies the encoding to use, if no charset is specified in the Content-Type header of the message. This encoding is used for the message body and URL.
Note: Imported projects display the HTTP Authentication check box under the General section if the check box was selected in a previous version TIBCO ActiveMatrix BusinessWorks™ 6.x. Authentication remains enabled on the Wait for HTTP Request activity if you do not clear the check box. If you clear the Authentication check box, a warning message is displayed prompting you to confirm your action. To remove authentication from the activity, click OK. Once you have removed authentication from the Wait for HTTP Request activity, you can reapply it using the Basic Authentication policy. For more information, see "Enforcing Basic Authentication" in the TIBCO ActiveMatrix BusinessWorks™ Application Development guide.

Description

Provide a short description for the activity in this field.

Event

Field Description
Event Timeout (seconds) This field specifies the amount of time (in seconds) a message waits, if it is received before this activity is executed. If the event timeout expires, an error is logged and the event is discarded. If no value is specified in this field, the message waits indefinitely. If zero (0) is specified, the event is discarded.
Activity Timeout (msec) A file change may occur before this activity is executed. This field specifies the amount of time (in milliseconds) to wait, if the file change occurs before this activity is executed in the process instance. If the event timeout expires, an error is logged and the event is discarded.

Advanced

The Advanced tab has the following fields.

Field Process Property/Module Property Description
Fill Standard Headers None When this check box is selected, additional headers such as Authorization, User-agent, and Host are populated in the Dynamic Headers element in the server response received from the client.
Write to File None Select this check box to specify that the incoming messages whose body and attachments exceed the specified threshold size, should be written to a file instead of stored in memory. With this you can accept large incoming messages without consuming a great deal of memory.

Selecting this check box displays the Directory, Create Non-Existing Directories, and Threshold Size fields. Keep this check box clear if you want to keep the incoming messages in memory.

Note: The files created using this option after they are written, are not deleted automatically. You must manage the storage used by these files and delete them when they are no longer in use.
Directory Yes The directory to write messages that are above the specified threshold. The process engine does not attempt to create the directory if the specified directory does not exist. Therefore, create the directory before starting the process engine.
Create Non-Existing Directories None When you select this check box is, all directories in the path specified in the Directory field are created, if they do not already exist.

If you do not select check box and there are one or more directories in the specified path in the Directory field that do not exist, an exception is raised.

Threshold Data Size(bytes) Yes The maximum size (in bytes) of an incoming message that can be kept in memory. Messages larger than the specified size are written to a file in the specified directory. The name of the file is the output so that subsequent activities in the process can access the file and read its contents.

Specifying zero (0) in this field causes all incoming messages to be saved to a file.

Output Editor

Output Editor tab describes the data structure for the HTTP request headers. You can use the default structure, or you can alter the structure, if the incoming request has a specific data structure for the header of the request.

Header Datatype Description
Accept string This field specifies media types that are acceptable for response messages for the incoming request. For example, text/*,text/html. The media types are described in the HTTP specification at w3.org.

If no Accept header field is present, the client accepts all media types.

Accept-Charset string This field specifies the character sets that are acceptable for response messages for the incoming request. For example, iso-8859-5, and unicode-1-1. Character sets are described in the HTTP specification at w3.org.

If no Accept-Charset header is present, the client accepts any character set.

Accept-Encoding string This field specifies the content-coding values that are acceptable for response messages. For example, compress, gzip. For more information about this header field, see the HTTP specification at w3.org.
Content-Type string This field indicates the media type of the entity body sent to the receiver. The media types are described in the HTTP specification at w3.org. An example of the media type is text/html; charset=ISO-8850-4.
Content-Length string This field indicates the size of the entity body (in decimal number of OCTETs) sent to the receiver. It also accounts for encoding the message body. For more information about when the message body is URL encoded, see Special Characters in HTTP Requests.
Connection string Use this field to specify options required for this connection. For example, the close option specifies that you want the connection to be closed when the request is complete.
Cookie string For more information about this field, see the HTTP specification at w3.org.
Note: For correct parsing and processing of cookies, input must be in the format "key=value".
Pragma string This field is used to include implementation-specific directives that might apply to the receiver. For more information about using this field, see the HTTP specification at w3.org .

Conversations

You can join the conversation here. Click the Joining existing conversation button to join multiple conversations. For more information about conversations, see Application Development.

Output

The following is output for the activity.

Output Item Datatype Description
Method string The method specified in the request. For example, GET or POST.
RequestURI string The address part of the request. This is the part before the question mark (?).
HTTP-Versions string The version field of the HTTP request.
PostData or BinaryContent or FileName string The message body of the HTTP request. The content of this element depends upon whether the message body is parsed. The parsing behavior is controlled by the Parse Post Method Data field on the General tab.

For more information, see Special Characters in HTTP Requests.

QueryString string The query string part of the request. This is the part after the question mark (?).
Header string The header of the HTTP request.
Protocol string This can be either HTTP or HTTPS, depending upon the protocol used by the request.
Port string The port number on which the request was received. This is the port number configured in the HTTP Connector shared resource.
DynamicHeaders complex The dynamic header is an additional header parameter to add runtime headers to the outgoing HTTP Messages. This element is specified in the Input tab. DynamicHeaders consists of the following information:
  • Name: the name of the header
  • Value: the value of the header

You can consider the following overriding conditions:

  • Overrides the value of HeaderName with the value found in DynamicHeaders if it is a non-repeating header. If more than one occurrence of this header is found under DynamicHeaders, it generates the following exception: "The header [ headerName ] is defined as non-Repeating Header in Input Editor. This header cannot have multiple occurences in DynamicHeaders."
  • If it is a repeating element, add the respective name value pairs under DynamicHeaders. This is added to the existing list maintained for this element.
  • For a repeating element, if the new header name is not found under the "Headers" section declared through TIBCO Business Studio™ for BusinessWorks™, the following is added to the HTTP Headers.
    • Shows only one value, if found once in DynamicHeaders.
    • Shows array of values, if found repeating in DynamicHeaders.
mimeEnvelopeElement complex This element contains the message attachments.

This element contains a repeating element named mimePart that contains each mime attachment.

mimeHeaders complex This element contains the mime header for each mimePart. Mime headers can contain the following information:
  • content-disposition: to suggest a filename for an attachment, use "*;filename=<filename>" in this element.
    Note: HTTP servers may alter or ignore the suggested name.
  • content-type
  • content-transfer-encoding
  • content-id
  • any element

For more information about MIME headers and their syntax, see http://www.faqs.org/rfcs/rfc2045.html.

Note: When the content type is specified as "text/*" (for example, "text/xml"), the attachment content is in either the textContent input element or the file name storing the attachment is in the fileName input element. When the content type is anything other than "text/*", the attachment content is in either the binaryContent input element or the file name storing the attachment is in the fileName input element.
binaryContent | textContent | fileName complex This element contains the mime attachment.

The element can be one of the following:

  • binaryContent: content of the attachment when the attachment is binary data.
  • textContent: content of the attachment when the attachment is text data.
  • fileName: the file name of the attachment written to the disk.
Context complex Contains information about the environment of the client.

This element holds the optional RemoteAddress element.

RemoteAddress string The IP address of the client that submitted the HTTP request.

Fault

The Fault tab lists the possible exceptions generated by this activity. For more information about error codes and the corrective action to take, see the TIBCO ActiveMatrix BusinessWorks™ Error Codes guide.

Fault Generated When..
ActivityTimedOutException A timeout has been reached.

Threading Policy Details

The following are the details about Wait for HTTP Request activity threading policy.

Activity Type Multi-Threaded? Default Thread Count Thread Count Configuration
Signal-in Yes
  • Minimum QTP Threads = 10
  • Maximum QTP Threads = 75
It can be configured on the HTTP Connector shared resource using the following fields:
  • Minimum QTP threads
  • Maximum QTP threads

Policy

Activities that support policies display the Policy tab. To associate a new or existing policy with the Wait for HTTP Request activity, click the Add Policy to Activity icon. To edit policy details, click Go to selected Policy icon. The Policy tab has the following fields.

Field Description
Name The name of the policy.
Type The type of policy associated with the activity. The Wait for HTTP Request activity supports the Basic Authentication policy.
Note: Credentials authenticated on this activity are not used for propagation during credential mapping.
Description A description of the policy.