Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Gloop Service Editor

The Gloop Service Editor is the dedicated editor for plain Gloop Services (.gloop) and is the default editor when a Gloop Service file is opened. It's composed of the Step editor, Input and Output view, Mapper view and Properties view. This editor is packed with features to make the experience of writing a Gloop service smooth sailing by assisting, validating, and providing fixes for problems and has a myriad of shortcuts for power users.

Gloop Service Editor

Gloop Service Editor

  1. Step Editor
  2. Input and Output View
  3. Mapper View
  4. Properties View

Step Editor

The main component of the Gloop Service Editor is the Step Editor, it is composed of a toolbar and a step tree. The step tree is a representation of the Gloop service's steps and their structure. As certain steps can contain other steps, they can be expanded or collapsed in the tree. The steps in the tree are also decorated to describe the way they're configured or what it does. At the side of the step tree is a ruler which display line numbers, breakpoints, and validation problems.

Adding Steps

There are five different ways to add a Step: using the toolbar, the context menu, keyboard shortcuts, drag and drop, or content assist.

Using the toolbar, click the plus shaped green button, then click one of the menu items below.

Gloop Service Editor Toolbar Add Step Button

Gloop Service Editor Toolbar Add Step Button

To use the context menu, right click on the step tree, then select Add, then click on one of the menu items.

Gloop Service Editor Add Step Context Menu

Gloop Service Editor Add Step Context Menu

As for using keyboard shortcuts, see the list of shortcuts available to you.

Drag and drop can be used to add or duplicate a step. You can add an Invoke Step by dragging one or multiple services from the Coder Navigator onto the step tree and drop them.

To duplicate steps select one or multiple steps, then while dragging hold Alt and drop them.

Gloop Service Editor Drag and Drop Add Step

Gloop Service Editor Drag and Drop Add Step

Using content assist is a very convenient way to add steps quickly, especially for Invoke Steps. To trigger content assist, press the . key, then search for the name of the step to add or the name of the service to invoke. By default the step will be added to the currently selected step (or Gloop service) if that step can have children steps; otherwise it will be added below that step. Pressing Shift while adding the step forces it to be added after the selected step.

When adding a step, it'll be added to the end of the Gloop service. However, if you have a step selected, one of two things could happen. If the selected step could have children steps, the new step will become a child of the selected step; otherwise, the new step is placed right below the selected step.

Deleting Steps

There are three different ways to delete a Step: using the toolbar, the context menu or the keyboard shortcut.

Using the toolbar, click the X shaped red button to delete all selected steps.

Gloop Service Editor Toolbar Delete Step Button

Using the context menu, right click the selected steps and click the Delete menu item.

Gloop Service Editor Delete Step Context Menu

Gloop Service Editor Delete Step Context Menu

The keyboard shortcut to delete one or multiple steps is Delete.

Moving Steps

Steps can be moved around to organize your Gloop service just like moving a line of text. There are several ways to do so, namely: the toolbar, keyboard shortcuts, and drag and drop. Steps can be moved either up, down or left, right. When moving a step up or down, it will move the step after or before the above or bellow step. When moving the step left, it will remove the step from its parent and place it bellow it. When moving the step to the right it will place the step under the first parent step above it.

To move steps using the toolbar, click on one of the arrow shaped button while selecting one or multiple steps.

Gloop Service Editor Toolbar Move Steps Buttons

To move steps using keyboard shortcuts, see the list of shortcuts.

Gloop Service Editor Toolbar Move Steps

To move steps using drag and drop

  1. Select one or multiple steps.
  2. Drag them over another step (or Gloop service).
  3. Drop them.

By default it will remove the steps from their original location; but if the Alt key is pressed, it will duplicate them instead.

Gloop Service Editor Drag and Drop Move Steps

Editing Step Properties

When a step is selected, it's possible to edit its properties in order to configure it. The properties are displayed in the Properties View; which is by default, on the right side of the editor. If the Properties View is not visible, go to the application menu Window>Show View>Properties or use the shortcut ^⇧P or ⌘⇧P.

For steps, the Properties View has two sections: General – where all the step properties are listed, and Comments – to conveniently edit or view the step's comments. In the General section, the step properties are listed in a table form with a Property column showing the property name and a Value column showing the current value assigned to the property. To edit a property, single click one of the rows in the Value column or press Return.

To reset a property to null or a default value, right click a property, then click Reset or press Delete.

It is possible to edit some of the step properties without using the Properties View.

