Can someone please advise on this?
Could you expand the concept of "graphical view of work item" and "graphical view of the tasks"? Are you talking about UI?
Yes..its related to UI and i want to show the diagram of a particular process instance on where ity is pending.in jbpm console we have that feature which shows the workflow diagram and the current step.
I am just trying to figure out how to do it using the APIs
I think that the graph in jbpm-console is not being auto-generated. You have to upload a .png image of it. I didn't check the code, so I'm not sure about it. Using Drools/jBPM5 APIs, you can get the process structure and the runtime information. If you want to create a graphical representation of your process, then (I think) you are on your own. Maybe you can take a look at jBPM eclipse plugin or even Oryx to get an idea of how to do that. jBPM Eclipse plugin creates the image from the process object model. In the other hand, Oryx does it from the xml definition of your process.