I have a main process which contains a sub process like following images.
http://community.jboss.org/servlet/JiveServlet/downloadImage/2-632109-17172/450-274/mysubws-image.png
the sub-process image is like following:
http://community.jboss.org/servlet/JiveServlet/downloadImage/2-632109-17173/450-274/get_model_price-image.png
the "Get mode Price "task will bing to customized WorkItemHandler.
the WorkItemHandler codes roughly like
public class PriceModelHandler implements WorkItemHandler {
@Override
public void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {
// TODO Auto-generated method stub
}
@Override
public void executeWorkItem(WorkItem w, WorkItemManager m) {
String modelNumber = (String)w.getParameter("modelNumber");
//????
kcontext.setVariable("price",123);
//???? get an object like kcontext in order to call setVariable("variable",valeu);
m.completeWorkItem(w.getId(), null);
}
}
my question is how to get an object like kcontext in executeWorkItem method in order to call setVariable to save the variable value for later use by
other tasks following.