Skip to content

Conversation

yaohuitc
Copy link
Contributor

Describe what this PR does / why we need it

在通过HttpNode实现WebHook发送通知信息场景,请求的文本内容是需要包含/n等字符的;因此,做以下两点建议:
1、将json处理的objectMapper允许用户自定义,例如自定义如下objectMapper:
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.enable(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature());
2、对变量的过滤替换规则也允许由用户自定义;当然如果是state中的全局变量,更建议是在KeyStrategy中进行处理。本次提交为兼容原先逻辑,保留原默认的替换方式

参考数据按理:
String message = """今日AI工单智能助手总结

						当天合计工单: %d条,有效解决率: %s, 客户平均满意度(0~5)评估:%d
						""";

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

build a HttpNode with objectMapper and variableFilter, run it
HttpNode.builder()
.method(HttpMethod.POST)
.url(url)
.body(formBody)
.outputKey("message_sender_result")
.objectMapper(objectMapper)
.variableFilter(variable -> variable)
.build();

Special notes for reviews

@yaohuitc yaohuitc closed this Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant