LogoLogo
Home
Core Platform
Core Platform
  • Introduction
    • Overview
    • Use Cases
    • Architecture
    • Built with ML & AI
    • Quick Start
  • Examples
    • Training Examples
      • API Flow Examples
      • Microservice Examples
      • UI Example
      • Exercise: Hello World API
      • Exercise: Test State
      • Exercise: Test UI
    • Exercise: To-do List
      • To-do List Runner
      • To-do List Gateway
      • To-do List UI
      • To-do List Query
  • Troubleshooting
    • Rierino Packages
    • Release Notes
    • Useful Checks
    • Error Codes
  • Devops
    • Overview
    • API Flows
      • Using the Saga Screen
      • Defining a Saga
      • Configuring Saga Steps
        • Event Step
        • Transform Step
          • Transform Classes
        • Condition Step
          • Condition Classes
        • Step Link
      • Injecting Variables
    • Microservices
      • Runners
        • Using the Runner Screen
        • Defining a Runner
        • Managing Runner Settings
        • Adding Runner Elements
        • Deploying Runners
          • Spring Runners
          • Samza Runners
          • Camel Runners
      • Elements
        • Systems
        • State Managers
          • Typical Use Cases
          • State Data Structure
          • Local States
            • In-Memory Map
            • Caffeine Cache
            • Samza Based
            • Lucene Based
            • Single File
            • Multiple Files
            • Selected IDs Map
            • Indexed Map
          • Shared States
            • MongoDB Collection
            • Jooq (SQL) Table
            • Redis Map
            • Couchbase Collection
            • Elasticsearch Index
            • Elasticsearch Joined
            • Etcd Namespace
          • Specialized States
            • CRUD Service
            • Odata Service
          • State Coordinators
            • Lazy Cache Coordinator
            • Event Store Coordinator
            • Write thru Coordinator
          • Loading Strategies
          • ID Generators
        • Listeners
        • Query Managers
          • MongoDB
          • Elasticsearch
          • Lucene
          • SQL Based
          • Odata Service
        • Handlers
          • Core Handlers
            • Write Data
            • Read Data
            • Query Data
            • Apply Rules
            • Call Rest API
            • Generate Text/Html
            • Parse Html
            • Generate Secrets
            • Orchestrate User Task
            • Perform File Operation
            • Run Shell Command
            • Send/Receive Emails
          • Custom Code Handlers
            • Run Scripts
            • Run Java Code
            • Run Java Package
          • Flow Handlers
            • Orchestrate Saga
            • Loop Each Entry
            • Run Multiple Steps
            • Buffer Payloads
            • Merge Parallel Steps
            • Log Event
            • Send Event
            • Validate Event
            • Transform Event
            • Perform DB Transaction
            • Trigger Runner Command
            • Do Nothing
            • Modify Role Data
            • Enrich Role Data
            • Convert Pulse to Journal
          • Gateway Handlers
            • Authenticate
              • No Authentication
              • State Based
              • Keycloak Based
            • Sessionize
          • Specialized Handlers
            • Apply Advanced Rules
            • Calculate Real-time Metrics
            • Score ML Models
            • Score LangChain Models
            • Service MCP Requests
            • Service A2A Requests
            • Consume Web of Things
            • Perform Text Embedding
            • Run Python Procedure
            • Generate Excel
            • Generate PDF
            • Call SOAP API
            • Integrate with Camel
        • Actions
        • Streams
          • Kafka Topic
          • CDC Feed
          • Camel Component
        • Roles
        • Generic Settings
        • Global Settings
      • Deployments
        • Defining a Deployment
        • Alternative Loaders
    • Gateway & Security
      • Gateway Servers
        • Gateway Systems
        • Gateway Channels
        • Gateway Services
        • Gateway Tokens
      • APIs
        • OpenAPI Specification
        • Response Formats
    • Administration
      • Managing Deployments
      • Sending Commands
      • Streaming Messages
      • Migrating Assets
    • Batch Tasks
      • Python Processes
      • Python Iterators
      • Python Processors
    • Pro-Code
      • Custom Handlers
      • Custom State Managers
      • Custom Query Managers
      • Custom CDC Managers
  • Design
    • Overview
    • User Interface
      • Apps
      • UIs
        • Listers
        • Widgets
          • Value Widgets
          • Array Widgets
          • Object Widgets
          • Indirect Widgets
          • Atom Widgets
        • Menus
          • Lister Menu Actions
          • Selection Menu Actions
          • Editor Menu Actions
          • Widget Menu Actions
          • Custom Menu Actions
          • RAI Menu Actions
        • Extended Scope
          • Conditional Display
          • Data Context
          • Extra Data
          • Default Item
          • Extra Events
      • Options
      • Translations
      • Icons
      • Styles
      • Components
    • API Mapping
    • Data Schema
      • Common Data
  • Configuration
    • Overview
    • Queries
      • Query Types
      • Query Platforms
        • MongoDB Queries
        • Odata Queries
        • SQL Queries
        • Elasticsearch Queries
        • Lucene Queries
        • Siddhi Queries
    • Business Rules
      • Drools Rules
    • Dynamic Handlers
  • Data Science
    • Overview
    • ML Models
      • Scheduler Platforms
        • Airflow Scheduler
    • GenAI Models
    • MCP Servers
    • Complex Event Processing
      • Siddhi Data Flows
    • Data Visualizations
    • Customizations
  • EXTENSIONS
    • JMESPath
    • Handlebars
