How Can We Help?

Working with Transitions

You are here:
< Back

Transitions move you from screen to screen (in UI state mode) or state to state (in controller modes).

Let’s say you’re writing an address book application, and you have two screens. The first screen is a screen where your users can fill out their contact’s home address and contact info. The second screen lets users fill out the same contact’s work address and contact info.

To allow your users to move from screen one (their contact’s home contact info) to screen two (work contact info), you need to create a transition that sends them from screen one to screen two.

Any two screens need a transition between them to allow users to move from one to another. If you were creating a baking application that walked a user through the steps needed to make delicious homemade cookies, you would need a transition that went from step one to step two, then another from step two to step three, then step three to step four… You get the idea.

Transitions also create movement from one state to another. If you want your application to move from the state of being idle (waiting for user input) to the state of checking for email, you’ll create a transition that defines when that will happen.

Luckily, transitions are easy to make. You can handle it, no problem. For more information, click one of the topics below (or in the left pane if you’re reading this on the web).

Adding and Generating Transitions between UI Screens

Transitions are the connections that let users move from screen to screen. Without a transition that connects Screen A to Screen B, the user can’t move from Screen A to Screen B.

There are two ways to create a transition between screens:
1. Adding a transition—Creates a transition between two screens.
2. Generating default transitions—Creates standard transitions between all the screens in your application.

Adding a transition lets you create a transition between any two screens in your application.

When you generate default transitions, Text-to-Software creates transitions between each screen and the next logical screen in the list. Text-to-Software creates a single transition between each screen and the next one in the list. If the screen is the last one in the list, Text-to-Software creates a transition between it and the first screen in the list.
For example, if you have three screens, and you generate default transitions, you will end up with three transitions:
1. Transition from screen one to screen two.
2. Transition from screen two to screen three.
3. Transition from screen three to screen one.

TO ADD A TRANSITION BETWEEN UI SCREENS
1. On the Requirements Analysis tab, ensure you are viewing UI screens—Right-click in the States box and click Show UI States.
2. In the Screens box, click the start state of the transition.
3. Do one of the following:
• In the Screens box, right-click and click Add Transition.
• In the Transitions box, right-click and click Add.
4. In the Choose an end state for the transition, click the screen you want to transition to.
5. Click OK.
6. In the Enter transition name box, type a name for the transition.
7. Click OK.

TO GENERATE DEFAULT TRANSITIONS BETWEEN UI SCREENS
1. On the Requirements Analysis tab, ensure you are viewing UI screens—Right-click in the States box and click Show UI States.
2. Right-click in the Screens box and click Generate Default Transitions.

Renaming and Deleting Transitions between Screens

When you have transitions defined between your UI states, you can rename and delete them.

TO RENAME A TRANSITION BETWEEN UI STATES FROM THE SCREENS BOX
1. On the Requirements Analysis tab, ensure you are viewing UI screens—Right-click in the States box and click Show UI States.
2. In the Screens box, right-click a screen that has a transition and click Rename Transition.
3. If the screen only has one transition, proceed to step 4. If the screen has more than one transition, click the transition in the Choose the transition box and click OK.
4. In the Enter transition name box, type a name for the transition.
5. Click OK.

TO RENAME A TRANSITION BETWEEN UI SCREENS FROM THE TRANSITIONS BOX
1. On the Requirements Analysis tab, ensure you are viewing UI screens—Right-click in the States box and click Show UI States.
2. In the Screens box, click a screen that has a transition.
3. In the Transitions box, right-click and click Rename.
4. Click the transition in the Choose the transition box.
5. In the Enter transition name box, type a name for the transition.
6. Click OK.

TO DELETE A TRANSITION BETWEEN UI STATES FROM THE SCREENS BOX
1. On the Requirements Analysis tab, ensure you are viewing UI screens—Right-click in the States box and click Show UI States.
2. In the Screens box, right-click a screen that has a transition and click Delete Transition.
3. Click the transition in the Choose the transition box.
4. Click OK.

