BookmarkSubscribeRSS Feed
Calcite | Level 5

Hi !

Working on a SAS Intelligent Decision (SID) architecture where we have an external application calling the url endpoint of a master decision flow.

Based on the parameters supplied in the POST, the master decision flow redirect the request to a sub decision flow. Each sub decision flow has specific tasks and the answer (variables and parameters) are transferred back up to master decision flow and back out to the external application. Each sub decision flow has different variables and parameters.


What is the best approach of making a neat json array out from SID that only contains variables and parameters from the sub decision flow that returned the answer ?


SAS Employee

Just mark those desired variables as the output in your decision flow, and you will see them in the results. That's it.

Calcite | Level 5

Done that.. The problem is that the more sub decision flows you have the more variables will be attached into the json array even though its only 1 flow returning actual values. So the json array gets littered with metadata from variables that have NULL values. So need a more dynamic output of JSON array where only the variables containing values are present



SAS Employee
SID will return all variables that you have marked as output, doesn't matter whether they have values or not. From my point of view, you have the following options:
1. Filter empty output variables in your application that works with the results
2. Change the decision flow logic and add DS2 file as the last node, which will check which variables are available and return only those available.
3. Change the decision flow logic without adding DS2 file.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2 in conversation