Working with "Routine Out"

Navigation:  How to Work with Screens >

Working with "Routine Out"

Previous pageReturn to chapter overviewNext page

 

Overview

 

A "Routine Out" is a set of processes that is executed after all the controls and processes within the screen are validated. It does not allow for the addition of controls (with the use of Display Controls processes - the exception being the "Message Box" process) or references to the controls (Control Operations processes). Each screen can only contain one "routine out".

 

 

To Add a "Routine Out" to a Screen

 

It is possible to add a "routine out" to all the screens at once. You just have to check the "Create Routine In/Out for new Screens" option, available in the "MCL-Designer Setup" window, when starting a project - every screen you create within the new project will include an empty "routine out". You can also check the "Create Routine In/Out for new Screens" option throughout project development. In this case, only new screens will automatically include a "routine out". The previously created screens will not be affected. See Option "Create Routine In/Out for new Screens".

 

As an alternative, you can add a "routine out", one screen at a time. There are two ways to do this:

 

In the tree view ("Programs" module), right-click the screen you want to add a "routine out" to and select "Routine Out" in the resulting menu.

In the open screen that will include the "routine out", right-click an empty area and select "Routine Out" in the resulting menu.

 

Step-by-step

 

1. Use one of the following to access the "Routine Out's" properties window:

 

a. In the tree view of the "Programs" module, right-click the screen that will include the "routine out" and select "Routine Out".

 

 

b. In the open screen that will include the "routine out", right-click an empty area and select "Routine Out" in the resulting menu.

 

 

Both options (a. or b.) open a "Routine Out"properties window with the "General" and "Routine" tabs (the "Routine" tab is open by default).

 

Once the "routine out" is added to a screen, you can use either of the "Routine Out" right-click menu options (a. or b.) to open its properties window and edit it, if necessary.

 

 

 

2. Use one of the following methods to add processes to this tab:

 

a. Use the drag-and-drop mechanism to drag a process from the "Process Display Section" onto the "Routine" tab.

 

b. Use the editing bar on top of the window and click to open a process list window (see Detail of Process List).

 

c. Right-click any row to open a menu and select the "Add/Insert" option.

 

3. If required, open the "General" tab to enter relevant information regarding the "routine out" in the "Notes" option.

The name of the "routine out" is NOT editable.

 

 

4. Once you are done, click to apply.

 

 

"Routine Out" Use

 

If the option "Create Routine In/Out for new Screens", available in the "Designer Setup" window, is checked, it will NOT be necessary to add a "routine out", every screen you create within the project will include one. See Option "Create Routine In/Out for new Screens".

 

Regardless of the way you chose to add a "routine out", it will be empty. You must add the intended processes (in the "Routine" tab).

 

A "routine out" only includes processes. Its execution does NOT depend on any action performed by the operator (event), it is a consequence of the screen's validation (meaning, the validation of the screen's controls).

 

If you choose to keep the "routine out" empty (without processes), when it is executed, it automatically sends the application to the next screen.

 

A "routine out" CANNOT include controls. This means that you cannot add controls to its "Routine" tab or use processes that call/refer them (processes from the "Display Controls" or the "Control Operations" group). The only exception is the "Message Box" process which can be added to the"Routine" tab of the "routine out".

 

If necessary, use the editing bar or the right-click menu in the "Routine" tab to edit its content.

 

If you want to edit an added process, double-click it to open the corresponding properties window.

 

If you intend to use actions/processes in both the screen's "Actions" tab (or controls included in the screen) and the screen's "routine out", make sure they do NOT interfere with each other. For instance, if you have defined certain processes within a "routine out" and you add a "Call MCL Program" to the screen's "Actions" tab, the execution of the "routine out" is compromised because the application will jump to the defined program and whatever processes you intended to run with the "routine out" will not be executed.

 

 

Below is an example of a screen with a "routine out" and a screen with no "routine out" to show you how the execution flow is affected:

 

Example: Screen with a "Routine Out"

 

 

"Screen_1" includes 2 Input Barcode controls, an "Exit" Button and a "routine out". The "routine out" consists of a "Message Box" process.

This design leads to the following execution flow:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1. The operator performs a scan or types in data for the first Input Barcode (A) and presses <ENTER>. (The defined tab order ensures that the focus changes to the next Input Barcode (B).

 

2. The operator performs a scan or types in data that is entered in Input Barcode B and presses <ENTER> to validate the input. (Once both inputs are validated, the "routine out" is triggered).

 

3. A "Message Box" is displayed. (The process added to the "routine out" is executed).

 

4. The operator clicks "OK" in the "Message Box" and the application flow continues to the next screen. (The "Message Box" contains a "Go to <Next Screen>".)

 

Example: Screen without a "Routine Out"

 

"Screen_2" includes 2 Input Barcode controls and an "Exit" Button. There is NO "routine out" and there are NO processes or actions added to the screen's "Actions" tab or the Input Barcode B control.

This design leads to the following execution flow:

 

 

 

 

 

 

 

 

1. The operator performs a scan or types in data for the first Input Barcode (A) and presses <ENTER>. (The defined tab order ensures that the focus changes to the next Input Barcode (B)).

 

2. The operator performs a scan or types in data that is entered in Input Barcode B and presses <ENTER> to validate the input. (The application flow stops, there are no actions to execute. The only available step is to click the "Exit" Button and close the application.)

 

 

If no "routine out" is added to the screen, you must indicate what the application should do next - add the necessary actions/processes to the "Actions" tab of a screen or control.

 

 

 

To Delete a "Routine Out"

 

Step-by-step

 

1.In the tree view ("Programs" module), right-click the "routine out" you want to delete.

 

 

2. In the resulting menu, click “Delete”.

 

 

3. Click in the "Delete Confirmation" window.