<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Intelligent Decisioning: Calling a Data Grid Variable through JSON in Decisioning</title>
    <link>https://communities.sas.com/t5/Decisioning/Intelligent-Decisioning-Calling-a-Data-Grid-Variable-through/m-p/835400#M40</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to call the SAS API via Postman after publishing a simple decision flow and I wish to test the how a data grid variable is communicated upon sending a request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I created input and output variables with their corresponding data type, on which SubProduct variable is a data grid.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="u41146773_1-1664267990688.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75617iCE747672815EFB9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="u41146773_1-1664267990688.png" alt="u41146773_1-1664267990688.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Then I created a simple ruleset to count the records inside the data grid. If there is more than 1 record, then Decision = "No", else Decision = "Yes":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="u41146773_2-1664268175475.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75618iD44FEC38EC8859E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="u41146773_2-1664268175475.png" alt="u41146773_2-1664268175475.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;3. I have published and validated the simple flow. And got the expected outputs:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="u41146773_3-1664268886873.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75620i3BA451CFCE8F2091/image-size/medium?v=v2&amp;amp;px=400" role="button" title="u41146773_3-1664268886873.png" alt="u41146773_3-1664268886873.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; a. Data Grid value from output variable -&amp;gt; DECISION = "No":&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="u41146773_5-1664269065544.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75622i05CA23F76F1DE69E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="u41146773_5-1664269065544.png" alt="u41146773_5-1664269065544.png" /&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; b.&amp;nbsp;Data Grid value from output variable -&amp;gt; DECISION = "Yes:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="u41146773_6-1664269109347.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75623i9F692F39740B3887/image-size/medium?v=v2&amp;amp;px=400" role="button" title="u41146773_6-1664269109347.png" alt="u41146773_6-1664269109347.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;4. I have now copied the published URL to postman and set up the JSON request body for Item 3a.&lt;/P&gt;&lt;PRE&gt;{
   "inputs":[
      {
         "name":"ID_",
         "value":"A1"
      },
      {
         "name":"PRODUCTID_",
         "value":"car1"
      },
      {
         "name":"SUBPRODUCT_",
         "value": [
            {
                "metadata": [
                    {
                        "SP_ID": "string"
                    },
                    {
                        "COLOR": "string"
                    },
                    {
                        "VALIDITYDATE": "string"
                    }
                ]
            },
            {
                "data": [
                    [
                        "10001",
                        "BLUE",
                        "09272022"
                    ],
                    [
                        "10002",
                        "PINK",
                        "09262022"
                    ]
                ]
            }
        ]
      }
   ]
}&lt;/PRE&gt;&lt;P&gt;5. Upon sending the request, this is the response/error that I got.&lt;/P&gt;&lt;PRE&gt;{
    "errorCode": 0,
    "message": "Cannot execute the step \"execute_skel\" of the module \"sub_flow_dg1_0\".",
    "details": [
        "traceId: 3aaf89e6bbb63491",
        "path: /microanalyticScore/modules/sub_flow_dg1_0/steps/execute_skel",
        "Cannot assign the value [{metadata=[{SP_ID=string}, {COLOR=string}, {VALIDITYDATE=string}]}, {data=[[10001, BLUE, 09272022], [10002, PINK, 09262022]]}] to the parameter \"\"SubProduct_\"\" of type string."
    ],
    "links": [],
    "version": 2,
    "httpStatusCode": 400
}&lt;/PRE&gt;&lt;P&gt;I am confused on why I did not get the expected output as I did from Item 3 once I did the testing in runtime environment. Any thoughts on why this is happening? Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2022 10:04:43 GMT</pubDate>
    <dc:creator>u41146773</dc:creator>
    <dc:date>2022-09-27T10:04:43Z</dc:date>
    <item>
      <title>Intelligent Decisioning: Calling a Data Grid Variable through JSON</title>
      <link>https://communities.sas.com/t5/Decisioning/Intelligent-Decisioning-Calling-a-Data-Grid-Variable-through/m-p/835400#M40</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to call the SAS API via Postman after publishing a simple decision flow and I wish to test the how a data grid variable is communicated upon sending a request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I created input and output variables with their corresponding data type, on which SubProduct variable is a data grid.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="u41146773_1-1664267990688.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75617iCE747672815EFB9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="u41146773_1-1664267990688.png" alt="u41146773_1-1664267990688.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Then I created a simple ruleset to count the records inside the data grid. If there is more than 1 record, then Decision = "No", else Decision = "Yes":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="u41146773_2-1664268175475.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75618iD44FEC38EC8859E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="u41146773_2-1664268175475.png" alt="u41146773_2-1664268175475.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;3. I have published and validated the simple flow. And got the expected outputs:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="u41146773_3-1664268886873.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75620i3BA451CFCE8F2091/image-size/medium?v=v2&amp;amp;px=400" role="button" title="u41146773_3-1664268886873.png" alt="u41146773_3-1664268886873.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; a. Data Grid value from output variable -&amp;gt; DECISION = "No":&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="u41146773_5-1664269065544.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75622i05CA23F76F1DE69E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="u41146773_5-1664269065544.png" alt="u41146773_5-1664269065544.png" /&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; b.&amp;nbsp;Data Grid value from output variable -&amp;gt; DECISION = "Yes:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="u41146773_6-1664269109347.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75623i9F692F39740B3887/image-size/medium?v=v2&amp;amp;px=400" role="button" title="u41146773_6-1664269109347.png" alt="u41146773_6-1664269109347.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;4. I have now copied the published URL to postman and set up the JSON request body for Item 3a.&lt;/P&gt;&lt;PRE&gt;{
   "inputs":[
      {
         "name":"ID_",
         "value":"A1"
      },
      {
         "name":"PRODUCTID_",
         "value":"car1"
      },
      {
         "name":"SUBPRODUCT_",
         "value": [
            {
                "metadata": [
                    {
                        "SP_ID": "string"
                    },
                    {
                        "COLOR": "string"
                    },
                    {
                        "VALIDITYDATE": "string"
                    }
                ]
            },
            {
                "data": [
                    [
                        "10001",
                        "BLUE",
                        "09272022"
                    ],
                    [
                        "10002",
                        "PINK",
                        "09262022"
                    ]
                ]
            }
        ]
      }
   ]
}&lt;/PRE&gt;&lt;P&gt;5. Upon sending the request, this is the response/error that I got.&lt;/P&gt;&lt;PRE&gt;{
    "errorCode": 0,
    "message": "Cannot execute the step \"execute_skel\" of the module \"sub_flow_dg1_0\".",
    "details": [
        "traceId: 3aaf89e6bbb63491",
        "path: /microanalyticScore/modules/sub_flow_dg1_0/steps/execute_skel",
        "Cannot assign the value [{metadata=[{SP_ID=string}, {COLOR=string}, {VALIDITYDATE=string}]}, {data=[[10001, BLUE, 09272022], [10002, PINK, 09262022]]}] to the parameter \"\"SubProduct_\"\" of type string."
    ],
    "links": [],
    "version": 2,
    "httpStatusCode": 400
}&lt;/PRE&gt;&lt;P&gt;I am confused on why I did not get the expected output as I did from Item 3 once I did the testing in runtime environment. Any thoughts on why this is happening? Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 10:04:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Decisioning/Intelligent-Decisioning-Calling-a-Data-Grid-Variable-through/m-p/835400#M40</guid>
      <dc:creator>u41146773</dc:creator>
      <dc:date>2022-09-27T10:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Intelligent Decisioning: Calling a Data Grid Variable through JSON</title>
      <link>https://communities.sas.com/t5/Decisioning/Intelligent-Decisioning-Calling-a-Data-Grid-Variable-through/m-p/835448#M41</link>
      <description>Send the same payload to /microanalyticScore/modules/sub_flow_dg1_0/steps/execute, and it will work just fine.</description>
      <pubDate>Tue, 27 Sep 2022 14:55:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Decisioning/Intelligent-Decisioning-Calling-a-Data-Grid-Variable-through/m-p/835448#M41</guid>
      <dc:creator>alexal</dc:creator>
      <dc:date>2022-09-27T14:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Intelligent Decisioning: Calling a Data Grid Variable through JSON</title>
      <link>https://communities.sas.com/t5/Decisioning/Intelligent-Decisioning-Calling-a-Data-Grid-Variable-through/m-p/835524#M42</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/41748"&gt;@alexal&lt;/a&gt;, the URL worked. Great help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am wondering if this is the default template expected for the URL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only got the one with "_skel" from the path given from the published code of the decision flow (Scoring tab -&amp;gt; Publishing Validation -&amp;gt; Code):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="u41146773_0-1664334122330.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75652iCBD7EF255A96B1D7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="u41146773_0-1664334122330.png" alt="u41146773_0-1664334122330.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I thought I had to depend on the URL here, from /&lt;SPAN&gt;microanalyticScore/..., but apparently _skel should be removed as well when testing via Postman.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 03:04:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Decisioning/Intelligent-Decisioning-Calling-a-Data-Grid-Variable-through/m-p/835524#M42</guid>
      <dc:creator>u41146773</dc:creator>
      <dc:date>2022-09-28T03:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Intelligent Decisioning: Calling a Data Grid Variable through JSON</title>
      <link>https://communities.sas.com/t5/Decisioning/Intelligent-Decisioning-Calling-a-Data-Grid-Variable-through/m-p/835580#M43</link>
      <description>&lt;P&gt;Yes, unless you want to execute a specific step&amp;nbsp;&lt;A href="https://developer.sas.com/apis/rest/DecisionManagement/#operations-4" target="_blank"&gt;https://developer.sas.com/apis/rest/DecisionManagement/#operations-4&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 11:29:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Decisioning/Intelligent-Decisioning-Calling-a-Data-Grid-Variable-through/m-p/835580#M43</guid>
      <dc:creator>alexal</dc:creator>
      <dc:date>2022-09-28T11:29:42Z</dc:date>
    </item>
  </channel>
</rss>

