Flow Run by HTTP

You can send a request from any client side ( mainly is web browser) to an URL, then the request will be received by HTTP listerner or HTTPS listener or AJP listerner which is built in the Flow Service, so that the Flow will run.

To communicate with a client side by HTTPS listerner, you can use the certification registered to the Management Console according to the PKI.

Memo

In the Flow Service's initial status, HTTPS listener and AJP listener are invalid. You can activate them in the "Communications" page of the Management Console. The path is "Settings" - "Services" - "Flow".

Flow

To create a Flow executed by HTTP, you should start it with an HttpStart Component, and finish it with an HttpEnd Component

Create a Flow

To create a Flow, you can click the "HttpFlow" icon under the "Flow" tab in the "Create Flow" dialog box. In the created Flow, the settings for supporting HTTP execution have completed.

Memo

To show a Flow's property, you can click the Flow in the tree pane, or click at any space in the Flow Window, then you can check the property by inspector.

If you clicked "New Flow" under the "Flow" tab in the "Create a Flow" dialog box, to replace the Start Component into an HttpStart Component, you can right click the Start Component to open a menu, then select "HttpStart" from "Replace Start Component" to replace it. The Flow's property isn't changed.

Start (Input Stream)

Flow's input stream is HttpStart Component's output stream. You can click the HttpStart Component to open a stream pane, and define for the stream there. If you want to process the HTTP request's MIME data by Flow, you can select MIME for HttpStart Component's output stream type. If you want to process HTTP request's GET or POST method's parameter, you can select ParameterList for HttpStart Component's output stream type.

Flow parameter

To get HTML form parameters by Flow, you can define a field name as same as HTML form's input tag's name property for the ParameterList. So that, when the Flow is running, the value can be set automatically. When the field's data type has been specified as Integer etc., errors will happen if the passed parameter can't be changed into the specified data type. For more information about when get multiple values and when get files, please refer to the "Help" document of the HttpStart Component.

Memo

To refer to the "Help" document of each compent from the Flow Designer, you can right click the icon in the pallet or in the Flow Window to open a menu, then click "Help" to check.

Finish (Output stream)

A Flow's output stream is the HttpEnd Component's input stream. Namely, it is the output stream of the component put befor the HttpEnd Component, so to define the stream, you can click that component and define it in the opened stream pane. The Flow Service will create MIME data as MIME body for the output stream, then take the output stream as HTTP response. If you created MIME data for HTTP response, you should use an EndResponse Component for the Flow.

Execution setting

You can make a connection between Flow and URL by execution settings. The format of a URL for running is as below.

http://://

For the exection setting, you should specify the "Relative path" part. Server address, port, user context can be set automatically.

Memo

The context of the user connecting with the server can be set automatically. You can check or change a context path under the "Context setting" in the Management Console. The path is "Tools"-"Account"'s user information settings. The initial value is user name.

Example

http://localhost:21380/guest/Project1/Flow1

Define execution setting

Click "URL" in the Execution Setting dialog box or Trigger Management's tool bar. Then click "Select" in the right of the "Flow" under "Flow settings", and select a Flow from the dialog box. In the field of the "Relative path" under the "URL setting", there is a path created from project name and Flow name automatically. If you want to change it into any name, you can edit it directly in this field.

About errors during execution

If the executed Flow can't be found or the Flow finished abnormally, it will be returned as HTTP response. The details are as below.

When the execution setting can't be found

"404 Not Found" will be returned. The case will happen when the required URL wasn't set in the execution settings.

When the Flow which was set in the execution setting can't be found

"404 Not Found" will be returned. The case will happen after the execution setting has completed, but the specified Flow is deleted or there is a compile error happening in the Flow.

When the execution setting is invalid

"403 Forbidden" will be returned. The case will happen after the execution setting has completed, but it was judged as invalid.

When the Flow happens time-out error

"202 Accepted" will be returned. The case will happen when the Flow running expired the time specified in "Time-out (seconds)" property (The default value is 180 seconds) but hasn't stopped yet. Please pay attention to that the Flow is still running after the result has been returned. The result can be discarded whether the Flow finished normally or not. Moreover, when the Flow's "Time-out (second)" property is set as "0", although the Flow won't happen time-out error, yet it's possible that the connection will be cut off because of that the HTTP client side (maily is Web browser) happens time-out error first.

When Flow finished abnormally

"500 Internal Server Error" and an error report will be returned together. The error report contains error message, in which the reason for the abnormal ending is described. The stack trace will be shown when debug.

 

To the top of this page