When a step is selected:

  • Press L to edit the label.
  • Press / to edit the comments.
  • Press Alt E or double click the step to edit the expression (only for steps with an expression) or add/edit a Set Expression.

Gloop Service Editor Edit Step Properties

Gloop Service Editor Edit Step Properties

Read more about all the step properties here

Gloop services also have properties; to show them either click on a blank space of the step tree or click the table shaped button on the toolbar. The Gloop services Properties View has three sections, General, Comments and REST. Read more about the Gloop service properties here.

Expression Dialog

The Expression Dialog is the dialog used to edit step expressions like the Fork Step, While Step, Break Step, Set Expression, or Gloovy Step.

The dialog is composed of a text area on the left and a model tree on the right. The text area contains the actual expression and the model tree displays the context model containing all the available properties in that step.

When writing Groovy code, it is possible to use content assist by pressing ^Space or . so that you could inspect the available properties injected in the expression. The content assist also proposes available methods and fields for the properties. It is also possible to use the model tree on the right to write a property name in the expression either by double clicking it or copy pasting it, this will write the entire path to access the property.

The Groovy code is also validated to look for syntax and semantic errors, when an error is detected the invalid code is underlined in red. Hovering over the invalid code displays the error message, giving more information about what is wrong.

Some step expressions can be evaluated and others cannot (such as the While Step). When it is not evaluated, the dialog is configured to write plain text. When it is evaluated it is configured to write Groovy code, therefore syntax coloring, semantic highlighting, content assist and validation are enabled. Pressing Alt E toggles the evaluated property from true to false when within the expression dialog.

Gloop Service Editor Expression Dialog

Step Decoration

Each step is decorated with a different icon and label in the step tree, it is used to give additional information about what the step does and how it is configured.

Map Step Decoration

When a Map Step has only one declared variable, no Map Lines, or has one Set Expression, it is displayed as:
Declare <declared property>=<expression> or Set <declared property>=<expression>

Gloop Service Editor Map Step Decoration

The Map Lines of a Map Step or InvokeStep, as well as the Set Expressions are displayed under the step in the step tree when it is expanded. It can be used to delete or edit Map Lines and Set Expression, when double clicking a Map Line it opens the Mapper View and select line, similarly double clicking a Set Expression opens the Expression Dialog.

Note that when a Set Expression is evaluated, a yellow dot icon is visible next to it. Note also that Map lines and Set Expression are ordered by their Priority property. This option can be disabled. To do so, click on the filter shaped icon on the toolbar and uncheck Show Map lines and Set steps.

Gloop Service Editor Hide Map lines

Gloop Service Editor Hide Map lines

Fork Step and Break Step Decoration

The expression of a Fork Step or Break Step is displayed next to the step like so:
Fork <expression>

Gloop Service Editor Fork Step Decoration

Iterate Step Decoration

When an Iterate Step has both an input and output array it will be displayed like so:
Iterate <input array> → <output array>
If it only has an input array it will be displayed as Iterate over <input array>
If it only has an output array it will be displayed as Iterate over → <output array>

Gloop Service Editor Iterate Step Decoration

While Step Decoration

When a While Step expression is an integer the step will be displayed like so:
While $gloopIndex < <integer>
It indicates what the While Step actually does which in this case is to continue if the $gloopIndex property is inferior to the integer value.

Gloop Service Editor While Step Decoration

Gloovy Step Decoration

When the script of a Gloovy Step is short enough, it is displayed next to the step like so: Gloovy <script>. But when the script contains more than one line the lines of the script are displayed under the Gloovy step. This option can be disabled, to do so click on the filter shaped icon on the toolbar and uncheck Show Gloovy script line.

Note that the line ruler on the left side is showing the script line number. It is possible to copy the Gloovy script lines by selecting them and pressing the copy shortcut or the menu item.

Gloop Service Editor Gloovy Step Decoration

Asynchronous Step Decoration

When a Concurrent Step or Invoke Step is configured as asynchronous, a green thread overlay is visible on the top right of the Concurrent Step icon.

Gloop Service Editor Async Step Decoration

Invoke Steps Decoration

The invocation signature of an Invoke Step (or method signature), which is the return type input parameters and exceptions, is displayed like so:
<return type> <service namespace>( <parameter1>, <parameter2> ... ) throws <exceptions>
If a parameter is assigned via Map line, Set Expression or has a default value it will be visible in the signature, in case the parameter is not assigned null will be displayed. When a parameter is assigned via an evaluated Set Expression a yellow dot is visible next to the parameter. This option can be disabled, to do so click on the filter shaped icon on the toolbar and uncheck Show method signatures.

