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.

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

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

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

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

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

/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.

The query is accessible from Query screen of Configuration application.

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

/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.

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

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

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

/train_template
Renders a Handlebars template for provided name, surname parameters.

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

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

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

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

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

/train_mock
Returns an example response, mocking a currently unimplemented endpoint.

Last updated