就業規則:
rule "it is morning before lunch"
ruleflow-group "define_period"
when
$process: WorkflowProcessInstance()
Hour(value >=6 && < 12) from $process.getVariable("hourOfDay")
then
System.out.println("Its morning");
end
授業時間:
public class Hour {
private Integer value;
public Hour() {}
public Hour(Integer value) {
this.value=value;
}
public void setValue(Integer value) {
this.value = value;
}
public Integer getValue() {
return value;
}
@Override
public String toString() {
return value+"h";
}
}
$process には、「文字列」型の「期間」という別の変数も含まれています。時間を比較する代わりにこれを使用したい。どうすればいいですか。私は置き換えてみました:
Hour(value >=6 && < 12) from $process.getVariable("hourOfDay")
と
String(this == "morning") from $process.getVariable("period")
と
String(value == "morning") from $process.getVariable("period")
しかし、それはうまくいきません。
さらに情報が必要な場合はお知らせください。ありがとう。