Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] Passing Variable From Flow To Flow
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Passing Variable From Flow To Flow
 Login/Join
 
Member
posted
I'd like to set a variable in a flow (call it flow_master) which then passes it to the next flow (call it flow_file), which in turn sets values in a synonym (syn_file). I have it working where flow_file sets the values and syn_file gets it and does the work. However when I try to set the value one layer up in flow_master I'm hitting a wall. I'm hoping this is a simple thing and I'm just a bit off.

I was thinking that since I set the variable to be globat in flow_master, I could access it further down the chain. Maybe this is true but I'm just doing it wrong.

Here is what I have
syn_file
TABLENAME: &&WS_TABLENAME <- What will end up here is a full path in DB2 like DTA001/IM01

flow_file

In that flow I want to accept the 'DTA001' from flow_master in a &&WS_LIBRARYNAME var and concatenate it like you see in the photo, which I'm trying to use like the below:

In the User Variable Calculator I'm trying to assign WS_TABLENAME to &&WS_LIBRARYNAME | '/IM01', essentially:
-SET &&WS_TABLENAME = &&WS_LIBRARYNAME | '/IM01';

flow_master
The text view of what I want to do there is:
-SET &&WS_LIBRARYNAME = 'DTA042';

I want to set &&WS_LIBRARYNAME in flow_master, have it picked up in flow_file and use it to assign the proper value to &&WS_TABLENAME. That will in turn have syn_file pick that up and do what it needs to do.

The only think NOT working is assigning in flow_master and it being picked up in flow_file.

This message has been edited. Last edited by: FP Mod Chuck,


Mass Data Migrator
 
Posts: 11 | Registered: March 22, 2018Reply With QuoteReport This Post
Guru
posted Hide Post
In flow_master where you are calling flow_file be sure that you are doing so as a stored procedure. Otherwise the flow gets started in a new (clean) agent.
 
Posts: 362 | Location: New York City | Registered: May 03, 2007Reply With QuoteReport This Post
Member
posted Hide Post
Thanks, I'll do that. Otherwise how I've named my variables, have them set as global, and what I'm expecting should work?


Mass Data Migrator
 
Posts: 11 | Registered: March 22, 2018Reply With QuoteReport This Post
Member
posted Hide Post
quote:
Originally posted by Michael Henry:
Thanks, I'll do that. Otherwise how I've named my variables, have them set as global, and what I'm expecting should work?


The answer is "No". I'm about ready to scream and give up.

Is there documentation that shows how variables work being passed around? I set my flow_master to run as a stored proc and set a paramenters as in the image. In my case I did:
WS_TABLELIBRARY='DTA042'

In flow_file I have:
-SET &&WS_TABLENAME = '&WS_TABLELIBRARY' | '/IM01';

And it's not working. I've tried:
-SET &&WS_TABLENAME = '&&WS_TABLELIBRARY' | '/IM01';
-SET &&WS_TABLENAME = 'WS_TABLELIBRARY' | '/IM01';

I try method after method after method and most of my failures come down to not knowing how to set and pass variables around.

Is there any documentation which goes into the scripting/programming aspect of the product and can show my idiot self how to do these things? I've tried so many things I've got myself in circles.

This message has been edited. Last edited by: Michael Henry,


Mass Data Migrator
 
Posts: 11 | Registered: March 22, 2018Reply With QuoteReport This Post
Member
posted Hide Post
I have found a user guide with many examples. Hopefully I am able to follow them and get what I'm looking for.

Thanks for the helps so far, though, it has moved me along.


Mass Data Migrator
 
Posts: 11 | Registered: March 22, 2018Reply With QuoteReport This Post
Virtuoso
posted Hide Post
When you call a flow that is not being called as a stored proc, the following should be the parameters to pass globals.
 &|&|WS_TABLELIBRARY=&&WS_TABLELIBRARY 

Note the pipes.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1073 | Location: Toronto, Ontario | Registered: May 26, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] Passing Variable From Flow To Flow

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.