kathy89 [http://community.jboss.org/people/kathy89] created the discussion

"Re: event listeners"

To view the discussion, visit: http://community.jboss.org/message/609533#609533

--------------------------------------------------------------
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* *void*
main(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();
}

}



--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/609533#609533]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to