Scheme Editor/en

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
Schema Editor

The schema editor is used to define the external interface of a action. It can be found on the "Schema" tab after selecting either an elementary or a compound action in the navigation tree.

To the right, you see an example for the interface of a action with an input pin (in) and output pin (out).

The interface consists of two sides, the input side and the output side. The editor shows a box representation of the action, where inputs are located on the left, outputs on the right side of the representing box.

Schema editors can also be invoked on actions that are write protected, e.g. actions from libraries like the standard library. Such components cannot be modified, but they can however be displayed by the editors.

Pins[Bearbeiten]

Adding & Removing Pins[Bearbeiten]

New input and output pins can be added using the icon buttons in the top corners of each side of the action's representation box (Icon Add Inputpin.png / Icon Add Outputpin.png). Existing inputs and outputs can be removed using the icon buttons directly beside the buttons for adding (Icon Remove Pin.png), but a pin has to be selected for this operation first. Please note that some blocks, like shell command blocks, need a minimum set of pins which can not be removed.

When new pins are added, they get default names attached with a sequential number, like in1, in2, out1, out2, etc.

Renaming of Pins[Bearbeiten]

The name of a pin can be changed by clicking on the name field, which then turns into an input text field, allowing to type in a new name for the pin. These names are not only for description purpose but also to access the pin's value in an elementary action's source code (i.e. for actions written in a textual programming language).

Edit Functions for Existing Pins[Bearbeiten]

For all other operations concerning the pins, the pin to be modified has to be selected first. To select a pin, click on it with the left mouse button. Using the CTRL-key while clicking toggles the pin into or out of the selection. Pressing the Shift-key while clicking, selects all pins in between the previously selected pin and the clicked-on pin. The selected pin(s) will appear highlighted in a red color.

To open the context menu for a pin, select the pin, then press the right mouse button. The context menu, besides assigning the data type, provides additional functions. Since input and output pins have slightly different properties, their context menus are different and described below.

Setup / Change Datatype[Bearbeiten]

Each pin has a data type attribute that determines which kind of data is expected or generated by the pin. Every new pin initially gets the data type that was last used; initially the data type "Any" is assigned by default. This type is also used as default, whenever no other reasonable data type can be predicted. The pin's data type is displayed beside the pin, outside of the representation box. The data type for a pin can be changed in the context menu, through its "datatype" sub-menu, which brings up a list of available types. Note that when you have already placed step instances of the modified block in any activity diagram, a change in the data type of a pin may affect existing connections in which the pin is involved. If the new type is incompatible with the connection, they are drawn as dotted line in the diagram, or when a preset value becomes incompatible, the value is displayed in a red color.

Default Values for Pins[Bearbeiten]

Default values for unconnected step-pins can be defined here, by "freezing" a pin in this schema editor. Both constant-value and environment-freeze values are possible.

Pin Specific Options (Context Menu)[Bearbeiten]

Undo
Undo last change(s).
Copy Pin
Copy all attributes from selected pin.
Remove Pin
This option simply removes the selected pin.
Datatype
This option is used to specify the data type of the selected pin. This brings up a list of the available data types.
Default Value Editor
This option allows you to specify the editor type for the freeze value, e.g. strings can be entered single line, multi-line or as a password string.
Show Datatype
This option opens a view which shows the pins data type. Note that you can not change the datatype in this view.
Default Value As
This option allows, for most standard data types, presetting the input value according to the data type, by typing a valid value into a text input field. The identifier of the data type in the menu entry differs depending on the data type of the pin. A freeze value defined in this schema defines the input value of unconnected step-pins. It will only be in effect, if the action is placed as a step and the corresponding step-pin is not connected or frozen.
Default Value from Clipboard
Freeze pin with the data stored in the clipboard.
Default Value from Environment Variable
This option causes a dialog to open up, allowing specifying the environment variable's name in a text input field. For more information see: Environment Freeze Value. This freeze value is only effective for unconnected step pins (read description above).
Delete Default Value
This option is only available if the selected pin is frozen to a value or to an environment variable. No matter if the pin was preset with a direct value or with an environment variable, the preset information will be lost.
Parameter (Non Consuming;Non Triggering)
This option determines whether the select pin is a parameter pin. For more information see: input pin.
Telegram (Non Consuming;Non Triggering;Deliver While Executing)
This option determines whether the selected pin is a telegram pin. For more Information see: Telegram Pin.

Special Attributes[Bearbeiten]

Comment
This option causes a text editor to open. It allows you entering a comment that will be displayed as a tooltip of the selected pin.
Move Up/Down
With those options you can change the sequence of the pins.

When an input pin is selected in the editor:

Input Pin Options
Buffered
This check box serves to switch the buffering mode of the pin on or off. For more information see: DiagramElements-Pin#Output Pin

When an output pin is selected in the editor:

Output Pin Options

Action[Bearbeiten]

To open the context menu for an action, select the box representation of the action, then press the right mouse button. The context menu supports the following functions.

