Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-7590

Handle "action" and "actions" in JSON

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • Ansible Integration
    • None
    • 2023 Week 36-38 (from Sep 4)
    • 1
    • NEW
    • NEW
    • ---
    • ---

      Issue Description:

      JSON sent from ansible-rulebook / drools_jpy contains "action" or "actions" are like this

      single "Action" in "action"

                              "action":{
                                "Action":{
                                  "action":"debug",
                                  "action_args":{
                                    "events_event":"{{events.first}}"
                                  }
                                }
                              },
      

      single "Action" in "actions"

                              "actions":[
                                {
                                  "Action":{
                                    "action":"print_event",
                                    "action_args":{
                                      "pretty":true
                                    }
                                  }
                                }
                              ],
      

      multiple "Action"s in "actions"

                              "actions":[
                                {
                                  "Action":{
                                    "action":"debug",
                                    "action_args":{
                                    }
                                  }
                                },
                                {
                                  "Action":{
                                    "action":"print_event",
                                    "action_args":{
                                      "pretty":true
                                    }
                                  }
                                }
                              ],
      

      Currently we don't have test cases for that and "actions" is ignored.

      Acceptance Criteria:

      • Add test cases
      • Assert action value

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: