BookmarkSubscribeRSS Feed
ZOR_AD
Fluorite | Level 6

Greetings,

 

First off kindly point me to an existing topic in the community if the subject has already been discussed, but from what i searched so far did not find one (maybe i missed it).

Closest i found is:

https://communities.sas.com/t5/SAS-Programming/Can-we-execute-a-job-flow-through-API/m-p/917349/thre...

 

Product: SAS Studio Engineer / Version : 2024.03

Context: i have a job flow in Environment Manager which consists in Flows (.flw) from SAS Studio deployed as jobs (all of them used here in the flow) and some Logic Gates. See Below.

 

Job Flow Name : JF_RUN

ZOR_AD_0-1744639019001.png


Now, this Job Flow is scheduled to run daily at 12:00 pm. In case the Job Flow fails with an error, the person responsible with the process will investigate, take necessary measures, and need to execute the Flow again. 

BUT,  Job Flow 2, one of the flows from SAS studio used in this flow in Environment Manager,  works with some input parameters, and, from the investigations made, it turns out that some of them need to be altered, only for the next run iteration. Since the parameters are read from csv's on the server and loaded into tables, we would like to avoid user interaction with the CSV, especially since the parameters modification is only for next execution.

And so we considered generating a Job->Task Prompt from SAS Studio where the user will input parameters (into an XML form) with altered values for Job Flow 2 and then trigger the existing Job Flow in Environment Manager.

 

The question : How can i trigger the execution of my flow JF_RUN in Environment Manager from the Program Tab using SAS code in a Task Prompt, ?

 

ZOR_AD_2-1744640910117.png

 

Thank you in advance.

 

Regards,

Alex.

 

 

 

2 REPLIES 2
LinusH
Tourmaline | Level 20

I'm not versed in Viya 4 enough to help you with that specific request.

But there might other solutions. If you have a separate input (file, dataset etc) that Flow 2 reads regularly it could do the trick.

If that data is missing or empty the Flow 2 ignores it, if it has data the flow uses it, and then at the cleans it out afterwards so it won't be used further (truncate/delete/move).

Data never sleeps
ZOR_AD
Fluorite | Level 6

Hi Linus,

 

Thank you for the reply. The underlying  flows from SAS Studio are heavily parameterised in accordance to a great deal of business rules, significant processing steps, and data quality checks. This is a given and there's no going back. We did consider some workarounds as well, but this means modifying existing flows, which is not an option. Triggering the flow from Environment Manager directly in SAS Studio with altered parameters from user input seems the most efficient solution at the moment.

 

Regards,

Alex.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 556 views
  • 0 likes
  • 2 in conversation