on 03-10-2009 7:12 AM
Hi all,
I have created the following sample class Test.java and imported it as an archive:
public class Test{
public static String myStringData = null;
}
In one of the mappings, I have a UDF that sets the "myStringData" using the foll:
Test.myStringData = "Amit";
I am trying to access this variable in another mapping using a UDF with foll statements:
String test = Test.myStringData;
result.addValue(test);
However, on testing the second mapping I get the value of the variable as null. I have activated all objects.
Not sure what exactly I am missing here...Kindly provide your inputs.
Thanks..
Amit
A small correction in the issue:
The Target File structure has some fields which should be mapped with elements contained in output of the "first" stored procedure
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, I am trying to implement the below mentioned flow:
Stored procedure output--
Issue:
The Target File structure has some fields which should be mapped with elements contained in output of the second stored procedure.
I am using a set of 2mappings to achieve this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Shabarish/Praveen, it would be great if you could provide me with some examples on the suggested approaches as I am relatively new to PI.
Thanks,
Amit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
>>>Shabarish/Praveen, it would be great if you could provide me with some examples on the suggested approaches as I am relatively new to PI.
the truth is that you should not write anything from message mappings
as:
what happens if the DB table to which you want to write will be locked
what happens if the file will not be accessible ?
it's better not to write anything from message mappings
especiall if you say you're new to XI
maybe just tell us the real problem - why do you think you need to do it?
Regards,
Michal Krawczyk
I am using PI 7.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using PI 7.1?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Praveen for the info.
But then, is there a means of accessing values across mapping. I tried using global container but even that doesn't work.
Regards,
Amit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The second mapping cannot access the variable set by first mapping since java program scope is only for each mapping execution.
Thanks,
- Gujjeti.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.