From d2716400c38672716e680a9854d702bc40e703c2 Mon Sep 17 00:00:00 2001 From: Virul Nirmala Wickramasinge Date: Mon, 23 Mar 2026 21:09:59 +0530 Subject: [PATCH 1/4] Fix extracting rule properties in updateRule --- .../io/ballerina/lib/asb/util/ASBUtils.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/native/src/main/java/io/ballerina/lib/asb/util/ASBUtils.java b/native/src/main/java/io/ballerina/lib/asb/util/ASBUtils.java index e3f1cdb4..d9a8d184 100644 --- a/native/src/main/java/io/ballerina/lib/asb/util/ASBUtils.java +++ b/native/src/main/java/io/ballerina/lib/asb/util/ASBUtils.java @@ -500,13 +500,19 @@ public static SubscriptionProperties getUpdatedSubscriptionPropertiesFromBObject */ public static RuleProperties getUpdatedRulePropertiesFromBObject(BMap ruleConfig, RuleProperties ruleProp) { - if (ruleConfig.containsKey(ASBConstants.RECORD_FIELD_ACTION)) { - ruleProp.setAction(new SqlRuleAction( - ruleConfig.getStringValue(ASBConstants.RECORD_FIELD_ACTION).getValue())); - } - if (ruleConfig.containsKey(ASBConstants.RECORD_FIELD_FILTER)) { - ruleProp.setFilter(new SqlRuleFilter( - ruleConfig.getStringValue(ASBConstants.RECORD_FIELD_FILTER).getValue())); + if (ruleConfig.containsKey(ASBConstants.RECORD_FIELD_SQL_RULE)) { + if (ruleConfig.getMapValue(ASBConstants.RECORD_FIELD_SQL_RULE).containsKey( + ASBConstants.RECORD_FIELD_ACTION)) { + ruleProp.setAction(new SqlRuleAction( + ruleConfig.getMapValue(ASBConstants.RECORD_FIELD_SQL_RULE).getStringValue( + ASBConstants.RECORD_FIELD_ACTION).getValue())); + } + if (ruleConfig.getMapValue(ASBConstants.RECORD_FIELD_SQL_RULE).containsKey( + ASBConstants.RECORD_FIELD_FILTER)) { + ruleProp.setFilter(new SqlRuleFilter( + ruleConfig.getMapValue(ASBConstants.RECORD_FIELD_SQL_RULE).getStringValue( + ASBConstants.RECORD_FIELD_FILTER).getValue())); + } } return ruleProp; } From 7ed97d79f5dbab8d17943f3a6b3811205cebe4e9 Mon Sep 17 00:00:00 2001 From: Virul Nirmala Wickramasinge Date: Mon, 23 Mar 2026 21:28:00 +0530 Subject: [PATCH 2/4] Update changelog for updateRule fix --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index 3665b800..19747108 100644 --- a/changelog.md +++ b/changelog.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - [Application written with `ballerina/asb` connector gives a conflicting JAR warning with `netty-buffer` and `jackson-annotations`](https://github.com/ballerina-platform/ballerina-library/issues/7061) +- Fix `updateRule` not applying filter and action changes due to incorrect field extraction from nested `SqlRule` record ## [3.8.1] - 2024-09-30 From 66baf6caed761219e2135482439ca5f75a18f7d5 Mon Sep 17 00:00:00 2001 From: Virul Nirmala Wickramasinghe <89099391+iamvirul@users.noreply.github.com> Date: Mon, 23 Mar 2026 21:42:04 +0530 Subject: [PATCH 3/4] Update changelog.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 19747108..549141c0 100644 --- a/changelog.md +++ b/changelog.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - [Application written with `ballerina/asb` connector gives a conflicting JAR warning with `netty-buffer` and `jackson-annotations`](https://github.com/ballerina-platform/ballerina-library/issues/7061) -- Fix `updateRule` not applying filter and action changes due to incorrect field extraction from nested `SqlRule` record +- [Fix `updateRule` not applying filter and action changes due to incorrect field extraction from nested `SqlRule` record](https://github.com/ballerina-platform/ballerina-library/issues/8730) ## [3.8.1] - 2024-09-30 From 0039e15fc895fcd2fbcbd2025086262f1af21953 Mon Sep 17 00:00:00 2001 From: Virul Nirmala Wickramasinghe <89099391+iamvirul@users.noreply.github.com> Date: Tue, 24 Mar 2026 09:36:48 +0530 Subject: [PATCH 4/4] Update changelog.md Co-authored-by: Ayesh Almeida <77491511+ayeshLK@users.noreply.github.com> --- changelog.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 549141c0..22b7209e 100644 --- a/changelog.md +++ b/changelog.md @@ -8,9 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed +- [Fix `updateRule` not applying filter and action changes due to incorrect field extraction from nested `SqlRule` record](https://github.com/ballerina-platform/ballerina-library/issues/8730) + +## [3.8.2] - 2024-10-01 +### Fixed - [Application written with `ballerina/asb` connector gives a conflicting JAR warning with `netty-buffer` and `jackson-annotations`](https://github.com/ballerina-platform/ballerina-library/issues/7061) -- [Fix `updateRule` not applying filter and action changes due to incorrect field extraction from nested `SqlRule` record](https://github.com/ballerina-platform/ballerina-library/issues/8730) ## [3.8.1] - 2024-09-30