Invokes a flow specified.
In the flow invoked, this component's input stream and parameter can be used.
| Input | Format | All |
|---|---|---|
| Number of Inputs | 1 | |
| Description | Same type of stream as input stream of an invoked flow. | |
| Output | Format | All |
| Description |
When PassStream is "false", output stream is one of the invoked flow. If the invoked flow ends with End component, the input stream of this component is output regardless of the setting of PassStream.PassStream. |
| Name | Data Type | Mapping | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| UserName | string | In & Out |
Specifies a user name of the owner of invoked flow. If empty, the flows of the owner of this flow is invoked. |
||||||
| Flow | string | In & Out |
Specifies a flow to be invoked. A flow name can be specified like "<Project Name>.<Flow Name>" When "UserName" is empty, a project name is omittable like "<Flow Name>". In that case, the flow in the same project is invoked. |
||||||
| ReturnValue | string | Out | Can refer the return value of invoked flow. | ||||||
| PassStream | streamPassThrough | - |
Select if the input stream of this component is output or not.
|
||||||
| ExecuteUserInfo | group | - | Information of executing user. | ||||||
| ExecuteUser | string | In & Out |
Specifies a user name to execute a flow. If empty, no executing user. |
||||||
| Password | password | In & Out | Specifies a password pf a user to execute a flow. | ||||||
| Param | category | In |
Specifies parameters of a flow to be invoked. The values can be exchanged by using the public variables of the invoked flow. The values are set to the public variables with the same name. A parameter name is case sensitive. Data type should be the same as the one defined in the invoked flow. (The type conversion is done as automatically as possible. But especially, it is necessary to note it in the Binary type.) |
| Type | Parameter | Stream for error handling flow | Error Code | Description |
|---|---|---|---|---|
| Exception | None | This component's input stream | - | When the stream type is different from the one defined in invoked flow |
| - | When the invoked flow raises error |
If you want to execute another user's flows, those function have to be set executable by user who wants to execute.
If you set those user name to the "Allow executable user" property of the project or the flow, those user can execute that flow.
You can specify multiple users with separameter ",". Wildcard "*" also can be used for all users under the some domains.
| Value | Allowed users |
|---|---|
| /user1, /user2 | only /user1 and /user2 |
| /domain1/* | All users who belong to /domain1 |
| /* | All users |
When you specify "/*" in the project, all flows of that project is allowed to be execute by all users.
(When you specify same value in the flow, only that flow is allowed to be executed.)
Wildcard cannot be use for intermidiate domain like "/*/user1".
Wildcard cannot be use for part of user name like "/user*".
Both SubFlow component and FlowInvoker component can invoke another flow like subroutine. But there are many differences in the operations in a detailed part.
Please use an appropriate component properly according to the situation.
| SubFlow | FlowInvoker | |
|---|---|---|
| Transaction | According to the setting of Start component, sub-flow's transaction becomes a part of transactions of caller flow. |
A different another transaction at each call. A transaction of caller flow is different from transactions at each call. Caller flow waits the end of called flow. But the transaction is not terminated. |
| Session | The session under execution is all the same. The session variable is shared. |
The subsession of each owner of the executed flow is made. The session id of subsession is "<parent session ID>-<branch>". The life time of subsession is the same as parent session. If the parent session is the same, subsession executed by same user is the same and the session variables are shared during the session. The session variables and stream saved by StreamPut component cannot be shared by different users. |
| Request | The request under execution is all the same. The request variable is shared. |
Different request at each call. Request variables are initialized every time. The request ID at each call is quot;<Parent request ID>-<branch枝番>". |
| Mapping of flow name | Cannot be mapped. | Can set both owner and name of the flow dynamically. |
| Next Flow | Next flow is ignored in sub-flow | Next flow is executed and return the parent flow. |
| Execute user | Same as the parent flow. | Can set user name and password dynamically. |
| User Interface | Flow can be set by Select Flow dialog. The output stream and parameters are set automatically when setting flow. |
Sets flow name and parameter manually. (By "Replace component" of right click menu, convert from Subflow component to FlowInvoker component. Then, parameters are set automatically.) |
| Debug | Can use debugger and step into subflow. | In debugger, FlowInvoker component is retrieved as a single component. Cannot step in the invoked flow. When executed by profile mode, logs of invoked flow are output in FlowProfile.log. But it cannot be refered in the Designer. |
The flow invoked by FlowInvoker is executed in the same thread as the one of parent flow.
Therefore, the owner of flow that begins requesting and the flow executing it now can be different in flow-ctrl and the monitor tool, etc.