The name of each parameter is also indicated in the signature, <parameter name>: <parameter value>, which really helps for the readability of the invocation. This option can be disabled, to do so click on the filter shaped icon on the toolbar and uncheck Show named parameters.

Gloop Service Editor Invoke Step Decoration

Copy and Paste

It is possible to copy and paste steps within a Gloop Service editor and between different Gloop Service editor as well.

To copy and paste steps:

  1. Select one or multiple steps.
  2. Press ^C or ⌘C or right click and click the Copy menu item.
  3. Select another step or Gloop service.
  4. Press ^V or ⌘V or right click and click the Paste menu item.

The process is similar to Cut and Paste steps.

It is possible to copy and paste plain JSON text to create steps. For example copying the following JSON:

1
2
3
{
    "comments": "This Map Step was created from the clipboard"
}

And pasting it in a Gloop Service editor will create a Map Step.

Gloop Service Editor Copy Paste Step

Content Assist

Coder provides a content assist system that can boost productivity when writing Gloop services. The content assist helps to generate preconfigured steps or guide through their configuration.

To trigger content assist simply press the . key. A popup will appear right under the selected step, it is composed of a search text field and a list of proposals. Proposals are possible content that can be created; they have a name and a category. Proposals can be searched by their names or shorthand names, categories can be cycled through to filter the proposals by simply pressing ^Space, at the bottom right the next category is indicated.

A current list of proposal categories:

Category Description
Step Proposals to add a non-configured step
Flat File Descriptor Proposals to write or read from a flat file
Invoke Gloop Proposals to invoke a Gloop service
Invoke Code Proposals to invoke a Code service (e.g. Groovy service)
Invoke Flux Proposals to invoke a Flux service
Templates Proposals to generate a group of configured steps based on a template

The Arrow Up and Arrow Down keys can be used, while still focusing the search text field, to navigate through the proposals and select one. When a proposals is selected a contextual popup will appear on the side to give some additional information about the selected proposal. Pressing Return applies the selected proposal. By default the steps will be added to the currently selected step (or Gloop service) if that step can have children steps, else it will be added bellow that step, pressing the Shift while pressing Return forces the steps to be added after the selected step.

Gloop Service Editor Content Assist

Gloop Service Editor Content Assist

Ninja Tip

Proposals can be searched and applied without leaving the keyboard. After pressing the . key search right away for a proposal by typing its name, the first match will be select, if it's the right one press Return. Pressing Arrow Up while the first proposal is selected will jump to the last proposal. Some proposals have shorthand names, for example the Try Catch Finally proposal can be searched as tcf.

Templates

There is a special type of proposal called Template Proposal. These proposals are designed to generate one or more preconfigured steps to make it very fast and easy to write some common logic or pattern. Template proposals usually require some additional input like filling in a field or selecting another proposal or property.

Gloop Service Editor Content Assist Template

Gloop Service Editor Content Assist Template

Here is a non extensive list of proposal and their effects:

Flat File Descriptor Template

This template generates the necessary steps to read or write to a Flat File using a Flat File Descriptor.

To use this template:

  1. Search for the name of the Flat File Descriptor
  2. Select it
  3. Choose whether to Read or Write

The template generates a step that opens an input or output flat file cursor then iterate over it using an Iterate Step.

Iterate Over an Array Template

This template generates an Iterate Step that iterate over one of the available arrays.

  1. Search and select iterate over array
  2. Choose the input array or none
  3. Choose the output array or none

The template generates a preconfigured Iterate Step with an input and output array.

Block Step Type Template

This template generates a Block Step with a type as Try Catch, Try Catch Finally or Try Finally, these templates can be search using their respective initial letter, tc, tcf, tf.

Logging Templates

This templates generate an Invoke Step which invokes one of the LoggerMethods to log a message.

  1. Search a log level, either info, warn, debug, error or println then select it
  2. The Expression Dialog will appear, enter the message to be logged

The template generates an Invoke Step which invokes the chosen LoggerMethods method and add a Set Expression on the message input of the method.

Fork true/false Template

This template generates a Fork Step with two children, one with a true label and one with a false _label.

  1. Search for fork true/false then select it
  2. Select the true step
  3. Select the false step
  4. The Expression Dialog will appear, enter the expression of the Fork Step

Input Output View

The Input Output View, by default located on the bottom left, is used to view and edit the Gloop Service input and output models. If the Input Output View is not visible go to the application menu Window>Show View>Input Output or use the shortcut ^⇧I or ⌘⇧I.

The view is composed of two Gloop Model editors side by side, learn more about how to use these editors here.

