on 01-24-2011 9:51 AM
Hello,
I have a JMS -> SAP PI 7.11 -> Receiver1 OR Receiver2 scenario.
If proper values of JMS Header (DCJMSMessageProperty0 and DCJMSMessageproperty1) are present then only Receiver1 should be called; otherwise Receiver2 should be called.
Accordingly I have mentioned conditions in Receiver Determination and this part is working fine
Now when I call Receiver2 I have to create below message (Message Type already defined):
<Validation>
<CustId>123456</CustId> 1..1
<Error> //to be generated only when Property0 is either not present or has invalid value
<ErrorValue>DCJMSMessageProperty0</Errorvalue>
</Error>
<Error> //to be generated only when Property1 is either not present or has invalid value
<ErrorValue>DCJMSMessageProperty1</Errorvalue>
</Error>
</Validation>
How to check in mapping if the ASMA headers are present and have valid values?
I am aware how to write the Dynamic Configuration UDF
Valid Values for Property0 = SAP, WebMethods, FileServer. Any other value is invalid.
Valid Values for Property1 = Server2. Any other value is invalid
Please help.
~Thanks.
Edited by: Abhishek01 on Jan 24, 2011 10:57 AM
Hi Abhishek,
since you know how to write the Dynamic config udf to retrieve the values, why dont you simply do an "if condition" to "null" there itself and default the values?
Maybe i dint get the question rite.. 😮
Regards,
Ninu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
why dont you simply do an "if condition" to "null" there itself and default the values?
I did apply the below mapping logic
Source -> GetASMAUDF -> FixValues -> equalS (fail) -> createif -> Error
Fixvalue setting
SAP <------> pass
WebMethods <------> pass
FileServer <------> pass
Default value is set as fail
Now as per my understanding if Property0 has SAP/ WebMethods/FileServer then pass will be populated and Error will not be generated; whereas if Property0 not equal SAP/WebMethods/ FileServer then default value (fail) will be populated and Error node will be created.
But during execution, I am getting an error in Interface Determination saying "cannot produce target node Error"
Please help.
~Thanks.
"Cannot produce target node" is an error which we get when some source field mapped to a mandatory target is missing in the input. In this case, i think probably something has been overlooked.
In this case, when error segment is created, you need the default values "DCJMSMessageProperty0" and "DCJMSMessageProperty1" right? Have you mapped the same? Have you tried to run it locally in your interface mapping using a try catch block?
Hi,
Check whether the UDF is working as expected or not..i.e returning the value or not...
if so then check the mapping condition (by simply the passing the value as if udf is returned ) and check the mapping whether it is working or not...
you have map the output of udf to some other field also and check what is the output returned by udf..
HTH
Rajesh
Hello,
Try passing these values in Fixvalue and equalS functions.
Check whether the UDF is working as expected or not..i.e returning the value or not...
I think there was something missing in my UDF itself. I added the below code (Property0 is the String which will hold the DCJMSMessageProperty0, when present)
if (Property0 == null)
return "";
else
return Property0;
The logic for Error remains same: Source -> GetASMAUDF -> FixValues -> equalS (fail) -> createif -> Error
Have you tried to run it locally in your interface mapping using a try catch block?
The mapping will not execute in Interface mapping as it has DynamicConfiguration logic.
At least now the mapping works good in Integration Builder -> Tools -> Test Configuration.
I do not have access to run the scenario end-to-end so will have to wait till tomorrow for onsite team to test.
The thread is not closed yet; if any suggestion then please do post
~Thanks.
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.