Setting inputs for your Flux
- Under the Flux Input/Output view's Input panel, click on the add button and select the type of input you want to add to your Flux. In this case, click on Add String because we want a string input.
- Set the input name to anything you like. For this example, we'll use
greeting
. - To use the input in one of your Flux states, select the target state and under the Mapper view, create a line
from the input to the target state service parameter. In our case, we'll map
greeting
tomessage
.
To test, run the workflow. This time, you will be asked to provide the inputs you added to your service. Type anything you like and then click Run.
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 an Integrate 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. TORO Integrate won't inject arguments for parameters which do not follow expected parameter names.
Example injectable input variables are:
HttpServletRequest
object which contains the details of the HTTP request that triggered the service; andESBPackage
object which contains the details of the Integrate package containing the service.
There are multiple other injectable input properties. In Flux, they include arguments that can be injected to services called by Integrate 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.