Powered by GitBook

© Rierino Software Inc. 2025. All rights reserved.

On this page
  • Open the Element Screen
  • Create a State Element
  • Create a Runner
  • Define the Runner
  • Add Runner Elements
  • Deploy the Runner
  • Create a Deployment
  • Trigger the Deployment
  • Test Your Runner
  1. Examples
  2. Exercise: To-do List

To-do List Runner

First step in building this application will be development of the runner, which will facilitate read/write operations to a MongoDB collection.

PreviousExercise: To-do ListNextTo-do List Gateway

Last updated 3 months ago

Open the Element Screen

Open the screen from your app. Unless you've modified your implementation, this screen is located at https://[YOUR_ADMIN_UI_DOMAIN]/app/devops/common/element.

Create a State Element

Next, you will create the configuration for a new data store which will maintain to-do list records in a MongoDB collection.

Click on "CREATE NEW" button on top of the menu lister of Element screen. This will clear the contents of Element design page, and allow you to create a new Element from scratch.

Provide a unique identifier to your new element from top left corner marked with "ID: " tag and a pencil icon. For this example, we are using "state-todo-0001" as the id.

Enter the following details from "DEFINITION" and "STATE DEFINITION" tabs and save:

  • DEFINITION

    • Element Name: Todo

    • Element Type: STATE

    • Element Status: ACTIVE

    • Element Description (optional): Example todo list data store

  • STATE DEFINITION

    • Manager: Mongo State Manager

    • System: mongo_master

    • Collection: todo

Why do you need Elements?

Elements provide reusable building blocks for runners. Without such an element structure, you would need to define all configurations, settings and parameters within the runners, which would mean replications and maintenance issues for systems, states or handlers shared between different runners.

Create a Runner

Next, you will create a new runner, which will be responsible for executing read/write operations on the new todo state you defined.

Click on "CREATE NEW" button on top of the menu lister of Runner screen and provide the unique identifier "todo-0001".

Define the Runner

Click on the circled edit icon for displaying Runner definition screen.

Enter the following details on displayed screen for describing your new Runner graph:

  • Runner Name: Todo

  • Runner Status: ACTIVE

  • Runner Domain (optional): admin

  • Base Runners: Base CRUD

  • Runner Description (optional): This is an example runner for todo list management.

These settings will mean that the new runner will inherit features from the "Base CRUD" runner, making it possible to perform standard CRUD operations with default read, write handlers.

For this example, you do not need to set I/O or Settings details. Click on the close icon on top right corner to apply changes.

Add Runner Elements

From the stencil, drag and drop a System element to the runner graph.

Similarly, drag and drop , a State element from the stencil. Your graph should look like the following after these actions:

Select System Element

Click on the System element and you will see an edit icon displayed on its top left corner, click on it to edit element details as follows:

  • Element: system-mongo_master-0001

  • Member Type: OPERATION

  • Alias: mongo_master

  • Description(optional): MongoDB system for master collections

These settings will add the predefined "system-mongo_master-0001" system element to the runner with "mongo_master" alias. This assigned alias automatically links the system to related other elements (such as the State element).

Why do you need Aliases?

We use aliases in addition to element ids when assigning elements to runners. This allows us to replace core elements such as Systems when needed without having to update all other elements dependent on them. It also allows reusing same elements multiple times within a runner, which can be preferred for organization or configuration purposes (e.g. using 2 copies of the same Handler with different parameter overrides).

If you click on the "ELEMENT" tab, you can see parameters assigned to this elements during its initial definition.

