by passing username in a page i want to get name of completed task, available task,assigned task of a particular user using engine API. i have doubt this is possible using engine api or not.Thanks in advance.
You can use Bonita Engine REST API to do so. The easiest way to spot the API to call is to use the web developer tools of your web browser and take a look at the requests sent when using Bonita Portal. Of course I also recommend to read REST API documentation.
For example here is the call to get the list of task a user can do: API/bpm/humanTask?c=50&d=rootContainerId&f=state%3Dready&f=user_id%3D4&o=displayName+ASC&p=0
The list of task assigned to the user: API/bpm/humanTask?c=50&d=rootContainerId&f=state%3Dready&f=assigned_id%3D4&o=displayName+ASC&p=0
is it possible to get available task of particular user using role id?
It should be doable by searching which actors are mapped to the given role and then search pending task instances belonging to those actors.
I recommend to read the blog post about actors, candidates… it might help better understanding how a task is assigned to users in Bonita.