Changing Triggering Conditions[Bearbeiten]

The triggering condition of a block defines which input pins must have received data on order for a new activity to be triggered and started. These triggering conditions can be:

AndConnected (Default)
All connected input pins must have received data.
And
All input pins must have received data.
Or
At least one input pin must have received data.

The most common trigger condition is AndConnected. The Or condition allows for a step to be activated whenever any input arrives on any of its pins. It is especially useful to handle events or input data coming from different sources.

You can also change the triggering conditions by a left click on the trigger-condition field (located at the top left of the block) and select one of the conditions.

Declaring Semantic Attributes[Bearbeiten]

The step's pop up menu also allows for a number of semantic attributes to be defined for the action. These are only relevant for the code generator, which is not yet officially released in pre-3.0 versions. When set, these flags allow for the code generator to optimize the execution speed for the action. Unless elementary code is generated for a compound action which uses that action, these settings have no effect whatsoever (i.e. do not care for them). Currently, semantic attributes are:

Operator required
Informational flag that the action needs operator assistance. Please set this flag if a containing action needs an operator assistance. This will help to identify test cases which can be run without operator assistance. You can find blocks with inconsistent "Operator required" setting in the "Special" test suite search. If the "Operator Needed" Flag missing option is enabled all those blocks will be listed.
Functional
Hint for the code generator, and the execution engine, that the action's code is purely functional. This means, that the output value(s) only depend(s) on the input value(s), and that neither the input values themselves nor any other global data is modified by any side effect. Purely functional blocks can be executed in parallel without a need for synchronization.
Modifies an Input Object (Side Effect)
Hint for the code generator and executor, that the action's code is modifying any of its input values. This means basically, that probably no other step which possibly uses this value should execute concurrently.
Modifies an Object or External State (Side Effect)
Hint for the code generator and executor, that the action's code is modifying any object. This means basically, that probably no other step should execute concurrently.
Writes all Output(s) exactly Once
Hint for the code generator, that the elementary code writes all of the output pins, but only once. This allows for the code generator to eliminate any data queues along the output connections, and pass these values to follow up action code as a function call.
Writes any Output exactly Once
Hint for the code generator, that the elementary code writes any of the output pins, but only once. This also allows for the code generator to generate shorter, more efficient code.
May write an Output more than Once
Hint for the code generator, that the elementary code may write any of the output pins mode than once. The code generator will create data queues for the output pins.

Notice: these flags may only be set if you are absolutely sure about what you do and how the elementary code behaves. In a future version, a more advanced code analysis might be added, which may make these flag settings obsolete. If in doubt, leave these flags unchanged (the worst thing that happens in this case, is that any generated elementary code executes slightly slower).

Renaming of Actions[Bearbeiten]

An action can be renamed either using the context menu option or rename the action in the project menu. The name of the action in project tree and the Scheme editor are identical.
The rename of an action will also rename all already placed step instances of this action containing the previous (original) action name. If a step was renamed itself, the step will keep its name.

Action Specific Options (Context Menu)[Bearbeiten]

Undo
Undo last change(s).
Rename
Open an inplace editor within the headline of the representing box for the action. Initially the current name of the action is selected and the editor will replace the current name with the new name. On lost focus (Enter, Cursor down, Mouse click) the changes will be saved. Cancel editing without saving the changes can be done by pressing the "ESC" key.
Copy Pin Interface
Copy all pins (input/output) with all attributes
Paste Pin Interface
Paste a previous copied pin interface
Paste Pin
Paste a previous copied single pin (see pin context menu)
Trigger Condition
see Changing Triggering Conditions
Role in Load and Performance Tests
These settings are also not yet used. They are only effective for load and performance tests, which are not yet officially released.
Semantic Attributes
see Declaring Semantic Attributes
Attributes
Open an editor to define the background and frame color besides the tag and name settings for this action.


Adding Pre- and Post Actions[Bearbeiten]

Compound blocks can have pre- and post-actions. The pre-action block will be executed each time the owning block is triggered; the post execution block is executed after the owning block is finished. This can be useful e.g. to allocate and/or release resources. To add a pre- or post-action, drag and drop any action from the navigation tree into the corresponding field at the bottom. Please note that these blocks cannot not have input pins.

Add / Remove Implemented Interface[Bearbeiten]

A virtual action is used to specify the interface (number of pins and their datatypes), but not its implementation as an activity. It can be placed into a network like any other action.
A virtual action can be assigned to this action as an interface. Actions with an assigned interface can be used by expecco to replace the assigned virtual blocks during a test run by these blocks containing the concrete implementation.

Add / Remove / Test Action User Interface[Bearbeiten]

You can specify an user interface for an action. The defined UI will be displayed as long as the action is executed during a test run. The action can communicate with the UI using environment variables. The environment variables will be created by the UI Editor during creation / editing the UI.



Copyright © 2014-2024 eXept Software AG