Re: To cx:message or not cx:message, that is the exception?

On 9 August 2012 15:25, Alex Muir wrote:

  Hi,

> The following which in the otherwise is outputting a log
> message works, although it's not what I want.  I would like to
> <p:sink/> in the otherwise or do nothing basically however then
> I get the error messages:

  I have not read into great details, but it seems you want to
return an empty document.  If your step declares to return a
document, then it has to.  Because p:sink has no output at all,
it is an error then.  What you want (if I understood correctly)
is rather:

    <p:identity>
       <p:input port="source">
          <p:empty/>
       </p:input>
    </p:identity>

  Note that this is not the same thing as p:sink: it returns
something, but this is empty.  In some projects I used that
extensively, so I create 2 utility steps:

    <p:declare-step type="app:empty">
       <p:output port="result" primary="true"/>
       <p:identity>
	  <p:input port="source">
	     <p:empty/>
	  </p:input>
       </p:identity>
    </p:declare-step>

    <p:declare-step type="app:nothing">
       <app:empty/>
       <p:sink/>
    </p:declare-step>

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/

Received on Thursday, 9 August 2012 15:55:17 UTC