Phase Input Example
Location: examples/rappture2/phase/
This example demonstrates the <phase> input type. A phase represents
a whole page in the interface, enabling multi-step wizard-style workflows.
tool.xml
<?xml version="1.0"?>
<run xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../rappture2web/contract.xsd">
<tool>
<title>phase (rappture2web)</title>
<about>Example of a Rappture <phase> object.
A phase is like a group of input controls, but it represents a whole page within the graphical interface.
</about>
<command>python3 @tool/phase.py @driver</command>
<contract>
<input>
<string id="first">
<about>
<label>First input</label>
<description>First string input on the first page.</description>
</about>
<default>one</default>
</string>
<string id="second">
<about>
<label>Second input</label>
<description>Second string input on the second page.</description>
</about>
<default>two</default>
</string>
</input>
<output>
<log id="log"><about><label>Phase Inputs</label><description>Log summary of the phase workflow inputs.</description></about></log>
</output>
</contract>
</tool>
<input>
<phase id="one">
<about><label>First Page</label></about>
<string id="first">
<about>
<label>First input</label>
<description>First string input on the first page.</description>
</about>
<default>one</default>
</string>
</phase>
<phase id="two">
<about><label>Second Page</label></about>
<string id="second">
<about>
<label>Second input</label>
<description>Second string input on the second page.</description>
</about>
<default>two</default>
</string>
</phase>
</input>
</run>
Key concepts
Each
<phase>creates a separate page/tab in the input panel.Phases are useful for complex tools with many inputs that benefit from a guided, multi-step workflow.
Running
rappture2web examples/rappture2/phase/