Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想启动多个 Drools Flow 流程,但是这段代码会阻塞:
ksession.startProcess( "com.sample.ruleflow" );
我怎样才能做到这一点?
StatefulKnowledgeSession.startProcess()仅在达到等待状态时才阻塞。
StatefulKnowledgeSession.startProcess()
如果您希望进程完全异步运行,则需要startProcess()从另一个线程调用。
startProcess()
但是,对于一个非常简单的进程(没有可能的等待状态),它很可能会在当前线程中执行下一行代码之前开始和结束,给人一种实际上没有阻塞行为的印象。