-
1. Re: populating JMS Queue using Human Task Handler
seeni Apr 4, 2014 2:50 AM (in response to seeni)Hi All,
There is some progress in invoking Human Task Handler. I mapped a Work Item Handler to Human Task with an entry (given below) in CustomWorkItemHandlers.conf
"Human Task" : new com.sample.WIH1()
Pasting below the WIH1 class. The constructor is getting executed as control comes to the Human Task. The executeWorkItem(..) method is not getting executed. I am not finding any relevant errors in the SystemOut.log. Also i am unable to perform the necessary operations in the constructor as i dont have access to WorkItem in the Constructor. Please let me know if any other configuration needs to be made.
package com.sample;
import org.jbpm.process.instance.impl.humantask.HumanTaskHandler;
import org.kie.api.runtime.process.WorkItem;
import org.kie.api.runtime.process.WorkItemHandler;
import org.kie.api.runtime.process.WorkItemManager;
public class WIH1 extends HumanTaskHandler {
public WIH1() {
System.out.println("Constructor WIH1");
}
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
// extract parameters
System.out.println("inside executeWI of WIH1");
System.out.println("To be completed - WIH1");
System.out.println("workItem.getId() =" + workItem.getId());
//manager.completeWorkItem(workItem.getId(), null);
}
Thanks,
Seeni