on 02-26-2008 6:07 PM
Hi,
I have a message mapping
... --> SplitByValue --> if --> ...
The very first element of the input queue is a Context Change with the label SUPRESS. The first value of the output queue however is a context change with the label [null]. Therefore the if-step complains: RuntimeException in Message-Mapping transformation: Cannot cast null to boolean.
I can not believe that I am the first person with this problem, but I couldn't find any solutions, yet. I hope someone has an idea...
Thanks and regards,
Dominik Schlund
HI,
Just use Remove Context before the splitByValue or check with exists API if the node exists or supressed.
--> "exists" -->"if-then-else",
Accordingly you could process ahead with avoiding the 1st Supress value.
Thanks
Swarup
Edited by: Swarup Sawant on Feb 26, 2008 7:15 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks for all the quick ideas. I now solved it by simply adding a sort after the SplitByValue. Since every value is in its own context anyway that doesn't change anything, but it converts the CC-null into CC-SUPPRESS again.
However I see it mor as a workaraound than a solution. I would say that the behaviour of the SplitByValue is strange at the first place.
Anyway, thanks for your help,
Dominik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
One more solution for you:
Use standard function of mapWithDefault, it will manually create a node if the node not exist.
This node can manually maintain the length of queue for one node equals to another node.
It is useful when you use SortBykey.
It depends on your case, to choose which one is best solution.
Liang
Edited by: Liang Ji on Feb 27, 2008 5:50 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
maybe use function idExists from node function than in case of empty you will receive false.
/wg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.