Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
If the AssignedActivity is done and the comments has been write in DB,how could I rewrite it?
WTDocument doc_1 = null;
doc_1 = cc.getDoc(docNumber,false); //get WTDocument handle
wt.fc.QueryResult QR = wt.workflow.work.WorkflowHelper.service.getWorkItems(doc_1);
while(QR.hasMoreElements())
{
wt.workflow.work.WorkItem workitem = (wt.workflow.work.WorkItem)QR.nextElement();
wt.workflow.engine.WfActivity wfactivity = (wt.workflow.engine.WfActivity)workitem.getSource().getObject();
if(wfactivity.getName().equals(TaskaName))
{
wt.workflow.work.WfAssignedActivity ac=(wt.workflow.work.WfAssignedActivity)workitem.getSource().getObject();
wt.workflow.engine.ProcessData processData = ac.getContext();
processData.setTaskComments("new comments"); //set new comments
//----------------I try to update AssignedActivity and WTDocument, but it has no effect
//PersistenceServerHelper.manager.update(ac);
//PersistenceServerHelper.manager.update(doc_1);
out.print("done~");
break;
}
}