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 Query Screen
  • Create a Query
  • Create a Saga
  • Test your Query
  • Update your UI
  1. Examples
  2. Exercise: To-do List

To-do List Query

To make your to-do list more manageable, next you can make add query functionality.

PreviousTo-do List UINextRierino Packages

Last updated 3 months ago

Open the Query Screen

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

Create a Query

Next, you will create a new Query, which will run on your already existing MongoDB system.

Click on "CREATE NEW" button on top of the menu lister and enter "todo" to ID field. We will reference this id when making requests for its execution.

Enter the following details on "DEFINITION" tab:

  • Query Name: Todo

  • Query Status: ACTIVE

  • Query Description (optional): Example query for searching todo list by "project" field.

  • Query Type: SIMPLE

  • Query Platform: MONGODB

  • Source Table: todo

Next, switch to the "WHERE" tab, hover on the plus icon and select "Simple" option to add a simple where condition. You will see a new entry with "Enter condition details" label. Hover on this entry and click on the edit icon to fill in condition details as follows:

  • Use a Function: false

  • Expression: data.project

  • Operator: EQUALS

  • Value: %%project%%

Save your query.

Create a Saga

We are not utilizing the new runner created in previous sections, since we defined it as a CRUD type runner, which is allowed to process only standard CRUD operations. As an alternative, you could also create a new runner for RPC type requests.

Start by opening the Saga screen from your Devops app and creating a new Saga flow as follows:

  • Saga Name: Search Todos

  • Status: ACTIVE

  • Saga Path: /SearchTodos

  • Version: 0

  • Allowed On: saga

  • Saga Domain: util

Next, add Start, Event and Success steps from the Saga stencil and link them to create the flow.

Click on the link connecting Start and Event steps and click on the edit icon displayed to modify this link as follows:

  • Stream: local

Setting stream to "local" means that we will be executing this Event step locally, instead of assigning it to a remote runner. When this value is set to anything other than "local", it is passed on to a remote runner through REST calls or Kafka topics.

Next, click on the Event step and click on the edit icon displayed to define this step as follows:

  • DEFINITION

    • Step Name: Get Project Todos

  • EVENT META

    • Event Version: 0

    • Event Action: GetQuery

    • Event Domain: master

    • Input Element: parameters

    • Output Element: $

    • Parameters Map:

      • Key: queryId

      • Value: todo

After you apply these changes click on SAVE button to activate this Saga.

Test your Query

Now, you can access your query functionality using your favorite API client on the following URL:

GET https://[YOUR_ADMIN_API_DOMAIN]/api/request/rpc/SearchTodos?project=Personal

You should receive the task you've created earlier, which had "data.project" set to "Personal".

Update your UI

Now that you can query your todo list, you can update your todo UI to allow users search todos belonging to a specific project.

First, open the Todo Source screen from your Design app (i.e. https://[YOUR_ADMIN_UI_DOMAIN]/app/design/common/source?id=todo). Add the following to "Urls" table:

  • Action: query

  • URL: request/rpc/SearchTodos

Save and switch to the Todo UI screen from your Design app (i.e. https://[YOUR_ADMIN_UI_DOMAIN]/app/design/common/ui?id=todo). Select the "LISTER" tab and update lister details with the following:

  • Lister: Query Table

  • List Columns:

    • Title: Name, Path: data.name

    • Title: Project, Path: data.project

  • Main Filters:

    • Path: project, Widget: TextFilter, Properties: { "label": "Project" }

Save your updated UI design. If you switch back to your Todo screen in your Example app, you'll notice that now you can query todo list using project field:

In order to expose this query to end users, we'll follow steps similar to example.

These settings mean that this Event step will execute action, on the "master" system (which is the alias of "system-mongo_master-0001" in the predefined runner), using query with identifier "todo" (which we just created). Query parameters (i.e. %%project%% in our query) will be search in "parameters" of the request payload and query results will be returned in the root of response payload ($ referring to the root).

Hello World Saga
GetQuery
Query
Configuration
Query Screen
Query Definition Screen
Query Condition Dialog
Search Todos Saga Definition Screen
Saga Link Definition Dialog
Saga Event Definition Dialog
UI Lister Screen
Updated Todo Screen