Start and End a Flow
Start component
The Start Component is an entrance of a Flow. There must be a Start Component in a Flow. You can define an input stream of the Flow and parameters for the Start Component.
Input stream type
You can define an input stream type for the Flow in the stream pane. If the sream type you defined here is different from the stream type you input actually, an error will happen (By defining the stream type as "ANY", any stream types can be received).
Flow parameter
Public Flow variable can be defined in the variable pane.
User authentication
By setting permission string for the "execution permission name", the user can be authenticated. If the property is set as null, the user won't be authenticated. When the user is authenticated, if there isn't any execution user in the session or the execution user doen't have the permission specified in the "execution permission name", an error will happen.
End component
The Flow that can finish normally must be ended by the End Component. There are 2 kinds of the End Component.
A. If there is a loop or parallel processing remaining after having run the component, run the loop or parallel processing.
EndResponse Component End Component HttpEnd Component NextFlow Component ExceptionReturn Component
B. By running the component, you can finish the Flow immediately. (Immediate termination component)
Exception Component Break Component SOAPFault Component
Basically, you can finish a Flow with the component in the Group A. The End Component in the Group B is used in the error processing etc. Multiple end components can be configured in a Flow, but there must be only one end component to finish the Flow. The way to end the Flow (the way to return to the caller Flow of the SubFlow or the Error Processing Flow), such as finish the Flow by which End Component, is decided by its property.
"Transaction" property
Whether to commit the transaction or roll back or to do neither of them or not is decided by the "Transaction" property. If "Commit" or "Roll back" is selected, the connection's "commit" (or "roll back") used in the Flow will be executed in order, then the component's "Commit" (or "Roll back") will be executed. If neither of them is done, both the connection and the component won't commit, and the "Transaction" status will be inherited by session."Return value" property
A Flow's return value can be specified in the "Return value" property. If the Flow is executed as a SubFlow, the "Return value" property can be referred to as the SubFlow Component's property. After the Flow is executed as an Error Processing Flow, and return to the caller component, the return value will be set automatically in the component's "error message" property.
EndResponse Component
The EndResponse Component is an often used end component. The component is the exit to output the Flow's result stream. There must be only one result stream in a Flow, so after branching the Flow parallel, you can't configure multiple EndResponse Components in the Flow. In this case, you can also use an End Component to finish the Flow instead of the EndResponse Component. For some branching, only either of the branches can be executed, so you can put 2 EndResponse Components at the both ends. Moreover, the EndResponse Component is the end of a loop. Once the loop processing reaches the EndResponse Component, it will return to the component where the loop starts and repeat the processing. In a loop, if a stream reaches 2 different EndResponse Components through the branches, an error will happen in the second EndResponse Component that the stream reaches.
"Output type" property
If a stream is input into the EndResponse Component many times by loop, you can select whether to pack the stream or not in the "Output type" property. If "The last stream" is selected, the Flow's result stream will be the last input stream of the loop. If "Collect stream" is selected, all of the input streams will be collected. For example, a stream that has 1 record has been input through 10 loops, the result stream will be a stream that has 10 records. If the "Container" is selected, the input stream can be considered as a container.
End Component
The End Component doesn't return the result stream. Multiple End Components can be configured in a Flow. If there is no EndResponse Component in the Flow, and the Flow is ended by an End Component, there will be no result stream in the Flow.
HttpEnd Component
The HttpEnd Component is an end component in a URL execution Flow to end the Flow started from the HttpStart Component.
"Status code" property
A Flow's return value can be specified in the "Status code" property. You can specify the HttpResponse code such as "200 OK". If the status code isn't specified, the HttpResponse code will be "200 OK". Having specified "302 Moved temporary" here, you can make the Flow redirect after running it by setting a URL for the redirect address in the Location property.
"Content-Type" property
You can specify Content-Type for the HTTP response.
"Location" property
Having specified "30x" (x is a number.) in the "Status code" property, you can specify a URL for redirecting.
"Cookie" property
You can specify name, data type, value for setting the HTTP response's Set-Cookie.
NextFlow Component
The NextFlow Component is an end component to continue to call out another Flow after finishing the running Flow.
"Output type" property
It is as same as the "Output type" property of the EndResponse Component.
"Next Flow" property
By specifying the "Next Flow" property, you can call out another Flow after the Flow has finished. The "Next Flow" property can dynamically modify the next Flow by mapper while running. When you continue to run the Flow, the last output stream is the output stream of the last Flow.
When a Flow is transactionalized, if the "Transaction" property is "Commit" or "Roll back", the transaction will finish here at once, and the next Flow will become another transaction. If the property is "Do nothing", the Flow including the next Flow will be one transaction.
"Parameter" property
You can specify the parameter for the next Flow.
ExceptionReturn Component
The ExceptionReturn Component is an end component used in an Error Processing Flow.
"Output type" property
It's as same as the "Output type" property of the EndResponse Component.
"Action after error" property
When the Flow is executed as an Error Processing Flow, once it's ended with the ExceptionReturn Component, the way to return to the caller Flow will be decided by the "Action after error" property. If "The next Flow" is selected, the Flow will return to the error component. If "Finish Flow" is selected, the Flow will finish immediately.
Exception Component
After running the EndResponse Component or the End Component, if there is a loop or parallel processing remaining, the stream will return to the component and continue to process. However, after running the Exception Component, the Flow will finish at once. Multiple Exception Components can be configured in a Flow, but the Flow will finish once the stream reach any of them. When the SubFlow is finished with the Exception Component, the error that happened in the SubFlow will be notified to the caller Flow.
"Error message" property
If the Flow ended with the Exception Component is called out as the SubFlow, the value set in the "Error message" property can be referred to from the mapper by the caller Flow.
Break Component
As same as the Exception Component, the Break Component will finish the Flow at once no matter whether a loop or parallel processing or component remains or not. The Exception Component represents abend, but the Break Component represents that the Flow finishes normally.
"Specify output" property
The Break Component is used to break the running loop after branching the stream inside the loop. In this case, you can select whether to take the component's result stream as its input stream or not, or whether to take it as another EndResponse Component's stream or not by the "Specify output" property. If "Output when break" is selected, the result stream will be the component's input stream. If "Output until break" is selected, the result stream will be another EndResponse's output stream. For example, if a 10-time loop was broken when the 5th time, the stream that packed the 5 processings can be taken as the Flow's result stream.
SOAPFault Component
The SOAPFault Component is an end component that creates and returns the SOAPFault's envelope. In a Flow, it's only used to creat a SOAP Server. When the Flow ended at the SOAPFault Component, the all requests can be ended although it's a SubFlow or an Error Processing Flow.