Hi,
I want to perform an action (for exmple sent an e-mail) every time an error occurs in a pipiline stage. How can I do this? Is there any attribute that specifies if there is an error in some pipeline stage?
Thanks
Hagop
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I try to do so but I cannot handle the error.
My pipeline is defined so:
.....
xml2xml-1.stageType=XslTransform
xml2xml-1.transformationFile = data/invoic.xsl
xml2xml-1.nextStage=writer-1
xml2xml-1.tracked=true
xml2xml-1.errorStage=emailer
xml2xml-1.failOnError=true
...
emailer.stageType=SmtpWriter
emailer.smtpHost=mail.yahoo.com
emailer.smtpFrom=hchemedikian@yahoo.com
emailer.smtpTo=hchemedikian@yahoo.com
emailer.smtpSubject=Document: Ticket: ${ticket.Value}
emailer.nextStage=null
emailer.tracked=true
....
I also try to use the router stage but I don't know the name of the attribure that defines error status.
Can you send me a more complete example.
Thanks
Hagop
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2004-03-25
Hi, I am using the xml pipeline definition and cannot get my errorStage to work either. Anyway, here's how specify my option
<option>
<option-name>errorStage</option-name>
<option-value>writer</option-value>
</option>
writer is of type FileWriter. By the way, I did not set the failOnError
And do I have to configure the <connection> tag as well.
I could not find any examples of the XML error handling and that's why I am asking. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2004-03-25
And actually the behavior I want is to continue processing on the error path or something like that.
Is that even possible ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2004-03-25
OK I just took a look at the source code of SoapWriter and it does not seem to have an errorStage option or am I mistaken ?
Why can't every pipeline stage simply have an errorStage ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I want to perform an action (for exmple sent an e-mail) every time an error occurs in a pipiline stage. How can I do this? Is there any attribute that specifies if there is an error in some pipeline stage?
Thanks
Hagop
Try adding:
yourStageName.errorStage=somewheretogoonerror
works for me.
Bill
I try to do so but I cannot handle the error.
My pipeline is defined so:
.....
xml2xml-1.stageType=XslTransform
xml2xml-1.transformationFile = data/invoic.xsl
xml2xml-1.nextStage=writer-1
xml2xml-1.tracked=true
xml2xml-1.errorStage=emailer
xml2xml-1.failOnError=true
...
emailer.stageType=SmtpWriter
emailer.smtpHost=mail.yahoo.com
emailer.smtpFrom=hchemedikian@yahoo.com
emailer.smtpTo=hchemedikian@yahoo.com
emailer.smtpSubject=Document: Ticket: ${ticket.Value}
emailer.nextStage=null
emailer.tracked=true
....
I also try to use the router stage but I don't know the name of the attribure that defines error status.
Can you send me a more complete example.
Thanks
Hagop
Hi, I am using the xml pipeline definition and cannot get my errorStage to work either. Anyway, here's how specify my option
<option>
<option-name>errorStage</option-name>
<option-value>writer</option-value>
</option>
writer is of type FileWriter. By the way, I did not set the failOnError
And do I have to configure the <connection> tag as well.
I could not find any examples of the XML error handling and that's why I am asking. Thanks.
And actually the behavior I want is to continue processing on the error path or something like that.
Is that even possible ?
OK I just took a look at the source code of SoapWriter and it does not seem to have an errorStage option or am I mistaken ?
Why can't every pipeline stage simply have an errorStage ?
You need to set failOnError to true in order to your pipeline continue processing after an error occured.
errorStage is an option avaliable to all pipeline stages, so it should be avaliable in SoapWriter, too.
Error handling in Babeldoc is configurable, so if you don't like default error handling mechanism, you can provide your own error handler. For further information check http://www.babeldoc.com/development/readme/userguide.xml.html#N11819
Dejan
Correction:
failOnError should be false if you want to continue processing! It is true by default.
Hi Dejan, Thanks a bunch !!! It works now.