@Override
	public UserTaskInstanceDesc getTaskByWorkItemId(Long workItemId) {
		Map<String, Object> params = new HashMap<String, Object>();
        params.put("workItemId", workItemId);
        params.put("maxResults", 1);
        List<UserTaskInstanceDesc> tasks = commandService.execute(
				new QueryNameCommand<List<UserTaskInstanceDesc>>("getTaskInstanceByWorkItemId", params));

    	if (!tasks.isEmpty()) {
        	return tasks.iterator().next();
        }
        return null;
	}
@ Override public UserTaskInstanceDesc getTaskByWorkItemId ( Long workItemId ) { Map < String , Object > params = new HashMap < String , Object > ( ) ; params . put ( "workItemId" , workItemId ) ; params . put ( "maxResults" , 1 ) ; List < UserTaskInstanceDesc > tasks = commandService . execute ( new QueryNameCommand < List < UserTaskInstanceDesc > > ( "getTaskInstanceByWorkItemId" , params ) ) ; if ( ! tasks . isEmpty ( ) ) { return tasks . iterator ( ) . next ( ) ; } return null ; }
/*
start
task methods