Skip to content

Instantly share code, notes, and snippets.

@javaduke
Created December 16, 2011 14:57
Show Gist options
  • Save javaduke/1486354 to your computer and use it in GitHub Desktop.
Save javaduke/1486354 to your computer and use it in GitHub Desktop.
package com.mulesoft.mule.droolsjbpmexample
import org.mule.MessageExchangePattern;
import com.mulesoft.mule.droolsjbpmexample.Order;
global org.mule.module.bpm.MessageService mule;
# default dialect for the semantic code will be MVEL
dialect "mvel"
declare Order
@role( event )
end
rule "Select warehouse A"
lock-on-active
when
$order : Order( weight > 50 )
then
modify( $order ) { setDestination("WAREHOUSE_A") }
end
rule "Select warehouse B"
lock-on-active
when
$order : Order( weight <= 50 )
then
modify( $order ) { setDestination("WAREHOUSE_B") }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment