Wizard flow definition
You must use an XML file to create the flow definition of your wizard. You cannot use the Extensibility Workbench to create or customize wizards. To understand the various attributes of wizard.xml, see the sample Create Order wizard XML file.
- Page - The visible part of the wizard. Each page must have a unique ID within the wizard.
- Rule - Determines the wizard flow. A rule can lead to the next page in a wizard or another rule. It can also lead to a transition that connects the wizard flow. Transition can occur for a page-to-page, page-to-rule, rule-to-page, or rule-to-rule.
- Flow controller - Drives the wizard flow. It determines the next
wizard entity that is shown or evaluated based on the current activity
entity.
Any wizard controller must extend
ISCUIWizardFlowController. The default wizard controller class iscom.sterlingcommerce.ui.web.platform.wizard.SCUIDefaultWizardController. The wizard flow controller utility class orchestrates the flow that is based on the definition. You can either plug in your own flow controller or use the default flow controller.
Sample: Create Order wizard XML file
<wizards>
<wizard id="isccs.order.wizards.createOrder.CreateOrderWizard"
flowController="com.sterlingcommerce.ui.web.platform.wizard.SCUIDefaultWizardController"
independentPages="false" extensible="true">
<wizardEntities>
<wizardEntity id="Rule1" impl="java:com.ibm.isccs.order.rules.CreateOrderFirstPageWizardRule"
start="true" last="false" type="RULE">
<output value="1"/>
<output value="2"/>
<output value="3"/>
</wizardEntity>
<wizardEntity id="Page1" screenId="isccs.order.create.customer.CustomerIdentification"
impl="/platform/jsps/dojo/xapiajaxsuccesshandler.jsp" last="false" type="PAGE"
category="Cat2"/>
<wizardEntity id="Page2" screenId="isccs.order.create.additems.AddItems"
impl="/platform/jsps/dojo/xapiajaxsuccesshandler.jsp" last="false" type="PAGE"
category="Cat1"/>
<wizardEntity id="Page3" screenId="isccs.order.create.additems.AddItems"
impl="/platform/jsps/dojo/xapiajaxsuccesshandler.jsp" last="false" type="PAGE"
category="Cat1"/>
<wizardEntity id="Page4" screenId="isccs.order.create.customer.
CustomerIdentification"
impl="/platform/jsps/dojo/xapiajaxsuccesshandler.jsp" last="false" type="PAGE"
category="Cat2"/>
<wizardEntity id="Page5" screenId="isccs.order.fulfillmentSummary.
FulfillmentSummaryDetailsScreen"
impl="/platform/jsps/dojo/xapiajaxsuccesshandler.jsp" last="false" type="PAGE"
category="Cat2"/>
<wizardEntity id="Page6" screenId="isccs.payment.confirmation.PaymentConfirmation"
impl="/platform/jsps/dojo/xapiajaxsuccesshandler.jsp" last="true" type="PAGE"
category="Cat2"/>
<wizardEntity id="Page7" screenId="isccs.order.create.additems.AddItems"
impl="/platform/jsps/dojo/xapiajaxsuccesshandler.jsp"
last="false" type="PAGE" category="Cat1"/>
</wizardEntities>
<wizardTransitions>
<wizardTransition id="Transition1" source="Rule1">
<output target="Page1" value="1"/>
<output target="Page2" value="2"/>
<output target="Page7" value="3"/>
</wizardTransition>
<wizardTransition id="Transition2" source="Page1" target="Page3">
</wizardTransition>
<wizardTransition id="Transition3" source="Page2" target="Page4">
</wizardTransition>
<wizardTransition id="Transition4" source="Page3" target="Page5">
</wizardTransition>
<wizardTransition id="Transition5" source="Page4" target="Page5">
</wizardTransition>
<wizardTransition id="Transition6" source="Page5" target="Page6">
</wizardTransition>
<wizardTransition id="Transition7" source="Page7" target="Page5">
</wizardTransition>
</wizardTransitions>
</wizard>
</wizards>Wizard element
<wizard id="wsc.order.wizards.createOrder.CreateOrderWizard"
flowController="com.sterlingcommerce.ui.web.platform.wizard.
SCUIDefaultWizardController"
independentPages="false" extensible="true">The following table describes the attributes of a wizard element:
| XML Attribute | Mandatory | Description |
|---|---|---|
| id | Y | Indicates a unique wizard identifier. |
| flowController | Y | Indicates the flow controller for the wizard.
The flow controller does the following actions:
|
| independantPages | Y | Indicates whether the wizard pages are independent
of each other. The possible values are as follows:
|
| extensible | N | Indicates whether the wizard is extensible.
By default all wizards are extensible. The possible values are as
follows:
|
Wizard page entity
<wizardEntity id="Page1" screenId="isccs.order.create.customer.CustomerIdentification"
impl="/platform/jsps/dojo/xapiajaxsuccesshandler.jsp" last="false"
type="PAGE" category="Cat2"/>| XML Attribute | Mandatory | Description |
|---|---|---|
| id | Y | Indicates a unique page identifier for a page in the wizard |
impl |
Y | Indicates the jsp or struts action, which renders the page. |
| screenId | N | Indicates the class name of the screen that is displayed in the page. |
start |
N | Indicates whether the page is the first page
in the wizard. The possible values are as follows
|
| last | N | Indicates whether the page is a last page of
the wizard. The possible values are as follows:
|
| type | Y | Indicates whether the wizardEntity defines a
page or rule. The possible values are as follows:
|
| category | N | Indicates the category to which the page belongs
to. This attribute is used for breadcrumbs. |
Wizard rule entity
A wizard rule does logical computations to evaluate various output values. The flow of a wizard depends on the output values that are defined.
<wizardEntity id="Rule1" impl="java:com.ibm.isccs.order.rules.CreateOrderFirstPageWizardRule"
start="true" last="false" type="RULE">
<output value="1"/>
<output value="2"/>
<output value="3"/>
<output value="-1" type="exit"/>
</wizardEntity>The following table describes the attributes of a wizard rule:
| XML Attribute | Mandatory | Description |
|---|---|---|
| id | Y | Indicates a unique rule identifier for a rule in the wizard |
impl |
Y | The Java class must implement the com.sterlingcommerce.ui.web.platform.wizard.ISCUIWizardRule interface.
You can use the install3rdParty utility to add
third-party custom JAR files to the class path of various utilities
and enterprise archive (EAR) files.For example, |
start |
N | Indicates whether the rule is the first rule
in the wizard. The possible values are as follows:
|
| last | N | Indicates whether the rule is a last rule of
the wizard. The possible values are as follows:
|
| type | Y | Indicates whether the wizardEntity defines a
page or a rule. The possible values are as follows:
|
| output | N | Indicates the possible return string for a rule.
The value indicates the next page in a wizard transition. The wizard
rule can be defined to exit the wizard flow as <output
value="-1" type="exit" />.Note: If Java returns
a string that does not match the output values, the SCUIWizardRuleHolder:
Undeclared output from implementation exception occurs.
|
Wizard transition element
Wizard transition is used to transfer control from one wizard entity to another wizard entity. The wizard transition value is compared with the output of the wizard rule and control is transferred to the next wizard entity. You can define the same wizard transition identifier for multiple wizard transitions, which are associated with different values.
<wizardTransitions>
<wizardTransition id="Transition1" source="Rule1">
<output target="Page1" value="1"/>
<output target="Page2" value="2"/>
<output target="Page7" value="3"/>
</wizardTransition>
</wizardTransition> Or<wizardTransitions>
<wizardTransition id="Transition2" source="Page1" target="Page3">
</wizardTransition>The following table describes
the attributes that are used to define a Transition:
| XML Attribute | Mandatory | Description |
|---|---|---|
| id | Y | Indicates a unique transition identifier. |
| source | Y | Indicates the identifier of the source entity from which the transition originates. |
| output | N | Mandatory, if the source attribute is a Rule.
This attribute is used to determine the transition from one page to
another page. Based on the value that is returned by the rule, transition
is applied to the pages defined in the target attribute.
For example, if <output target="Page1" value="1"/>,
and if the rule returns value as 1, the wizard makes the transition
to Page1. |
| target | Y | The target attribute indicates the identifier of the entity where the transition ends. |