Gloop Service Editor Input Output

Gloop Service Editor Input Output

View Layout

In Coder Studio, the Input Output View offers different layouts for the two Gloop Model editors, Horizontal, Vertical, Tabs and Auto. By default the Auto layout is enabled, it will layout the Gloop Model editors either horizontally or vertically depending on the available space. The layout can be changed by clicking the table shaped icon on the view toolbar on the top right of view.

Renaming and Deleting

The regular renaming and deleting of properties does not refactor the steps referencing them, to learn how to refactor read the refactoring section.

Mapper View

The Mapper View, by default located on the bottom right, is used view and edit the Map lines and Set Expressions of a Map Step or Invoke Step. If the Mapper View is not visible go to the application menu Window>Show View>Mapper or use the shortcut ^⇧M or ⌘⇧M.

The Mapper has two different configurations depending on the step selected:

For a Map Step

Gloop Service Editor Mapper

Gloop Service Editor Mapper

  1. The input model tree, shows all the input properties available at that step
  2. The output model tree, show all the output properties available at that step
  3. The canvas displaying the Map lines

For an Invoke Step

Gloop Service Editor Mapper Invoke Step

Gloop Service Editor Mapper Invoke Step

  1. The input model tree, shows all the input properties available at that step
  2. The Invoke Step input model tree, show all the input properties of the Invoke Step
  3. The canvas displaying the input Map lines
  4. The Invoke Step output model tree, show all the output properties of the Invoke Step
  5. The output model tree, shows all the output properties available at that step
  6. The canvas displaying the output Map lines

Asynchronous Invoke Step

If an Invoke Step is configured as asynchronous only the input side of the Mapper will be visible.

Mapping

Mapping a property to another is very straight forward.

  1. Select a property in the model tree
  2. Drag it over another property in the opposite model tree, a Map line following the mouse will be visible
  3. Drop it, a Map line is created

Note that some type of properties of type Model can only be mapped to properties of type Model, Object or String, in any other case the Mapper will display an error message when attempting illegal mapping.

Gloop Service Editor Mapping

Gloop Service Editor Mapping

Ninja Tip

It is possible to map multiple properties at once, to do so select multiple properties from the output model tree then drag them until the opposite model tree and drop them, multiple Map lines are created.

Gloop Service Editor Multi Mapping

Set Expressions

Set Expressions can be added on the properties of both the output model tree and input Invoke Step model tree.

To add or edit a Set Expression

  1. Select a property
  2. Double click it or press Alt E or Return
  3. The Expression Dialog will appear, enter the expression, either plain text or Groovy if Evaluated is checked
  4. Click the OK button or press ^Return or ⌘Return to save the expression

Gloop Service Editor Mapper Add Set Expression

Gloop Service Editor Mapper Add Set Expression

If a property has a Set Expression assigned to it it is decorated with an icon and the expression, if the expression is evaluated a yellow overlay icon is also visible.

Gloop Service Editor Mapper Set Expression Decoration

Gloop Service Editor Mapper Set Expression Decoration

To delete a Set Expression

  1. Select the target property of the Set Expression
  2. Press Delete or right click then click the Delete Set Expression menu item

Gloop Service Editor Mapper Delete Set Expression

Gloop Service Editor Mapper Delete Set Expression

Set Expression on Nested Properties

When a Set Expression is used on one of the properties of a Gloop Model a grayed expression icon will be visible next to it to indicate that one of the children properties has a Set Expression.

Gloop Model Set Expression

Set Expressions on a Gloop Model property are evaluated by default, the reason is that Gloop Models can be set using a DSL. The DSL makes it very easy to set all the properties of a model, what makes even easier is the template to generate this DSL for the selected Gloop Model.

  1. Select a Gloop Model property
  2. Open the Expression Dialog
  3. Press ^Space then select the Gloop Model DSL template proposal
  4. The Groovy Gloop Model DSL will be generated, press tab to jump from one value to another

Gloop Service Editor Model DSL

Declaring Properties

Declaring model properties is only possible in the output model tree of the Mapper. Declaring properties (or deleting them) works exactly the same way as add properties in the Input Output View. Shortcut, menus and content assist are used in the same way to declare properties with one exception, it is only possible to declare a properties if the targeted model allow extra properties.

Gloop Service Editor Declare Property

Gloop Service Editor Declare Property

Declared properties are distinguished from regular properties by a green plus shaped overlay icon on the bottom left. If this overlay icon is orange instead it means that the declared property what not declared within the selected step.

Ninja Tip

