nt2005 [
https://community.jboss.org/people/nt2005] created the discussion
"Re: Process persistense - change WHEN it should happen!"
To view the discussion, visit:
https://community.jboss.org/message/744305#744305
--------------------------------------------------------------
Hey guys,
There is a simple question, if I do something wrong.
I have many own workitems they look like this:
public class SimpleWorkItem implements WorkItemHandler {
public static final String NAME = "simple";
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
System.out.println("WorkItemHandler ->" + workItem.getId() + " -
" + workItem.getName());
// do anything else
manager.completeWorkItem(workItem.getId(), results);
}
public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {
}
}
After start a process and look in the sql command I noticed, that each workitems get a
sql-query like:
Hibernate:
insert
into
WorkItemInfo
(creationDate, name, processInstanceId, state, OPTLOCK, workItemByteArray,
workItemId)
values
(?, ?, ?, ?, ?, ?, ?)
Hibernate:
update
WorkItemInfo
set
creationDate=?,
name=?,
processInstanceId=?,
state=?,
OPTLOCK=?,
workItemByteArray=?
where
workItemId=?
and OPTLOCK=?
Hibernate:
delete
from
WorkItemInfo
where
workItemId=?
and OPTLOCK=?
Is this really necessary - or do I use WorkItems wrong? There was no break between
execution, just ksession.startProcess(....)
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/744305#744305]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]