API Flow Examples

These flows can be viewed from Saga screen in Devops app, grouped under training domain

/train_ping

This is the simplest API flow, connecting start step to a success step, returning request contents back as a response.

Ping Flow

/train_hello

Another simple example, returning "Hello World" as a message in output with a transform step.

Hello Flow

/train_redirect

This is a API flow redirect example, using train_hello saga without providing any flow of its own.

Redirect Mapping

/train_condition

This example includes conditional logic with step link configurations and both success & fail steps.

Condition Flow

/train_get

Using a local read event handler, this example returns a record from the 'dummy' state manager by id.

Get Flow

/train_set

Using a local write event handler, this example writes a given record to the 'dummy' state manager.

Set Flow

/train_query

Using a local query event handler and a query named "Dummy Search", this example returns a list of records filtered by their name.

Query Flow

The query is accessible from Query screen of Configuration application.

Dummy Search Query

/train_rest

Using a local rest event handler and a system definition, this example makes a GET request to a remote system.

Rest Flow

/train_pattern

Similar to train_rest, this example makes a GET request to a remote system, but transforming input and output using patterns in event metadata parameters.

Pattern Parameters

/train_secret

Example for encrypting a given value and decrypting it back with a pre-configured key.

Secret Flow

/train_script

Executes a custom Groovy script which replicates the parameters provided in input as output.

Script Flow

The script itself is configured using the code editor accessible in Configuration application.

Executed Groovy Script

/train_template

Renders a Handlebars template for provided name, surname parameters.

Template Flow

The template itself is configured using the code editor accessible in Configuration application.

Rendered Handlebars Template

/train_hft

Allows real-time compilation and execution of Java event handlers for testing and development purposes.

HFT Flow

The class itself is configured using the code editor accessible in Configuration application.

Dynamic Java Class

/train_rule

Allows evaluation of a set of rules for the given input and outputs the decided value.

Simple Rule Flow

The rule list for calculation is configured using the rule records accessible in Train application.

Rule Configuration

/train_mock

Returns an example response, mocking a currently unimplemented endpoint.

Mocking Configuration

Last updated