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 and default editor for plain Gloop Services1. This editor becomes visible in Coder when you open a Gloop Service file (.gloop). It is packed with features such as content-assist, validation and linting, quick-fix suggestions, and heaps of keyboard shortcuts for power users so you can get the best out of Gloop and TORO Integrate.

Gloop Service Editor

Gloop Service Editor

The Gloop Service Editor is comprised of the following components, as shown and marked in the image above:

  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. The Step Editor has two tabs labeled Source and Design. The Source tab allows you to view the JSON definition of the opened Gloop Service. The Design tab, as its name implies, is where you design your service; here, you can add, modify, and remove Gloop Steps.

The Design tab contains two components: the step tree of the service and the toolbar above it. The step tree represents the Gloop Service's steps, their order, and hierarchical structure. The toolbar above helps you navigate through the step tree, modify it, and view the details of its branches and leaves.

In the tree, each step is decorated so that it would be easy for users to infer the purpose and/or definition of the step; for example, different types of steps are given different icons. Additionally, certain steps can contain other steps and in order to show this arrangement, Coder renders parent steps collapsible or expandable in the tree. At the side of the step tree is also a rule which displays the number lines, breakpoints, and code errors of the service.

Adding Steps

There are five different ways to add a step:

  • using the toolbar

    1. Click the plus-shaped green button in the toolbar.
    2. Click one of the menu items below to indicate the type of step you want to add.

    Adding a step via the add-step button in the toolbar

    Adding a step via the add-step button in the toolbar

  • using the context menu

    Do a right click on the step tree, select Add, and then click on the type of step you want to add.

    Adding a step via the step tree context menu

    Adding a step via the step tree context menu

  • using keyboard shortcuts

  • via dragging and dropping

    With dragging and dropping, you can either add a step or duplicate existing ones.

    To add an Invoke Step, select one or more services from the Coder Navigator view and then drag and drop them onto the step tree.

    To duplicate existing steps, select the steps you wish to duplicate and then drag and drop them onto the step tree while pressing .

    Adding an Invoke Step via drag and drop

    Adding an Invoke Step via drag and drop

  • via content assist

    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 you want to add or the name of the service to invoke.

    If you've got a step selected while triggering content assist to add a new step and if the selected step can have children, then the new step will be added under it; otherwise, it will be added after the selected step. Pressing while adding the step forces it to be added after the selected step. If no step is selected while adding a step via content assist, the new step will be placed at the end of the Gloop Service.

Deleting Steps

There are three different ways to delete a step:

  • using the toolbar

    Select all steps you want to delete and then click on the red 'x' button in the toolbar.

    Delete button for steps in the Gloop Service Editor toolbar

    Delete button for steps in the Gloop Service Editor toolbar

  • using the context menu

    Select all the steps you want to delete, right click, and then select Delete from the appearing context menu.

    Deleting steps via the context menu

    Deleting steps via the context menu

  • using keyboard shortcuts

    Select the step and then press to remove the selected step.

Moving Steps

You can move steps around in order to refine the sequence of actions your Gloop Service will execute. Steps can be moved up, down, left, or right. Moving up or down would mean the step will move one line upwards or downwards, respectively; switching places with the step that comes before or after it. Moving left would prompt Coder to remove the step from its current parent and consequently transfer it under the first composite step2 below it. Moving right would prompt almost the same action except the step will be transferred under the first composite step above the selected step.

There are three ways to move steps:

  • using the toolbar

    To move steps using the toolbar, click on the step(s) you want to move and and then click on one of the arrowhead-shaped buttons.

    Buttons for moving steps in the Gloop Service Editor toolbar

    Buttons for moving steps in the Gloop Service Editor toolbar

    Here is a short demonstration:

    Moving a step using keyboard shortcuts

    Moving a step using keyboard shortcuts

  • using keyboard shortcuts

  • via dragging and dropping

    1. Select all steps you want to move; you can select multiple steps by holding while clicking on them.
    2. Drag and drop them in-between or on top of other composite steps (in the same service or of a different Gloop Service).

    By default, dragging and dropping to another place will remove the steps from their original location; but if the key is pressed while doing so, the steps will be duplicated instead.

    Using drag and drop to move Gloop Steps

    Using drag and drop to move Gloop Steps

Editing Step Properties

You can further configure steps via editing their properties. Step properties are displayed in the Properties view; the properties of a step appear in the view when you select it in the tree. By default, the Properties view is located 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 .

For steps, the Properties view has two sections:

  • General, where all the step properties are listed; and
  • Comments, where you can conveniently edit or view comments for step.

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 . To reset a property to null or its default value, right click on it and then click Reset or press .

Editing step properties

Editing step properties

