Using the exception catcher with tamino insert processor

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Using the exception catcher with tamino insert processor

Ryan Puddephatt
Hi,
    I'm trying to catch exceptions thrown by the tamino insert processor but because it doesn't have a output I can't catch them. I've tried the using the data and config inputs but the exception is still thrown in the normal way. Is there currently a way to do this? or would I have to change the processor to have an output?
 
Thanks
 
Ryan

Ryan Puddephatt
Software Engineer
 

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

 


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Using the exception catcher with tamino insert processor

Ryan Puddephatt
Ok, I've found a work around, incase anyone else needs to know
 
It seems surrounding the processor in an insert and creating an output using the identity processor seems to push the error through as well, my exception catcher is then attached to #test-hr-record

<p:choose href="#new-hr-record">
   <p:when
test="true()">
     
<!-- insert the new document to tamino -->
      
<p:processor name="oxf:tamino-insert">
         <p:input
name="config" href="#tamino-settings"/>
         <p:input
name="data" href="#new-hr-record" debug="INSERT"/>
      </p:processor>

      <!-- need to copy the document to the output id used by the other branch -->
     
<p:processor name="oxf:identity">
         <p:input
name="data" href="#new-hr-record"/>
         <p:output
name="data" id="test-hr-record"/>
      </p:processor>
   </p:when>
</p:choose>

Ryan

Ryan Puddephatt
Software Engineer
 

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

 


From: Ryan Puddephatt [mailto:[hidden email]]
Sent: 16 February 2007 13:56
To: [hidden email]
Subject: [ops-users] Using the exception catcher with tamino insert processor

Hi,
    I'm trying to catch exceptions thrown by the tamino insert processor but because it doesn't have a output I can't catch them. I've tried the using the data and config inputs but the exception is still thrown in the normal way. Is there currently a way to do this? or would I have to change the processor to have an output?
 
Thanks
 
Ryan

Ryan Puddephatt
Software Engineer
 

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

 


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Using the exception catcher with tamino insert processor

Alessandro Vernet
Administrator
Ryan,

On 2/16/07, Ryan Puddephatt <[hidden email]> wrote:
> It seems surrounding the processor in an insert and  creating an
> output using the identity processor seems to push the error through
> as well, my exception catcher is then attached to  #test-hr-record

Yes, this works. Another way is to put the tamino-insert/identity in a
separate pipeline that you call from your main pipeline. The separate
pipeline has one "dummy" output which you produce with the identity
processor (just sending an element <dummy/> will do it).

In general I use the separate pipeline approach, but the drawback is
that you have to create a separate file, and that creates clutter. So
all-in-all, I like your solution. Just make sure you pick small
document for the test, to minimize the cost of executing an XPath
expression on that document.

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws