Modifying a wizard flow
A wizard flow is updated when you add a screen or add output values to an existing rule.
Procedure
- Create the incrementalwizards.xml file.
Ensure that the wizard ID specified in the incrementalwizards.xml file
matches with the wizard ID of the XML file that you are modifying.
<wizards> <wizard id= "wsc.shipment.wizards.CustomerPickupWizard"> <wizardEntities> <!-- Create a new screen --> <wizardEntity id="Page8" screenId="extn.org1.shipment.NewScreen1" impl="/platform/jsps/dojo/xapiajaxsuccesshandler.jsp" last="false" type="PAGE" category="Cat1"/> <!--Replace an existing screen --> <wizardEntity id="Page1" screenId="wsc.shipment.customerpick.additems.AddItems"/> <!-- Modify a rule --> <wizardEntity id="Rule1"> <output value="1"/> <output value="2"/> <output value="3"/> <output value="4"/> <output value="5"/> </wizardEntity> </wizardEntities> <!-- Modify a wizard transition --> <wizardTransitions> <wizardTransition id="Transition1" source="Rule1"> <output target="Page8" value="1"/> <output target="Page2" value="2"/> <output target="Page7" value="3"/> <output target="Page4" value="4"/> <output target="Page5" value="5"/> </wizardTransition> </wizardTransitions> </wizard> </wizards>
You can modify only certain attributes of the existing wizard. The following table provides the list of editable wizard attributes:
Table 1. Editable wizard XML attributes Attribute Description independentPages Indicates whether the wizard pages are independent of each other. The possible values: - True - Indicates that the wizard pages are independent.
- False - Indicates that the wizard pages are dependant.
You can modify the following attributes inwizardEntity
oftype=PAGE
:Table 2. XML attributes that can be modified in a page Attribute Description screenId Indicates the class name of the screen that is displayed in the page. start Indicates whether the page is the first page in the wizard. The possible values: - True - indicates that the page is the starting or the first page in the wizard.
- False - indicates that the page is not the starting or the first page in the wizard.
end Indicates whether the page is a last page of the wizard. The possible values: - True - indicates that the page is the last page in the wizard.
- False - indicates that the page is not the first page in the wizard.
category Indicates the category to which the page belongs. This attribute is used for breadcrumb. You can modify the following attributes in
wizardEntity
oftype=RULE
:Table 3. XML attributes that can be modified in a rule Attribute Description impl The Java class must implement the interface com.sterlingcommerce.ui.web.platform.wizard.ISCUIWizardRule
. You can use theinstall3rdParty
utility to add third-party custom Jars to the classpath of various utilities and Enterprise Archive (EAR) files.For example,
impl=java:com.ibm.wsc.shipment.customerpickup.rules.CustomerPickupFirstPageWizardRule
is the wizard rule that provides the implementation.start Indicates whether the rule is the first rule in the wizard. The possible values are: - True - indicates that the rule is the starting or the first rule in the wizard.
- False - indicates that the rule is not the starting or the first rule in the wizard.
last Indicates whether the rule is a last rule of the wizard. The possible values are: - True - indicates that the rule is the last rule in the wizard.
- False - indicates that the rule is not the first rule in the wizard.
output Indicates the possible return string for a rule. The value indicates the next page in a wizard transition. You can define the wizard rule to exit the wizard flow by specifying the exit rule, <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. - Copy the
incrementalwizards.xml
file to the <INSTALL_DIR>/extensions/wsc/webpages/wizardxmls/ folder. - Optional: If you want to apply multiple extensions that are based on
identifiers, modify wizard definitions for the corresponding identifiers in the
incrementalwizards.xml
file. Copy theincrementalwizards.xml
file for an identifier to the <INSTALL_DIR>/extensions/wsc/webpages/<identifier ID>/wizardxmls/ folder. For example, if you are creating a wizard forOrg1
identifier ID, copy theincrementalwizards.xml
file to the <INSTALL_DIR>/extensions/wsc/org1/wizardxmls/ folder.