我在drools guvnor 中创建了一个“新规则”。我想用流程实例变量创建一个事实。我试过的规则:
rule "CreatePersonFact"
ruleflow-group "CreatePerson"
dialect "mvel"
when
$process: WorkflowProcessInstance()
then
Person $person = new Person();
$person.name=$processInstance.getVariable("person_name");
$person.age=$processInstance.getVariable("age");
$person.weight=$processInstance.getVariable("weight");
insert($person);
end
当我构建包时,我收到错误“无法解析 ObjectType WorkflowProcessInstance ”
我希望我们应该在规则中导入org.drools.runtime.process.WorkflowProcessInstance来解决这个错误。如何在 Guvnor 的 BRL 编辑器中添加此导入语句?