Click on APPLY button to apply changes and close the dialog.

Select State Element

Next, edit the State element in a similar way, with the following details:

  • Element: state-todo-0001 (as created in earlier step)

  • Member Type: OPERATION

  • Alias: todo

  • Description (optional): State for todo list records

Click on APPLY button to apply changes and close the dialog.

Deploy the Runner

Once your runner is defined, next step is to deploy it to get it up and running. It is possible to deploy multiple runners within a single deployment package, but for this example, you will be deploying the runner as a stand-alone package.

Deployment from within Rierino UI is not enabled for Sandbox deployments. For deploying new runners in sandboxes, they can be added to the existing adminrunner deployment and the Docker container can be restarted to enable the runner. This section focuses on regular K8s deployments.

Create a Deployment

Click on "CREATE NEW" button on top of the menu lister of Deployment screen and provide the unique identifier "example-0001".

Fill in the "DEFINITION" tab with following details:

  • Name: Example Runners

  • Status: ACTIVE

  • Description (optional): Deployment package for execution of example runners

  • Runners:

    • Name: todo

    • Class: CRUD Runner

    • Element: todo-0001

    • Deployment Version: 1

Why do you need a Deployment?

Runners define "how" and "what" of microservices to be used, providing an abstraction over "where" these services are deployed. This approach allows separation of configuration and infrastructure responsibilities, while allowing deployment of same runners in different servers (e.g. for multi-national deployments, replication). It also allows coupling of multiple runners into single deployment, for microservices that do not require heavy resources.

Next, switch to the "PARAMETERS" tab and enter the following parameter key-value pairs:

  • rierinoVersion: 0.1.1

  • template: spring

  • namespace: admin-backend

  • pool: admin-node-pool

These settings specify the Rierino core libraries and settings to deploy, as well as the Kubernetes namespace and node pool to utilize for creating this runner.

You can increase scalability of your runner by setting replicaCount parameter to 2 or more, or increase its log level by setting logLevel to "DEBUG".

Click on SAVE button to finalize creation of the deployment.

Trigger the Deployment

Next, from the dropdown menu on top right side of the Deployment screen, click on "DEPLOY" button.

This will automatically trigger a deployment request and you will receive a notification of successful delivery of the request.

Test Your Runner

In case you have access rights to your infrastructure, you can check deployment status of your Runner through the Jenkins interface as well as Kubernetes management portal of your cloud service provider.

If you don't wish to wait for setting up the gateway access as described in next section, you can use kubectl commands for this test as follows:

kubectl exec -ti --namespace=admin-backend deployment/runner-example-0001-deployment -- /bin/bash

This will establish connection to your deployed runner, from which you can do REST calls using curl:

#Following should return status:"UP"
curl localhost:1235/actuator/health

#Following should return details of the new record created
curl -X POST -H "Content-Type: application/json" -d '{"data": {"name": "Take out trash", "project": "Personal"}}' localhost:1235/api/todo/todo/1

#Following should return a list including the new record created
curl localhost:1235/api/todo/todo

These settings will mean that this state will be managed by a using connection settings provided by the already existing "mongo_master" system element and records will be stored in a collection named "todo".

Click on the Runner icon on navigation bar to switch to the screen on your app. Unless you've modified your implementation, this screen is located at https://[YOUR_ADMIN_UI_DOMAIN]/app/devops/common/runner.

First, open the screen from your app. Unless you've modified your implementation, this screen is located at https://[YOUR_ADMIN_UI_DOMAIN]/app/devops/common/deployment.

These settings assign 1 runner with "todo-0001" identifier, which is created in previous steps to this deployment. Runner name has various uses, such as log labeling, targeting runners for commands, forming URL paths, as well as application / consumer naming. Runner class defines the type of to be used for execution (such as CRUD, RPC, Socket or Samza). Deployment version is useful when multiple versions of a runner needs to be running at the same time (e.g. during a systems migration).

Once the runner is up and running, you can use to test its status using your new runner's endpoints for read / write operations on your todo list records. By default, all runners in K8s are deployed in a secure cluster without exposing a public endpoint and are only accessible from within that cluster or through the

MongoStateManager
Runner
Devops
Deployment
Devops
Runner
Gateway Servers.
Element
Devops
Element Screen
Create New Button
State Definition Tab
Runner Screen
Definition Button
Runner Definition Screen
Runner Stencil
Runner Elements
System Selection Screen
System Element Screen
State Selection Screen
Deployment Definition Screen
Deployment Parameters Screen
Deployment Action Menu