本文共 1178 字,大约阅读时间需要 3 分钟。
/** * This function gets the use input from workflow zone, relates it to a task * and completes the task.The function uses instance reference id for * identifying process instance. */ public String completeTask(String strInstanceReferenceID, String strActivityLabel, Document payload) { System.out.println("completeTask-" + strInstanceReferenceID + "-" + strActivityLabel); String strStatus = "OK"; try { IWorklistService worklist = getWorklist(); // get task reference ITask task = getTask(strInstanceReferenceID, strActivityLabel); // set task payload task.setAttachment(payload.getDocumentElement()); worklist.completeTask(task); } catch (Exception e){ e.printStackTrace(); strStatus = ERROR_STRING; } return strStatus; } |