on 01-15-2015 3:25 PM
Hello,
we have a scenario were we need to compare several input values. In some cases there will be no resutlt message created.
Is there anyway to stop a message processing during runtime if a specified condition is true?
I currently tried it with the code:
if (!hasMatchFound) //
throw new Exception("No result!");
But this message doesn't quite the mapping. Is there any other way for this?
regards
Christian
Hello Christian
Throwing an exception should stop the mapping. Are you sure the condition is being met?
Could you add some logging in the UDF to be sure the exception is being thrown?
regards
Steve
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
There are a couple of blogs that you should check to get your goal in the best way:
Michal Krawczyk's blog: http://scn.sap.com/community/pi-and-soa-middleware/blog/2007/04/26/xipi-throwing-generic-exceptions-...
Alessandro Guarneri's blog:
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
please try the following code:
throw new RuntimeException("Your error message here");
This works fine for us. The mapping terminates with an error and the exception is shown in the trace.
Best regards,
lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Christian,
Is there any catch block, which is handling Exception?
Can you paste the Java mapping here? We can guide you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you try
throw new StreamTransformationException( "No result!");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.