HumanTaskNodeInstance htask = (HumanTaskNodeInstance) nodeInstance;
i want to get workitem id for human tasks, so i am doing as follows:
htask.getWorkItemId() and it is showing correct id only.
but, when i restart the application this workitem id showing as 1.
Is this wokritem info is persisted or it resides in memory only.
and i am loading last saved session object by passing sessionid as follows:
loadStatefulKnowledgeSession(KnowledgeBase kbase, int sessionId)
1. Check the Task table the workitem id is there or not.
2. check the tables WORKITEMINFO is that your work item is persisted properlly or not.
otherwse add the class
<class>org.drools.persistence.info.WorkItemInfo</class> in your persistance .xml