TO DELETE A TRANSITION BETWEEN UI STATES FROM THE TRANSITIONS BOX
1. On the Requirements Analysis tab, ensure you are viewing UI screens—Right-click in the States box and click Show UI States.
2. In the Screens box, click a screen that has a transition.
3. In the Transitions box, right-click a transition and click Delete.
4. Click the transition in the Choose the transition box.
5. Click OK.

Defining Transitions between Controller States

Transitions between controller states (client, server, and web controller) tell the application when to move from one state to another.
For example, you might want to define a transition that tells your application to move from the state of being idle to the state of checking email.
When you define transitions between controller states, you will have to set up a rule that will tell the application when to make the transition happen. For example, you wouldn’t want your application to check email every second (unless your application happens to be an email application). You could set up a rule that will make your application go from the state of being idle to the state of checking email every ten minutes.
You can define a transition between controller states from the Requirements Analysis page, or by using the Virtual Machine Editor.
The Virtual Machine Editor displays a visual representation of your controller states. States display as boxes, and transitions display as arrows that connect the boxes. The Virtual Machine Editor lets you draw arrows between boxes to add transitions.

TO ADD A TRANSITION FROM THE REQUIREMENTS ANALYSIS PAGE
1. Click the Requirements Analysis tab.
2. Ensure you are in a controller state—In the States box, right-click and click one of the following:
• Show Client Controller States
• Show Server Controller States
• Show Web Server Controller States
3. In the States box, right-click the start state for the transition and click Add Transition.
4. In the Enter transition name box, type a name for the transition and click OK.
5. In the Choose an end state for the transition box, click a state and click OK.
6. Go to the To Define a Transition procedure below.

TO ADD A TRANSITION IN THE VIRTUAL MACHINE EDITOR
1. On the Requirements Analysis tab, ensure you are in a controller state—In the States box, right-click and click one of the following:

• Show Client Controller States
• Show Server Controller States
• Show Web Server Controller States

2. In the States box, right-click and click Edit Logic.
The Virtual Machine Editor opens.
3. Right-click the box that represents the start state of the transition you want to add and click Add transition.
4. Click the box that represents the end state of the transition.
5. In the Enter transition name box, type a name for the transition and click OK.
6. In the Choose an end state for the transition box, click a state and click OK.
7. Go to the To Define a Transition procedure below.

TO DEFINE A TRANSITION
1. In the Text-to-software Assistant editing box, click the drop-down arrow next to the I want to box. Choose one of the following:
• Always run—Choose if you want the transition to always run.

• Check if given value matches another value—Choose if you want the transition to run if one value/variable matches a specific value or variable.
• Check matching1 AND matching2—Choose if you want the transition to run if one value/variable matches a specific value or variable AS WELL AS if another value/variable matches a specific value or variable. The transition will only run if both values match. If only one value matches, the transition will not run.
• Check matching1 OR matching2—Choose if you want the transition to run if one value/variable matches a specific value or variable OR a second value/variable matches a specific value or variable. The transition will run if one or the other of the values match, or if both match.

2. If required, choose items from in the Choose word box and click OK.
3. Click the Convert Text-to-software button.
4. In the Event Definition section, click any of the following buttons to edit the code:

• Insert Local Variable
• Insert Database Access Script
• Insert Query
• Insert result and assign it
• Calculate Once in UI

5. To see if the rule runs correctly, click the Test Rule button.
6. In the second I want to box, choose one of the following options:

• Perform an action if a given value is true
• Perform an action if a given value is not true
• Perform an action if a given value matches another value
• Perform an action if a given value does not match another value
• If value1 matches value2 perform action1 else perform action2
• If matching1 and matching2 perform action1 else perform action2

7. If required, choose items from in the Choose word box and click OK.
8. Click the Convert Text-to-software button.
9. In the Event Definition section, click any of the following buttons to edit the code:

• Insert Local Variable
• Insert Database Access Script
• Insert Query
• Insert result and assign it

10. To see if the rule runs correctly, click the Test Rule button.

Previous Working with the SageTea Components in Text-to-Software
Next Working with Use Cases and Requirements
Table of Contents