It is possible to map and declare a property in one move, to do so select a property from the input model tree, while pressing Alt, drag it until the opposite model tree and drop it. The property is added as a declared property and a Map line mapping to it is created.

Gloop Service Editor Map Declare

Unloading Properties

To unload a declared property

  1. Select one or multiple declared properties
  2. Press Alt U or right click and click Unload Property

The process is the same to reload the declared properties.

Gloop Service Editor Unload Property

Gloop Service Editor Unload Property

When a declared property is unloaded a trash bin icon is display at the side of the property.

Shortcuts

Command Description Shortcut
Add Map Step Adds a Map Step at the current selection Alt M
Add Fork Step Adds a Fork Step at the current selection Alt F
Add Block Step Adds a Block Step at the current selection Alt B
Add Iterate Step Adds a Iterate Step at the current selection Alt I
Add While Step Adds a While Step at the current selection Alt W
Add Break Step Adds a Break Step at the current selection Alt K
Add Gloovy Step Adds a Gloovy Step at the current selection Alt G
Add Concurrent Step Adds a Concurrent Step at the current selection Alt C
Add Random Step Adds a Random Step at the current selection Alt R
Delete Step Deletes the selected steps Delete
Enable/Disable Step Enables or disables the selected steps ^\ or ⌘\
Edit Step Label Edit the selected step label L
Edit Step Comments Edit the selected step comments /
Move Step Up Moves the selected steps up ^Up or ⌘Up
Move Step Down Moves the selected steps down ^Down or ⌘Down
Move Step Left Moves the selected steps left (out of the parent step) ^Left or ⌘Left
Move Step Right Moves the selected steps right (into the parent step) ^Right or ⌘Right
Edit Expression Edits the expression of the selected step or adds/edits a Set Expression of a Map or Invoke Step Alt E
Unload Property Unloads or reloads the selected declared properties Alt U
Content Assist Triggers content assist .
Open Declaration Opens the file of the service invoked by an Invoke Step ^Return or ⌘Return
Find References Finds references of the selected Invoke Step's Service ^⇧F or ⌘⇧F
Quick Fix Triggers quick fix ^1 or ⌘1
Refresh Refreshes the selected Invoke Step Input and Output Models F5
Show/Hide Comments Shows or hides the step comments ^/ or ⌘/
Copy Copies the selected steps ^C or ⌘C
Cut Cuts the selected steps ^X or ⌘X
Paste Attempts to paste the clipboard as steps at the current selection ^V or ⌘V
Show Properties View Shows the Properties View ^⇧P or ⌘⇧P
Show Input Output View Shows the Input Output View ^⇧I or ⌘⇧I
Show Mapper View Shows the Mapper View ^⇧M or ⌘⇧M

Customise Shortcuts

The shortcuts listed above are the default keyboard shortcuts for TORO Coder Studio, the shortcuts can be be modified by going to the Preferences then selecting the Keys page.

Command Description Shortcut
Add Map Step Adds a Map Step at the current selection Alt M
Add Fork Step Adds a Fork Step at the current selection Alt F
Add Block Step Adds a Block Step at the current selection Alt B
Add Iterate Step Adds a Iterate Step at the current selection Alt I
Add While Step Adds a While Step at the current selection Alt W
Add Break Step Adds a Break Step at the current selection Alt K
Add Gloovy Step Adds a Gloovy Step at the current selection Alt G
Add Concurrent Step Adds a Concurrent Step at the current selection Alt C
Add Random Step Adds a Random Step at the current selection Alt R
Delete Step Deletes the selected steps Alt D
Enable/Disable Step Enables or disables the selected steps Alt E
Edit Step Comments Edit the selected step comments /
Move Step Up Moves the selected steps up Alt Up
Move Step Down Moves the selected steps down Alt Down
Move Step Left Moves the selected steps left (out of the parent step) Alt Left
Move Step Right Moves the selected steps right (into the parent step) Alt Right
Edit Expression Edits the expression of the selected step or adds/edits a Set Expression of a Map or Invoke Step Ctrl E or ⌘ E
Unload Property Unloads or reloads the selected declared properties Ctrl U or ⌘ U
Content Assist Triggers content assist .
Open Declaration Opens the file of the service invoked by an Invoke Step Ctrl Return or ⌘ Return
Find References Finds references of the selected Invoke Step's Service Ctrl ⇧ F or ⌘ Shift+F
Quick Fix Triggers quick fix Ctrl 1 or ⌘ 1
Refresh Refreshes the selected Invoke Step Input and Output Models F5