hi Esteban,
i do not know where to add the code... i'm not using "kstateful" :| .here is the ProcessTest.java code.
thank you for replying soon :)
public class
ProcessTest {
public static final voidmain(String[] args) {
try
{
// load up the knowledge base
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newThreadedFileLogger(ksession,
"test"
, 1000);
ksession.getWorkItemManager().registerWorkItemHandler(
"Human Task", new
WSHumanTaskHandler());
// start a new process instance
Map<String, Object> params =
new
HashMap<String, Object>();
//params.put("employee", "krisv");
ksession.startProcess(
"com.sample.evaluation"
, params);
logger.close();
}
catch
(Throwable t)
{
t.printStackTrace();
}
}
private static KnowledgeBase readKnowledgeBase() throws
Exception {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource(
"Evaluation.bpmn"), ResourceType.BPMN2
);
return
kbuilder.newKnowledgeBase();
}
}