BookmarkSubscribeRSS Feed

SAS Viya: SAS Studio Flow Execute Decisions Step

Started ‎06-13-2022 by
Modified ‎06-13-2022 by
Views 1,996

The Execute Decisions step enables you to use the logic of your SAS Intelligent Decisioning Decisions within a SAS Studio Flow. The use of the Execute Decisions step requires SAStudio Engineer license  and SAS Intelligent Decisioning.  It also requires the following:


  • The SAS Intelligent Decisioning Decision must be published to CAS
  • The input to the Execute Decisions step must be a CAS table.


CAS Publication Destination


The SAS Intelligent Decisioning Decision must be published to CAS.  If a CAS Publishing Destination doesn't exist, then a SAS Administrator needs to create one in SAS Environment Manager.




Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.


For more information on creating Publishing Destinations, refer to its documentation.    


CAS Table Input


The input to the Execute Decisions step must be a CAS table, so ensure the table you want to use as the input to the decision is loaded to memory in CAS.




Decision Published to CAS


Build the decision you want to use in your SAS Studio Flow in SAS Intelligent Decisioning.




Test the decision in SAS Intelligent Decisioning with your CAS input table.




Publish the decision to a CAS publishing destination.




Test the published decision in Publishing Validation with your CAS input table.




For more information on creating, testing, and publishing decisions, refer to the SAS Intelligent Decisioning documentation.  


Create SAS Studio Flow using Execute Decisions Step


In SAS Studio, create a new Flow and on the Snippets pane, right-click the snippet Generate SAS librefs for caslibs and select Add to flow.




This code creates a CAS session and creates SAS librefs for existing caslibs, so they are visible in the Libraries pane.  You need to run this step to select the CAS table you are using as input for your Execute Decisions step.




Next in the Libraries pane, right-click the CAS input table and select Add to flow to add it to the flow.




On the Steps pane, double-click the Execute Decisions step located in the Integrate section to add it to the flow.  Connect it to the CAS input table node.




Select the published decision.  Note:  Only decisions published to a CAS destination are available for selection.






Next on the Input variables tab, map the fields from the source table to the input variables of the selected decision.  Fields with the same name and type are auto-mapped for you.  Note: All columns must be successfully mapped for the Execute Decisions step to run.




The Output variables are the output variables from the selected decision.




Save and run the flow to test it.  Preview the output of the Execute Decisions step.




If I close the saved flow, I can re-open and run it again. I can also add any step(s) to the flow as desired to work with the output of the selected decision.  For example, in my case I could branch the flow based on whether or not the car should be considered for purchase.




For more information on working with SAS Studio Flows, refer to its documentation




The Execute Decisions step is used to run a SAS Intelligent Decisioning decision that is published to CAS in SAS Studio Flow.  For more information on this step, please refer to its documentation.      



Find more articles from SAS Global Enablement and Learning here.


MK, great example! Easy to follow and replicate.

Version history
Last update:
‎06-13-2022 04:30 PM
Updated by:


Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.


Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags