on 08-11-2015 10:44 AM
Hi pros,
is there any possibility to write an error file to a specified directory (we need this for an external job control system) in the following cases?
Thanks in advance!
Hi,
I think I joined lately ,below are my views on this .
>>is there any possibility to write an error file to a specified directory (we need this for an external job control system) in the following cases?
Alert framework can take care of all kind of exceptions.So I don't want to invest time and efforts on this by writing custom java code .
I will ask my admin team to create a mail id and I subscribe to Alerts.
I will create an interface Mail to File and writes files to desired loc.
Regards
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For Case 1:
There is a cleanup method(you can see in function tabs of mapping) which will be executed after mapping.You can write logic here to write the file in case if the mapping program fails.
For Case 2:
In case of channel fails,You can configure alerts from alert inbox you can poll and write it as a file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
One approach I had tried (unsuccessful) was to use the init and cleanup methods in a graphical mapping to store all exceptions in an ArrayList and then in the cleanup if the list was not empty then try to generate a message attachment showing the necessary data and after that is created then throw a StreamTransformationException so the message will go into an error state. For some reason the attachment was not getting created - but even when no exception was thrown so it's possible it may work in your case. I had opened an OSS message with SAP and they had suggested that the code I had in place should be working but it was only a like to have solution so we didn't pursue it any further. As far as #2 I would go with what others have said and count on the alert framework to do the job for you.
Regards,
Ryan Crosby
Hi Stefan,
I don't know why you can generate files if you have the alert monitoring in PI that it can send a mail in case of error, check Michal's example
However, depending your PI version you have a several webservices that you can use to take the monitor logs:
Later you will can generate the files.
From adapter side you can extend it with a module, but i haven't so clear if you have a previous exception you can catch it in the next module.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.