This documentation is for WSO2 Complex Event Processor 4.0.0. View documentation for the latest release.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  • Extension Type: Window
  • Description: Sort Processor will holds up to windowLength events and sort them in a given order.
  • Parameter: windowLength: for the number of events the window should tumble.
  • Parameter: attribute: attribute that should be checked for the order.
  • Parameter: order: order of the attribute defined by "asc" or "desc". If neither "asc" nor "desc" is given for a certain attribute, order defaults to "asc".
  • Return Type: Return current and expired events.
  • Examples: sort(5, volumeprice, 'asc', price, 'desc') will return ) keeps the events sorted by price in ascending order of volume and descending order of price for a window of 5 eventsthe ascending order. Therefore, at any given time, the window contains the 5 lowest prices.