Author |
Message
|
ucbus1 |
Posted: Tue Sep 14, 2004 11:43 am Post subject: Datacontaier/UPES issue?? |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
I have workflow application that is working fine. we build an instantiation xmlthat builds the data container using a cOBOL program, then we have some UPES program to make use of the data container.
In the Data container one of the elements is userid.
The userid is 8 char. My instatantiation program is pulling data from a flat file on mainframe and populating the field. In one case it pulled "bbbbxxxx" where b stands for blank.
Ths instatnaition XML had tag <userid>bbbbxxxx<useerid>
In workflow I have a Java upes program that retrieves the data container information
Code: |
ActivityInvocationRequest request
ActivityInputContainer input = request.inputData;
String userid=input.getElement("General.userid") |
It was working fine except in this case. Here when I am trying to show the user id I am getting "xxxx<use". Ideally I should have got "bbbbxxxx".
Is some thing wrong with my UPES java program? This is an extension of vendor supplied message handling frame work. |
|
Back to top |
|
 |
Ratan |
Posted: Tue Sep 14, 2004 12:17 pm Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
If I understand you correctly:
Can you have leading blank spaces in a user name? Wierd. What ever parser you wrote or the Vendor supplied is wierd. why does it care that the USerID has to be 8 characters. Looks like when you hit a <userID> tag you are saving the next 8 characters as the userID. _________________ -Ratan |
|
Back to top |
|
 |
ucbus1 |
Posted: Tue Sep 14, 2004 12:39 pm Post subject: |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
Ratan.
Thanks
Quote: |
Can you have leading blank spaces in a user name? Wierd. |
I have simplified the code for posting. It is not userid in the sense to validate the users. We can think of it as some ID.
Quote: |
What ever parser you wrote or the Vendor supplied is wierd. why does it care that the USerID has to be 8 characters. Looks like when you hit a <userID> tag you are saving the next 8 characters as the userID. |
Hmm... It does not make sense. I am not sure how it works. Any XML parser should take the content between tags
. Also, no where we mention, even in the buldtime while creating the container elements that the length of the element is 8 chars. I am totally confused with what is happenning here with the code. |
|
Back to top |
|
 |
vennela |
Posted: Tue Sep 14, 2004 12:46 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Can you modify the code?
If yes then use trim method of String class
UPES framework is now supplied with Workflow 3.5 if using the newer version is an option for you. |
|
Back to top |
|
 |
ucbus1 |
Posted: Tue Sep 14, 2004 1:16 pm Post subject: |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
Vennela,
Do you mean
Quote: |
String userid=input.getElement("General.userid"). trim() |
I think even after that I will get user ID as "xxxx</us" it will not work. Some how the "input.getElement("General.userid")" is not happy with the spaces before and gathering 8 charaters. I am not sure how it knows to truncate in the middele of XML tag |
|
Back to top |
|
 |
vennela |
Posted: Tue Sep 14, 2004 1:36 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Sorry,
I didn't read the post completely.
Ignore my previous post. |
|
Back to top |
|
 |
ucbus1 |
Posted: Fri Sep 17, 2004 4:12 am Post subject: |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
Any idea...
Please let me know |
|
Back to top |
|
 |
|