小编Mar*_*ell的帖子

布尔值在逻辑应用条件下不起作用

在逻辑应用条件中使用布尔值的正确方法是什么?如果 bool 设置为 true,则工作流应在 YES 分支中继续,但我总是以以下错误消息结束:

ActionBranchingConditionNotSatisfied。跳过模板操作“HTTP”的执行:不满足此操作的分支条件。

{
    "reservations": {
    "sendBooking": true
}}
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

json azure-logic-apps

2
推荐指数
1
解决办法
5005
查看次数

如何从API管理策略中的响应体获取价值?

我目前正在使用 Azure API 管理中的策略,并且对提取从响应正文返回的值感兴趣。

<send-one-way-request mode="new">
    <set-url>http://requestb.in/xje199xj</set-url>
    <set-method>POST</set-method>
    <set-header name="Content-Type" exists-action="override">
    <value>application/json</value>
    </set-header>
        <set-body>@{

            //JObject or string?
            string response = context.Response.Body.As<string>(preserveContent: true);
            //something here..
            }
        </set-body>
    </send-one-way-request>
Run Code Online (Sandbox Code Playgroud)

响应如下所示:

"getBookableResourcesResponse": {
    "getBookableResourcesResult": {
      "hasError": false,
      "errorCode": 0,
      "BookableResource": [
        {
          "resourceCode": "TRA",
          "description": "Trailer",
          "group": "F",
          "subGroup": "C",
          "category": "R",
          "dialogType": "CARGO",
          "orgCode": "DECK",
          "length": 14,
          "taraWeight": "7000",
          "grossWeight": "25001",
          "AddResource": [
            {
              "resourceCode": "EXPFIN",
              "description": "Export Finland",
              "dialogType": "UNDEFINED",
              "amount": "0",
              "ticketType": "",
              "orgCode": "EXPFIN",
              "required": "false"
            }.....`
Run Code Online (Sandbox Code Playgroud)

我想要获取从“resourceCode”属性返回的值,在本例中为“TRA”,然后创建一个新的 JObject,我可以将其发送到我的 …

json azure azure-api-management

1
推荐指数
1
解决办法
2万
查看次数