Diduch Cordova [
http://community.jboss.org/people/diduch] created the discussion
"Re: understanding taskclient"
To view the discussion, visit:
http://community.jboss.org/message/589086#589086
--------------------------------------------------------------
I AM WORKING WITH THIS... IN THE PROPERTIES OF THE EMAIL SERVICE TASK, I FILLED
TO,SUBJECT,FROM AND BODY... WHEN I RUNNING DE PROCESS IN DEBUG.. THE PROCESS COMES TO THE
EMAIL TASK BUT DONT SEND THE EMAIL AND DONT PASS TO NEXT USER TASK....
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");
EmailWorkItemHandler handler = new
EmailWorkItemHandler("smtp.gmail.com", "465", "
mailto:user@gmail.com user(a)gmail.com","password");
ksession.getWorkItemManager().registerWorkItemHandler("Email",
handler);
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/589086#589086]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]