cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to rewrite comments in AssignedActivity ?

Highlighted
Newbie

How to rewrite comments in AssignedActivity ?

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;

}

}


Announcements