RuleGo RuleGo
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文

广告采用随机轮播方式显示 ❤️成为赞助商
  • Quick Start

  • Rule Chain

  • Standard Components

    • Standard Components Overview
    • filter

      • jsFilter
      • fieldFilter
        • Configuration
        • Relation Type
        • Execution result
        • Configuration example
        • Application example
      • msgTypeSwitch
      • jsSwitch
      • groupFilter
      • exprFilter
      • fork
      • Switch
    • action

    • transform

    • external

    • flow

  • Extension Components

  • Custom Components

  • Components marketplace

  • Visualization

  • AOP

  • Trigger

  • Advanced Topic

  • RuleGo-Server

  • FAQ

  • Endpoint Module

  • Support

目录

fieldFilter

fieldFilter component: field filter. You can filter msg and metadata fields.

# Configuration

Field Type Description Default value
checkAllKeys boolean Whether to meet all field keys exist false
dataNames string msg data field key, multiple separated by commas None
metadataNames string metadata field key, multiple separated by commas None

# Relation Type

  • True: Send the message to the True chain
  • False: Send the message to the False chain
  • Failure: Execution failed, send the message to the Failure chain

# Execution result

This component will not change the content of msg, metadata and msgType.

# Configuration example

  {
    "id": "s1",
    "type": "fieldFilter",
    "name": "Field filter",
    "configuration": {
      "checkAllKeys": true,
      "dataNames": "temperature",
      "metadataNames": "productType,name"
    }
  }
1
2
3
4
5
6
7
8
9
10

# Application example

If msg contains the temperature field, then push the message to: http://192.168.136.26:9099/app1/api/msg, otherwise push to: http://192.168.136.26:9099/app2/api/msg

{
  "ruleChain": {
    "id":"rule01",
    "name": "Test rule chain",
    "root": true
  },
  "metadata": {
    "nodes": [
      {
        "id": "s1",
        "type": "fieldFilter",
        "name": "Filter",
        "configuration": {
          "dataNames": "temperature"
        }
      },
      {
        "id": "s2",
        "type": "restApiCall",
        "name": "Push data-app2",
        "configuration": {
          "restEndpointUrlPattern": "http://192.168.136.26:9099/app1/api/msg",
          "requestMethod": "POST",
          "maxParallelRequestsCount": 200
        }
      },
      {
        "id": "s3",
        "type": "restApiCall",
        "name": "Push data-app2",
        "configuration": {
          "restEndpointUrlPattern": "http://192.168.136.26:9099/app2/api/msg",
          "requestMethod": "POST",
          "maxParallelRequestsCount": 200
        }
      }
    ],
    "connections": [
      {
        "fromId": "s1",
        "toId": "s2",
        "type": "True"
      },
      {
        "fromId": "s1",
        "toId": "s3",
        "type": "False"
      }
    ]
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Edit this page on GitHub (opens new window)
Last Updated: 2025/04/02, 01:29:50
jsFilter
msgTypeSwitch

← jsFilter msgTypeSwitch→

Theme by Vdoing | Copyright © 2023-2025 RuleGo Team | Apache 2.0 License

  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式