我正在尝试开发一个应用程序drools
,
我的rf
文件如下图所示。
对于用户任务,我将演员名称设置为"MyName"
。
现在我正在从我的这个文件中读取规则java program.
我想要name of actor
.
我怎么能得到演员的名字?
我的java代码:
TaskServiceSession taskSession = taskService.createSession();
MinaTaskServer server = new MinaTaskServer( taskService);
Thread thread = new Thread( server );
thread.start();
StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession();
HumanTaskHandler handler1 = new HumanTaskHandler();
ksession.getWorkItemManager().registerWorkItemHandler("Log", handler1);
WSHumanTaskHandler handler = new WSHumanTaskHandler();
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", handler);
KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, "test");
// start a new process instance
ksession.startProcess("HumanTaskSample");