请帮助我,我是 jbpm 的新手,对我来说一切正常,但我想在完成我的个人工作项处理程序后返回我的“结果”输出参数,这是我的代码。
public void CreateCompute(String body) throws Exception
{
KnowledgeBase kbase = readKnowledgeBaseForCompute();
AssignTEPIPOnHypervisor tepIP = new AssignTEPIPOnHypervisor();
CreateIntegratedBridgeOnHost IB = new CreateIntegratedBridgeOnHost();
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
ksession.getWorkItemManager().registerWorkItemHandler("AssignTEPIPToHypervisors", tepIP);
ksession.getWorkItemManager().registerWorkItemHandler("CreateIBOnHosts", IB);
System.out.println(" >>> Let's create a Persistent Knowledge Session");
Map<String,Object> params = new HashMap<String, Object>();
params.put("payload", body);
params.put("session_id",Integer.toString(ksession.getId()));
System.out.println(">>> Let's Start the Process");
ksession.startProcess("com.cl.cloud.createcompute", params);
System.out.println(">>> Disposing Session");
}