@Shrikant Bhosle
Sample code:
WorkItem workItem = (WorkItem) persistable;
WTPrincipalReference user;
String routId;
WfActivity wfActivity = (WfActivity) workItem.getSource().getObject();
WfProcess wfProcess = wfActivity.getParentProcess();
// check activity if complete.
if (!workItem.isComplete()) {
// complete workitem
String comments = "";
List<String> eventList = new ArrayList<String>();
eventList.add(routId);
WorkflowHelper.service.workComplete(workItem, user, CollectionUtil.toVector(eventList));
WfEventHelper.createVotingEvent(null, wfActivity, workItem, user, comments,CollectionUtil.toVector(eventList),false, workItem.isRequired());
wfProcess = (WfProcess) PersistenceHelper.manager.refresh(wfProcess);
}