1) use the following method to get the latest Process Definition
Jbpmcontext. getcurrentjbpmcontext (). getgraphsession (). findlatestprocessdefinitions ();
2) the above method returns a list of process definitions, which are displayed on the page.
For example, the method to display the name of the startup node is:
Processdefinition. gettaskmgmtdefinition (). getstarttask (). getname ();
3) The process definition ID is passed on JSP. In servlet, processdefinition is obtained using the following method:
Processdefinition = graphsession. loadprocessdefinition (processdefinitionid );
4) Complete the Start Node:
Processinstance = new processinstance (processdefinition );
// Create a new taskinstance for the start task
Taskinstance = processinstance. gettaskmgmtinstance (). createstarttaskinstance ();
// Save the process instance along with the task instance
Jbpmcontext. Save (processinstance );