1

我已经开始探索 Drools 7.6.0 并创建了如下简单的指导规则。

package com.test.loanapprovalguidedrule;

import java.lang.Number;

rule "LoanApprovalGuidedRule"
    dialect "mvel"
    when
        loanApprovalDataObj : LoanApprovalDataobject( loanAmount == "100" )
    then
        loanApprovalDataObj.setLoanAmount( "100" );
end

   <batch-execution lookup="defaultKieSession">
        <insert out-identifier="translator" return-object="true">
            <com.test.loanapprovalguidedrule.LoanApprovalDataobject>
                <loanAmount>100</loanAmount>
            </com.test.loanapprovalguidedrule.LoanApprovalDataobject>
        </insert>
        <fire-all-rules/>
    </batch-execution> 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response type="SUCCESS" msg="Container LoanApprovalGuidedRule successfully called.">
    <execution-results>
        <results>
            <item key="translator"/>
        </results>
        <facts>
            <item key="translator"/>
        </facts>
    </execution-results>
</response>

http://localhost:8080/kie-server/services/rest/server/containers/instances/LoanApprovalGuidedRule

端点总是返回上面的虚拟响应,响应为 200。如果我在这里遗漏了什么,请有人帮助我。

4

0 回答 0