WebFlow Step Builder
In this topic ...
Specifying Arguments to Step Methods
Related Topics ...
Use the WebFlow Step builder to create distinct steps in a process consisting of page processing and other model actions. A WebFlow Step builder call replaces many of the builder calls you would usually use to present a page to the user and process any navigation to and from that page.
A WebFlow Step builder call adds the following artifacts to the WebApp:
- Variable -- State Manager -- The State Manager variable is an LJO that provides the following methods used to:
- getCurrentStep -- Returns the name of the current step.
- isInitialized -- Returns true if the step has been initialized; false otherwise.
- setName -- For internal use only. Used by the WebFlow builders.
- setCurrentStep -- For internal use only. Used by the WebFlow builders.
- Variable -- State Manager Process Definition -- This XML Variable contsists of a ProcessDefinition structure with <Step><Name/></Step> nodes for each WebFlow Step builder call in the model.
- Method -- GoToStepName -- Specify this method in a WebFlow Transition or other builder call to execute the specified step.
- StepNameOnInitialize -- Used internally by the WebFlow step builders. May be removed from future releases.
- Method -- StepNameOnSubmit -- Specify this method as the value for the Action input on any builder call that allows for the form to be submitted.
Quick Tips
- Builder call order matters -- If a transition builder call transits to a step, add the corresponding step builder call before the transition builder call. We can re-order builder calls using drag and drop in the Builder Call List.
- Disabling a WebFlow Step builder call -- Like any other builder call, you can profile a WebFlow Step builder to be enabled or disabled for a given profile. If you disable a WebFlow Step builder call, the WebFlow Transition builder calls that reference it are also disabled. Any artifacts related to the disabled builders are removed from the WebApp.
This behavior also applies when you manually Disable a WebFlow Step builder call in the Builder Call List.
Specifying Inputs
The WebFlow Step builder takes the inputs described in the table below. For help on inputs common to many or all builders such as those in the Properties and HTML Attributes input groups, see "Using the Builder Call Editor ."
Input Name Description Name Enter a name for this builder call. The Designer displays this name in the Builder Call List. Description Enter text that describes this step. Initialization Action Actions to Call: Select the action or actions to be executed when the application enters this step the first time. These action(s) get run once; if the user reloads the step, the initialization actions are not rerun. Load Action Arguments Enter the name and type of any arguments you want to supply to one or more actions in the Actions to Call list. We can reference these arguments in the Reference Chooser under the Arguments node. Actions to Call: Select the action or actions to be executed when application enters this step. If the action you specify takes arguments, we can wire the arguments you created for this Load Action by using the Reference Chooser to create an indirect reference like: ${Arguments/ArgumentName}. The GoToStepName method executes each of these action(s) each time the step is loaded.
Load Page with Step Enable this checkbox if you want to display a page as part of this step. The page displays after the Load Action. Page Type Specify whether you want to display a page already in the model or if you want to import a new page into the model. Page in Model Specify the name of the Page or Imported Page builder call whose page you want to display as part of this step. Page to Import Use the file chooser to specify the path or URL to the page you want to import into the model. Import Rule Choose whether to dynamically update this page or not. Should import on every generation in development. Make URLs Absolute If checked, all relative URLs on the page will be converted to absolute URLs (recommended). Submit Action Arguments Enter the name and type of any arguments you want to supply to one or more actions in the Actions to Call list. We can reference these arguments in the Reference Chooser under the Arguments node. Actions to Call: Specify one or more actions to be called that will be associated with this step. If the action you specify takes arguments, we can wire the arguments you created for this Submit Action by using the Reference Chooser to create an indirect reference like: ${Arguments/ArgumentName}. The StepNameOnSubmit method executes each of these actions. You must call this action explicitly.
The Submit Action action list is not necessarily associated with a page's Submit event. We can specify the StepNameOnSubmit method as the Action for a Button or Link that submits the page. We can also call the StepNameOnSubmit method to execute the listed actions in association with this step.
Calling WebFlow Step Methods
We can call the methods added to the WebApp by the WebFlow Step builder just as you call any other methods. Each WebFlow Step builder call adds the following methods to the WebApp:
- builderCallNameOnInitialize - Executed by the Factory the first time it executes this step. We can initialize the step explicitly by calling this method from another method or action list.
- GoTobuilderCallName - Executes the named step. You call this method to explicitly execute a step in either a WebFlow Transition builder call or as the action for a Button, Link, or other action control builder call. This method executes the initialize action, all the actions you define in the Load Action action list, and loads the associated page.
- builderCallNameOnSubmit - Executes the actions you define in the Submit Action action list.
Specifying Arguments to Step Methods
We can declare arguments to the GoToStepName and StepNameOnSubmit methods by specifying the name and type of those arguments in the Load Action and Submit Action input groups in the Builder Call Editor. You specify the GoToStepName or StepNameOnSubmit method as the value for the Action input in the action control, event handler, or WebFlow Transition builder call that you want to execute this step.
To specify arguments to step methods:
- In the WebFlow Step builder call editor, declare the names and types of the arguments in the Load Action and Submit Action input groups in the WebFlow Step builder call editor.
- In the WebFlow Transition, Button, Link, or other builder call editor, specify the GoToStepName or StepNameOnSubmit method as the value for the Action input.
- In the Input Mappings group of the builder call from which you call one of these methods, enter the value for any arguments in the list.
If you call one of these actions from an action list, the Define Method Call with Arguments dialog displays, prompting you to specify any argument values for the selected method.