You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Asankha C. Perera (JIRA)" <ji...@apache.org> on 2008/02/07 06:09:09 UTC

[jira] Created: (SYNAPSE-234) Support for an ELSE for the Filter (IF) mediator

Support for an ELSE for the Filter (IF) mediator
------------------------------------------------

                 Key: SYNAPSE-234
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-234
             Project: Synapse
          Issue Type: Improvement
            Reporter: Asankha C. Perera


Would be better to be able to specify what needs to be done if a filter condition evaluates to false

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-234) Support for an ELSE for the Filter (IF) mediator

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576864#action_12576864 ] 

Ruwan Linton commented on SYNAPSE-234:
--------------------------------------

I think I found a better solution to support this keeping the backward compatibility.

the filter syntax which is there currently will behave as it is where as if you want to use the else behavior for the filter then the configuration should be as follows;

<filter (source="xpath" regex="string") | xpath="xpath">
   <then [sequence="string"]>
      mediator+
   </then>
   <else [sequence="string"]>
      mediator+
   </else>
</filter> 

I think this will solve the backward compatibility issue as well as supporting the else behavior.

Thanks,
Ruwan 

> Support for an ELSE for the Filter (IF) mediator
> ------------------------------------------------
>
>                 Key: SYNAPSE-234
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-234
>             Project: Synapse
>          Issue Type: Improvement
>            Reporter: Asankha C. Perera
>            Assignee: Ruwan Linton
>
> Would be better to be able to specify what needs to be done if a filter condition evaluates to false

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Resolved: (SYNAPSE-234) Support for an ELSE for the Filter (IF) mediator

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Linton resolved SYNAPSE-234.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2

Fixed in the SVN trunk. Now you can specify the else path in the filter mediator using the <then> and the <else> elements as follows;

<filter (source="xpath" regex="string") | xpath="xpath">
  <then [sequence="string"]>
    mediator+
  </then>
  <else [sequence="string"]>
    mediator+
  </else>
</filter>

Most importantly, this does not break the earlier configuration but if you need to use the ELSE behavior you will need to use the above configuration.

Ruwan

> Support for an ELSE for the Filter (IF) mediator
> ------------------------------------------------
>
>                 Key: SYNAPSE-234
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-234
>             Project: Synapse
>          Issue Type: Improvement
>            Reporter: Asankha C. Perera
>            Assignee: Ruwan Linton
>             Fix For: 1.2
>
>
> Would be better to be able to specify what needs to be done if a filter condition evaluates to false

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Issue Comment Edited: (SYNAPSE-234) Support for an ELSE for the Filter (IF) mediator

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576606#action_12576606 ] 

ruwan edited comment on SYNAPSE-234 at 3/8/08 12:35 PM:
---------------------------------------------------------------

In order to support this requirement, I would like to suggest the following configuration for the Filter mediator

<filter (source="xpath" regex="string") | xpath="xpath">
   <onSuccess [sequence="string"]>
      mediator+
   </onSuccess>
   <onFail [sequence="string"]>
      mediator+
   </onFail>
</filter>

but this will lead to a compatibility issue, the only way that we can solve the issue without breaking the compatibility is by disabling the else sequence inline specification.

That will lead to the following configuration, I would prefer the former though, this will not break the compatibility; and the onFial sequence is always a referred sequence.

<filter (source="xpath" regex="string") | xpath="xpath" [onFail="string"]>
   mediator+
</filter>

WDYT?

Thanks,
Ruwan

      was (Author: ruwan):
    In order to support this requirement, I would like to suggest the following configuration for the Filter mediator

<filter (source="xpath" regex="string") | xpath="xpath">
   <onSuccess [sequence="string"]>
      mediator+
   </onSuccess>
   <onFail [sequence="string"]>
      mediator+
   </onFail>
</filter>

but this will lead to a compatibility issue, the only way that we can solve the issue without breaking the compatibility is by disabling the else sequence inline specification.

That will lead to the following configuration, I would prefer the former though, this will not break the compatibility; and the onFial sequence is always a referred sequence.

<filter (source="xpath" regex="string") | xpath="xpath" [onFial="string"]>
   mediator+
</filter>

WDYT?

Thanks,
Ruwan
  
> Support for an ELSE for the Filter (IF) mediator
> ------------------------------------------------
>
>                 Key: SYNAPSE-234
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-234
>             Project: Synapse
>          Issue Type: Improvement
>            Reporter: Asankha C. Perera
>            Assignee: Ruwan Linton
>
> Would be better to be able to specify what needs to be done if a filter condition evaluates to false

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Assigned: (SYNAPSE-234) Support for an ELSE for the Filter (IF) mediator

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Linton reassigned SYNAPSE-234:
------------------------------------

    Assignee: Ruwan Linton

> Support for an ELSE for the Filter (IF) mediator
> ------------------------------------------------
>
>                 Key: SYNAPSE-234
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-234
>             Project: Synapse
>          Issue Type: Improvement
>            Reporter: Asankha C. Perera
>            Assignee: Ruwan Linton
>
> Would be better to be able to specify what needs to be done if a filter condition evaluates to false

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-234) Support for an ELSE for the Filter (IF) mediator

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576606#action_12576606 ] 

Ruwan Linton commented on SYNAPSE-234:
--------------------------------------

In order to support this requirement, I would like to suggest the following configuration for the Filter mediator

<filter (source="xpath" regex="string") | xpath="xpath">
   <onSuccess [sequence="string"]>
      mediator+
   </onSuccess>
   <onFail [sequence="string"]>
      mediator+
   </onFail>
</filter>

but this will lead to a compatibility issue, the only way that we can solve the issue without breaking the compatibility is by disabling the else sequence inline specification.

That will lead to the following configuration, I would prefer the former though, this will not break the compatibility; and the onFial sequence is always a referred sequence.

<filter (source="xpath" regex="string") | xpath="xpath" [onFial="string"]>
   mediator+
</filter>

WDYT?

Thanks,
Ruwan

> Support for an ELSE for the Filter (IF) mediator
> ------------------------------------------------
>
>                 Key: SYNAPSE-234
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-234
>             Project: Synapse
>          Issue Type: Improvement
>            Reporter: Asankha C. Perera
>            Assignee: Ruwan Linton
>
> Would be better to be able to specify what needs to be done if a filter condition evaluates to false

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org