Skip to content

Home

Development

IDEs

API Explorer

Releases

Release notes

Martini Runtime

Martini Desktop

Martini Online

Feature requests

Bug reports

Setting inputs for your Flux

Flux inputs are set through the Input side of the Input/Output view. To add an input property to your Flux service:

Setting Flux service inputs

Setting Flux service inputs

  1. Go to the Input/Output view.
  2. While on the Input side, click the add button and select the type of input you want to add.
  3. Set input name to anything you like.

To use the input in one of your Flux states, select a state. Under the Mapper view, create a mapping from the service input to a state input or create a set expression for the state input and use the service input in the expression.

Mapping service input to state input

Mapping service input to state input

To test, run the workflow. By default, you will be asked to provide values for the input of your service. Type anything you like and then proceed to running the service.

Running Flux with inputs

Running Flux with inputs

With that, you could provide data to kick off your workflow. These inputs could be anything from simple strings to Gloop models. The data here becomes available to all states. But most times however, your states will be doing something more useful than just printing out a message to the console. Each state would have inputs to work with and outputs to pass around and make decisions from.

Injectable input properties

When a service is made invokable via HTTP or used in a Martini endpoint, additional input variables can be injected for further use. All you need to do is declare the input variables needed by your service and ensure they are named accordingly. Martini won't inject arguments for parameters which do not follow expected parameter names.

Example injectable input variables are:

There are multiple other injectable input properties. In Flux, they include arguments that can be injected to services called by Martini endpoints, listed and described in every endpoint type's respective page.

Injecting input properties

To inject an argument in Flux, you must declare the variable under the Input/Output view. You can use the designated hotkeys or do a right click, pick a type, and then rename the variable. In Gloop and Flux, the names of injectable arguments must be prepended by the $ character. From there, you can use the parameter by passing data between states.