Sandra Renaud [
https://community.jboss.org/people/joploya] created the discussion
"Human task + HornetQ + persistence + MySQL => ununderstanding stacktrace"
To view the discussion, visit:
https://community.jboss.org/message/772405#772405
--------------------------------------------------------------
Hello... or welcome back,
I go from error to error with jbpm and Human task, trying using them in my web
application.
Last step was to connect the human task to LDAP and it seems working well :
16:30:13,329 INFO [stdout] (MSC service thread 1-6) HornetQ Task service started
correctly !
16:30:13,330 INFO [stdout] (MSC service thread 1-6) HornetQ Task service running ...
16:30:13,334 INFO [org.jbpm.task.service.UserGroupCallbackManager] (MSC service thread
1-6) UserGroupCallback registered: org.jbpm.task.service.LDAPUserGroupCallbackImpl
16:30:13,335 INFO [stdout] (MSC service thread 1-6) Task service startup completed
successfully !
So I return to the web app where I created a classe to manage the knowledgeSession (file
attach), that I use in my Bean :
try {
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession =
kbase.newStatefulKnowledgeSession();
KnowledgeRuntimeLogger logger =
KnowledgeRuntimeLoggerFactory.newThreadedFileLogger(ksession,
"/log/loggerFile.log", 1000);
HornetQHTWorkItemHandler hornetQHTWorkItemHandler = new
HornetQHTWorkItemHandler(ksession);
ksession.getWorkItemManager().registerWorkItemHandler("Human Task",
hornetQHTWorkItemHandler);
getFlowEntity().setCurrentGroup("AMS_CRW_"+getFlowEntity().getGlobalEntity().getCodifType()+"_CODIF");
getFlowEntity().setRequestorName(((UserLDAP)identity.getUser()).getUser().getFirstName()+"
"+((UserLDAP)identity.getUser()).getUser().getName());
//Add the current actor in CC
System.out.println("Add the current actor in
CC");
PeopleEntity requestor =
getCurrentPeople("AMS_CRW_PM_PL");
listCCnpl.add(requestor);
// ... some code
// start a new process instance
Map<String, Object> params = new HashMap<String,
Object>();
params.put("userId", requestor.getName());
params.put("userGroup", requestor.getRole());
params.put("flowId",
getFlowEntity().getFlowId());
ProcessInstance process =
ksession.startProcess("com.st.ams.flow.npl", params);
System.out.println("process =
"+process.getProcessId()+" : "+process.getProcessName()+" :
state("+process.getState()+")");
SystemEventListenerFactory.setSystemEventListener(new
SystemEventListener());
//Now the PM_PL process his task (it is already complete in
reality)
BlockingTaskSummaryResponseHandler
taskSummaryResponseHandler = new BlockingTaskSummaryResponseHandler();
List<String> groups = new ArrayList<String>();
groups.add(requestor.getRole());
System.out.println("Groups : ");
for(String grp : groups){
System.out.println(" - "+grp);
}
amsKnowledgeSession.getClient().getTasksAssignedAsPotentialOwner(requestor.getName(),
groups, "en-UK", taskSummaryResponseHandler);
List<TaskSummary> potentialTasks =
taskSummaryResponseHandler.getResults();
for(TaskSummary task : potentialTasks){
System.out.println("PM_PL can execute task
" + task.getName() + "(" + task.getId() + ": " +
task.getDescription() + ")");
}
} catch (Exception e) {
e.printStackTrace();
}
The process seams to be launched correctly but after there is a lot of error in many
threads (103, 106, 137 ....)
what do they mean?
Most of the entity mapped by the Human task have a field id, so what can be wrong with
persistence? And which persistence?(human-core, human task, or other...)
Thanks in advance to help me progress because the others thread of dicussion and
documentation don't help me at this point.
Another question linked is why human task generate a lot of tables like xxx_id_seq whereas
entities have an AutoGenerated id value?
Regards,
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/772405#772405]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]