Groovy变压器被忽略了 [英] Groovy transformer was like ignored

查看:120
本文介绍了Groovy变压器被忽略了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好日子,同事。
在我的项目中,我遇到了一些问题。
在其中一个流程中,我做了两个http_requests,然后用groovy变换器分析了这些响应。



第二个常规脚本:



第一个groovy脚本工作正常。但第二个脚本不做任何事情。就像它被忽略了一样。

两个http_responses的结构都是类似的。



为什么第二个groovy脚本可以被忽略?

解决方案

Omg!(
)我很抱歉,这是我非常愚蠢的错误。理由是 - 'break'必须在IF范围内...
在第一个http_response中,所要求的值是集合中的第一个项目,这就是它的工作原理。



ps耻辱......


Good day, collegues. In my project i met some problem. In one of flows i have made two http_requests and then have parsed those responses with groovy transformer.

First groovy script:

Second groovy script:

The first groovy script works fine. But the second script don't do anything. Like it was ignored.

Both http_responses's structures are similar.

Why the second groovy script can have been ignored?

解决方案

Omg!( I am very sorry, this was my very stupid mistake. The reason is - 'break' must be in IF scope... In the first http_response sought value is the first item in collection, that's why it works.

p.s. shame...

这篇关于Groovy变压器被忽略了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