【问题标题】:how to write ( A after max time B ) in CEP( Fusion ) Drools如何在 CEP(Fusion)Drools 中编写(A 在最大时间 B 之后)
【发布时间】:2017-06-01 17:35:42
【问题描述】:

在drools CEP中编写条件以推断的最佳方法是什么(A在最大时间B之后) 示例:

a : new A();
b : new B( this after [1m] )

上面的例子不是我需要的。

我需要这个:

a : new A();
b : new B( this after a , b.timestamp - a.timestamp <= 60000)

所以我重新提出了这个问题。用更少的指令获得相同结果的另一种方法是什么?

谢谢

【问题讨论】:

  • 如果我的建议都不符合您的要求,您需要更加详细,编辑您的问题。

标签: drools rule-engine business-rules drools-fusion


【解决方案1】:

编辑在澄清Q后

$a: A() $b: B( this after[ 0s, 60s ] $a )

如果 B 在 A 之后但不迟于 60 秒,则会触发此事件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-26
    • 2016-05-04
    • 1970-01-01
    • 2012-06-26
    • 1970-01-01
    相关资源
    最近更新 更多