Skip to content

Home

Introduction

Development

Overview

IDEs

Services

Service manager

API Explorer

Gloop Mapper view

The Mapper view, visible at the bottom part 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. You can also 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

Mapping multiple properties in Coder Cloud

It is also possible to map and create a property in one move. You can do this by selecting a property, and while pressing in macOS (Alt in Windows or Linux), drag it to the opposite model tree and then drop it. The created property will either be at the input model or output model of the service. Alternatively, you can do this via context menus: just right-click a property then select the Add Property and Map menu item.

Adding a property and mapping

To make things easier and quicker for you, you could try mapping properties via content assist. You can do this either in the Mapper view or the step editor.

When mapping properties via the step editor, you must:

  1. Select a map step or invoke step in the step tree.
  2. Press the key.
  3. If it's an invoke step, select either Input or Output. Otherwise, ignore this step.
  4. Select the property to map.
  5. Select the property that maps the previous selected property.

Mapping a property using content assist in step editor

Mapping a property using content assist in step editor

Meanwhile, the steps for mapping properties via content assist in the Mapper view are:

  1. Select a property from the input or output tree.
  2. Press the key.
  3. Select Map to or Map from.
  4. Select the property to map it to or from.

Mapping a property using content assist in Mapper

Mapping a property using content assist in Mapper

Set expressions

Set expressions can be added on properties in both input and output invoke step 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

Alternatively, you can add or edit a set expression using content assist. To do this:

  1. In the step editor, select a map step or invoke step.
  2. Press the key.
  3. Select Set expression.
  4. If it's an invoke step, select either Input or Output. Otherwise, ignore this step.
  5. Select a property whose expression you want to set.
  6. The Expression dialog will appear; enter the expression. Your expression can either be a plain string or Groovy code (which requires the expression to be evaluated).
  7. Click the OK button or press to save the expression.

Set expression using content assist in Step editor

Set expression using content assist in Step editor

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 model DSL template proposal.
  4. The Groovy-based 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 in macOS (or Ctrl in Windows and Linux), 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. There is also a context menu that does this just by right-clicking a property then select Declare Property and Map menu item.

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.