Skip to Content
0
Former Member
May 12, 2010 at 01:59 PM

global variable

39 Views

Hi,

I'm in PI 7.0 PS12 and I have a strange behaviour with a global variable.

I defined a Global Variable like "String gv_datetime = new String();", and then, thanks to a UdF, I fill this variable with a random value concatenated to the numbers of milliseconds since 1970.01.01... So normally for two runs of the same mapping at the same time, this value should be different !

well.. in fact it's not the case ! it seems that the value is used across multi-run of this mapping.

For instance, image that we have two source files in the source directory. When PI picks up these files, the same mapping is run twice (one per file) ... like a parallel treatment. And so normally, I should have two different values for this global variable... but it's not the case, a same value is used for the two mapping runs. Same milliseconds and same random value... that's why I think that there is something bad with the Global variation definition and/or its behavior.

does someone know this behaviour ?

Maybe my global variation is badly defined, do I have to do something in "Initialization Section" or "Clean-up Section" ?

I know how to solved this issue in PI 7.1.... but we are only in PI 7.0 - SP12.

Many thanks for your feedback... coz it's difficult to reproduce the case...

Mickael