It is also possible to edit some of the step properties without using the Properties view. To do this, select the step and:

  • Press to edit the Label property.
  • Press to edit Comments.
  • Press or double-click the step to edit the Expression property (for steps with an expression only) or to add or edit the Set Expression.

Learn more about steps and step properties by reading this page

Gloop Services also have properties; to show them, either click on any empty space in the step tree or click the table-shaped button located in the toolbar. The Properties view will have three sections, each toggleable via the corresponding tab:

  • General for general service properties
  • Comments for comments about the service
  • REST, for setting ad-hoc REST endpoint properties

Learn more about Gloop Services and their properties by reading this page

Expression Dialog

The Expression dialog is the dialog used to edit steps with expressions like the Fork Step, While Step, Break Step, Set Expression Step, 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 properties available for use in the step.

When writing Groovy code, it is possible to trigger content assist by pressing or . This feature provides the developer with a list of accessible variables, methods, data types, keywords, and constructs based on the context of the current code3.

It is also possible to use the model tree on the right to write a property name in the expression; you can do this by either double-clicking on it or by selecting the property and copy-pasting (, ) it. Doing it this way writes the entire path of the property in the expression so that it may be accessed.

Your Groovy code will also be validated and checked 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 while others cannot be (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 toggles the evaluated property from true to false when within the Expression dialog.

Gloop Service Editor _Expression_ dialog

Gloop Service Editor _Expression_ dialog

Content-assist is only supported in Coder Studio

Step Decorations

Each step is decorated with a different icon and label in the step tree. This is to help developers easily infer information about the step.

Map Step Decoration

When a Map Step has only one declared variable, no Map Lines, or has one Set Expression, it is displayed as:

1
Declare <declared property>=<expression>

... or

1
Set <declared property>=<expression>

Map Step, as seen in the step tree

Map Step, as seen in the step tree

The Map Lines of a Map Step or Invoke Step, as well as Set Expressions are displayed under the step in the step tree when it is expanded; it can be used to delete or edit the Map Line or Set Expression. When double-clicking a Map Line, it opens the Mapper view and selects the line; similarly, double-clicking a Set Expression opens the Expression dialog.

Evaluated Set Expressions

When a Set Expression is evaluated, a yellow dot icon is visible next to it.

Priority property

Map Lines and Set Expressions are, by default, ordered by their Priority property. You can disable this option by clicking on the filter-shaped icon in the toolbar and un-checking the Show Map lines and Set steps item.

Hiding map lines in the step tree

Hiding map lines in the step tree

Fork Step and Break Step Decoration

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

1
Fork <expression>

Fork Step, as seen in the step tree

Fork Step, as seen in the step tree

Iterate Step Decoration

When an Iterate Step has both an input and output array, it will be displayed like so:

1
Iterate <input array> → <output array>

If it only has an input array, it will be displayed as:

1
Iterate over <input array>

If it only has an output array, it will be displayed as:

1
Iterate over → <output array>

Iterate Step, as seen in the step tree

Iterate Step, as seen in the step tree

While Step Decoration

A While Step's expression is displayed in the step tree like so:

1
While <expression>

While Step, as seen in the step tree

While Step, as seen in the step tree

Gloovy Step Decoration

When the script of a Gloovy Step is short enough, it is displayed next to the step like so:

1
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 by clicking on the filter-shaped icon in the toolbar and then un-checking Show Gloovy script line.

Gloovy Step, as seen in the step tree

Gloovy Step, as seen in the step tree

Copying script lines

When the script of a Gloovy Step is shown in the step tree, each line in the script is numbered and rendered selectable by Coder. To copy lines of code from the script, simply select lines you want to copy and then press the copy shortcut or do a right-click and then select Copy.

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 or Invoke Step icon.

Asynchronous step, as seen in the step tree

Asynchronous step, as seen in the step tree

Invoke Steps Decoration

The invocation signature (or method signature) of an Invoke Step is comprised of the service's return type, name, input parameters, and exceptions; it is displayed like so:

1
<return type> <service namespace>( <parameter1>, <parameter2>, ... ) throws <exceptions>

If a parameter is assigned via a Map line, Set Expression, or has a default value, it will be visible in the signature; in case the parameter is unassigned, 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 by clicking on the filter-shaped icon in the toolbar and un-checking Show method signatures.

The name and value of each parameter is also indicated in the signature, <parameter name>: <parameter value>, making the invocation easier to read. This option can be disabled by clicking on the filter-shaped icon in the toolbar and un-checking Show named parameters.

Invoke Step, as seen in the step tree

Invoke Step, as seen in the step tree

Copying and Pasting Steps

It is possible to copy the steps of one Gloop Service and paste them to the same service (albeit to a different line) or a different Gloop Service. To copy and paste steps:

  1. Select the steps you want to copy.
  2. Press or do a right-click > Copy.
  3. Select another step or Gloop Service.
  4. Press or or do a right-click > Paste.

It is also possible to copy and paste plain JSON text to create steps. For example, copying the JSON string below and pasting it in the step tree will create a new Map Step.

Coder Studio-supported only

This feature is only supported in Coder Studio as of this version.

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

Copying and pasting JSON text to create a new step

Content Assist

Coder supports content assist to help boost productivity when writing Gloop Services. Using content assist, you can generate pre-configured steps and/or be guided through their configuration.

To trigger content assist, simply press ; a pop-up appear right under the line where you hit the key. This pop-up is composed of a search text field and a list of proposals. Proposals are possible content that can be injected based on the current code context; they have a name and a category. Proposals can be searched by their complete names or short names4. Meanwhile, categories can be cycled through to filter the proposals by simply pressing ; at the bottom right, the next category is indicated.

Here are the available 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

You can use the and arrow keys to navigate through the proposals whilst still having focus on the search text field so you can search and select at the same time.

When a proposal is selected, a contextual pop-up will appear on the side to give some additional information about the selected proposal. Pressing 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 key while pressing forces the steps to be added after the selected step.

Content assist in the Gloop Service Editor

Content assist in the Gloop Service Editor

Code without your mouse!

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 selected, and if it's the right one, press . Pressing while the first proposal is selected will jump to the last proposal. Some proposals have short names, for example the try-catch-finally proposal can be searched using the text tcf.

Templates

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

Using content assist templates in the Gloop Service Editor

Using content assist templates in the Gloop Service Editor

Below 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 iterates 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 pre-configured Iterate Step with an input and output array.

Block Step Type Template

To generate a Block Step, simply type try catch, try catch finally or try finally and select any of these templates from the content assist pop-up. These templates can be searched using their respective initial letters like tc, tcf, tf, respectively.

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, where you should enter the message to be logged.

The template generates an Invoke Step which invokes the chosen LoggerMethods method and adds 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 press to select it.
  2. The content assist pop-up will appear again; this time, select a step which will be executed if the expression evaluates to true. The step you will choose will have the label of true.
  3. The content assist pop-up will appear again; this time, select a step which will be executed if the expression evaluates to false. The step you will choose will have the label of false.
  4. The Expression dialog will appear, where you should then enter the expression of the Fork Step.

Input Output View

The Input Output view, located on the bottom left of Coder by default, 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 .

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 selected; it displays 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, top right of the Input Output view.

Renaming and deleting

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

Mapper View

The Mapper view, located on the bottom right of Coder by default, 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 .

The Mapper view has two different layouts; which gets chosen is dependent on the currently selected step.

For Map Steps, the view is divided such that it contains the following components:

_Mapper_ view layout for Map Steps

_Mapper_ view layout for Map Steps

  1. The input model tree, which shows all the input properties available to the step
  2. The output model tree, which shows all the output properties available at that step
  3. The canvas displaying the Map Lines between the input and output model tree

For Invoke Steps, the view is divided such that it contains the following components:

_Mapper_ view layout for Invoke Steps

_Mapper_ view layout for Invoke Steps

  1. The input model tree, which shows all the input properties available to the step
  2. The Invoke Step input model tree, which shows all the input properties of the Invoke Step
  3. The canvas displaying the input Map Lines
  4. The Invoke Step output model tree, which shows all the output properties of the Invoke Step
  5. The output model tree, which shows all the output properties available to the step
  6. The canvas displaying the output Map Lines

Asynchronous Invoke Step

If an Invoke Step is configured to run asynchronously, 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 on the other propery and then a Map Line is created

Illegal mappings

Certain model property types can only be mapped to strings, objects, or other model property types. In any case, Coder will display an error message when attempting to do an illegal mapping.

Mapping a property to another

Mapping a property to another

Multi-mapping

It is possible to map multiple properties at once. To do so, select all properties from the output model tree and then drag them to the opposite model tree and drop them; multiple Map Lines will be created.

Mapping multiple properties in Coder Studio

Set Expressions

Set Expressions can be added on properties in both input and output Invoke Step model trees. To add or edit a Set Expression:

  1. Select a property.
  2. Double-click it or press or .
  3. The Expression dialog will appear; enter the expression. Your expression is either a plain string or Groovy code (if the expression is to be evaluated).
  4. Click the OK button or press to save the expression.

Adding a Set Expression

Adding a Set Expression

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

Set Expressions, as seen in the Mapper

Set Expressions, as seen in the Mapper

Meanwhile, to delete a Set Expression:

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

Deleting a Set Expression in Mapper

Deleting a Set Expression in Mapper

Nested properties with Set Expressions

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.

Setting the value of a Gloop Model

The Set Expressions of Gloop Model properties are evaluated by default, the reason being Gloop Model properties can have their values set using a DSL. A DSL makes it very easy to set all the properties of a model; and to make things better, there's a template for generating DSLs for Gloop Models.

  1. Select a Gloop Model property.
  2. Open the Expression dialog.
  3. Press and then select the Gloop Model DSL template proposal.
  4. The Groovy Gloop Model DSL will be generated; press to jump from one value to another.

Creating a DSL to set the value of a Gloop Model

Declaring Properties

Declaring model properties is only possible in the output model tree of the Mapper view. Declaring and deleting properties in Mapper is similar to adding and deleting properties in the Input Output view. Shortcuts, context menus, and content assist are used in the same way to declare properties with one exception: it is only possible to declare a new property if the targeted model allows extra properties.

Declaring a property in Mapper

Declaring a property in Mapper

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

Map and declare in one go!

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

Declaring and mapping in one move

Unloading Properties

To unload a declared property:

  1. Select one or more declared properties.
  2. Press or do a right click on the property (or on any of the properties, if multiple) and then click Unload Property.

The process is the same to reload the declared properties.

Unloading a property

Unloading a property

When a declared property is unloaded, a trash bin icon is displayed near the property.

Shortcuts

Command Description Shortcut
Add Map Step Adds a Map Step at the current selection
Add Fork Step Adds a Fork Step at the current selection
Add Block Step Adds a Block Step at the current selection
Add Iterate Step Adds a Iterate Step at the current selection
Add While Step Adds a While Step at the current selection
Add Break Step Adds a Break Step at the current selection
Add Gloovy Step Adds a Gloovy Step at the current selection
Add Concurrent Step Adds a Concurrent Step at the current selection
Add Random Step Adds a Random Step at the current selection
Delete Step Deletes the selected steps
Enable/Disable Step Enables or disables the selected steps
Edit Step Label Edit the selected step label
Edit Step Comments Edit the selected step comments
Move Step Up Moves the selected steps up
Move Step Down Moves the selected steps down
Move Step Left Moves the selected steps left (out of the parent step)
Move Step Right Moves the selected steps right (into the parent step)
Edit Expression Edits the expression of the selected step or adds or edits a Set Expression of a Map or Invoke Step
Unload Property Unloads or reloads the selected declared properties
Content Assist Triggers content assist
Open Declaration Opens the file of the service invoked by an Invoke Step
Find References Finds references of the selected Invoke Step's service
Quick Fix Triggers quick fix
Refresh Refreshes the selected Invoke Step input and output models
Show/Hide Comments Shows or hides the step comments
Copy Copies the selected steps
Cut Cuts the selected steps
Paste Attempts to paste the clipboard as steps at the current selection
Show Properties View Shows the Properties view
Show Input Output View Shows the Input-Output view
Show Mapper View Shows the Mapper view

Customize shortcuts

The shortcuts listed above are the default keyboard shortcuts for TORO Coder Studio. You can modify these key-action mappings by opening the Preferences menu, expanding General, and then clicking on Keys.

Command Description Shortcut
Add Map Step Adds a Map Step at the current selection
Add Fork Step Adds a Fork Step at the current selection
Add Block Step Adds a Block Step at the current selection
Add Iterate Step Adds a Iterate Step at the current selection
Add While Step Adds a While Step at the current selection
Add Break Step Adds a Break Step at the current selection
Add Gloovy Step Adds a Gloovy Step at the current selection
Add Concurrent Step Adds a Concurrent Step at the current selection
Add Random Step Adds a Random Step at the current selection
Delete Step Deletes the selected steps
Enable/Disable Step Enables or disables the selected steps
Edit Step Comments Edit the selected step's comments
Move Step Up Moves the selected steps up
Move Step Down Moves the selected steps down
Move Step Left Moves the selected steps left (out of the parent step)
Move Step Right Moves the selected steps right (into the parent step)
Edit Expression Edits the expression of the selected step or adds/edits a Set Expression of a Map or Invoke Step
Unload Property Unloads or reloads the selected declared properties
Content Assist Triggers content assist
Open Declaration Opens the file of the service invoked by an Invoke Step
Find References Finds references of the selected Invoke Step's service
Quick Fix Triggers quick fix
Refresh Refreshes the selected Invoke Step's input and output models

  1. As opposed to Flat File Descriptors or Gloop SQL Services

  2. In other words, a step that can contain children. 

  3. Content assist, Wikipedia

  4. Such as abbreviations