String[] taskIds = getTaskIds(instance);
if(taskIds == null || taskIds.length == 0){
addWorkitem(instance, DefaultWorkList.WORKITEM_STATUS_DRAFT);
}else{ //wl update : flag 'DRAFT'
WorkList wl = (new WorkListServiceLocator()).getWorkList();
ResultPayload rp = new ResultPayload();
rp.setExtendedValue(new KeyedParameter(KeyedParameter.DEFAULT_STATUS, DefaultWorkList.WORKITEM_STATUS_DRAFT));
rp.setExtendedValue(new KeyedParameter("saveDate", now));