jBPM3: JSF expressions are/can be limited because sessions can be closed since things are lazy loaded. Either create a custom bean that handles request and/or use e.g. seam.
If e.g. the taskInstance is loaded and this is 'outjected' in jsf, taskInstance.id works.
Thanks Ronald. I have decided to write a custom bean to retrieive task details based on process instance id which I have.
List listActiveTasks = jbpmContext.getTaskMgmtSession().findTaskInstancesByProcessInstance(processInstance); Long taskId = (((TaskInstance) listActiveTasks.get(0)).getId());
This works fine if I dont have a fork in my process definition. If I have a fork the list has more than one task id..any idea to deal with the situation?
Yes, just make sure you 'know' which task you have to use.... This 'knowing' is completely depending on your application design. e.g. storing a reference to the task in your domain model or vice-versa
yes..sorted..thanks for your pointers..