Skip to Content
avatar image
Former Member

Variable set within function is not passing between dataflow and workflow

I have a parameter that gets set within function call within Dataflow. The result also gets written to table within the dataflow so I can see that the parameter is filled correctly. The parameter is defined as an 'out' parameter within dataflow.

In workflow that calls this dataflow I assign this out parameter to a local variable. In a script after the dataflow call I print the local variable. It prints NULL.

Somehow this variable is overwritten. Any ideas as to why the parameters are not passing appropriately?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 02, 2017 at 05:19 AM

    Hi Corne,

    The scope of the parameter will always remain within the workflow and dataflow.

    Here is the work flow which I used

    Lets assume I want to use Local Variables and parameters in the below Manner

    Job> Work Flow>Data Flow followed by Script

    1) Double click the Work Flow and Declare the Local variable and Parameters in Definitions tab Under Tools>Variables.

    Pass the Parameters at the Work flow level inside the Calls tab. Here my Parameter is of type Input.Here when I say work flow you need to click the Work Flow and go inside it i.e Context of Work Flow(highlighted)

    3) Go to the Data flow inside the work flow and declare the parameters inside the Definitions tab. These are the parameters which are going to be passed to the Data flow

    Here were are in Context of Data Flow(Highlighted)

    3) Declare the required Local Variables at the job level inside the Definitions Tab.

    Pass the Local variable to the parameters at the Job level inside the Calls tab. The local variable needs to be initialized at the start of the job inside a script.

    E.g. $L_CurrentTimeStamp = sysdate();

    Now if I pass my Input parameter $P_CurrentTimeStamp to a local variable inside a script after the data flow it should print the value correctly


    Arun Sasi

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 30, 2017 at 02:41 PM

    I am afraid you're running into a limitation of the software. I have never tried what you're doing. But I've had exactly the same problem when working with global variables.

    You can assign a value to a global variable in a function. Works fine when you call the function from a script. The new value is available after the call. But when you call it from within a data flow, it is not.

    Add comment
    10|10000 characters needed characters exceeded