Atlassian JIRA   History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: XRP-16
Type: New Feature New Feature
Status: Closed Closed
Resolution: Applied
Priority: Minor Minor
Reporter: Bill Bruyn
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
xReporter

NVL Function

Created: 06/Jul/04 09:37 PM   Updated: 29/Apr/05 03:43 PM
Component/s: xReporter
Affects Version/s: None
Fix Version/s: 1.2.1

File Attachments: 1. Text File nvl.patch (15 kb)



 Description   
A function for substitution of values that cannot be evaluated. For instance, referring to a variable that was created in an earler step but assigned no value causes an ExpressionException to be thrown when the expression is evaluated. The following illustates typical usage:

<flow>
  <step id="getParameters">
    <interaction>
      <parameter id="request_id" required="false">
        <prompt>Please Enter Request ID</prompt>
        <title>Request ID</title>
        <type base="string" />
      </parameter>
    </interaction>
  </step>
</flow>
<output>
 <http host="deathstar.mcao.maricopa.gov" port="80" path="/xprototype/tasks">
   <parameter name='request_id' expression='NVL(request_id, "")'/>
 </http>
</output>

 All   Comments   Change History      Sort Order:
This was checked into the 1.2.1 branch
http://cvs.cocoondev.org/cgi-bin/viewcvs.cgi/xreporter/status.xml.diff?r1=1.57&r2=1.58&cvsroot=xreporter

small differences compared to the patch:
- NVL is made to catch all exceptions (so not only ExpressionExceptions but also possible RuntimeExceptions that might be hidden)
- slightly higher effiency by not evaluating 2nd argument if not needed, and by not catching an rethrowing

also added:
- extra lines in documentation
- tests in ExpressionTest.java

Comment by Marc Portier [09/Nov/04 06:08 AM]
Administrative close (patch happened some time ago)