我是 drools 的新手,并且有一个场景,我需要从 drools 调用 mule 流。我已经定义了如下的 mule 流程,并希望根据某些条件调用其中一个流程。
<flow name="Flow1">
<http:listener config-ref="flw1" path="/check1" doc:name="Evaluation Srv" />
<http:request config-ref="Proxy" path="/check1" method="GET" doc:name="basic validation" />
</flow>
<flow name="Flow2">
<http:listener config-ref="flw1" path="/check2" doc:name="Notification" />
<http:request config-ref="Proxy" path="/check2" method="GET" doc:name="Personal validation">
</http:request>
</flow>
我有一个示例 drools 文件,如下所示
#default dialect for the semantic code will be MVEL
global org.mule.module.bpm.MessageService mule;
import com.mule.sbus.drools.RequestUrl
dialect "mvel"
declare RequestUrl
@role(event)
end
rule "/check1"
lock-on-active
when
$url:RequestUrl(url=="check1")
then
#invoke flow1
end
rule "/check2"
lock-on-active
when
$url:RequestUrl(url=="check2")
then
#invoke flow 2
end
请让我知道如何从流口水调用流程