Below is an example code is to mark the Worklist Entry as completed once the corresponding request is approved.
import PT_WF_WORKLIST:*;
Local WorklistEntry &worklist;
&worklist = create WorklistEntry();
&worklist.busprocname = "Administer Workflow";
&worklist.busactivity = "Send Note";
&worklist.buseventname = "Worklist Note";
&worklist.worklistname = "Worklist Note";
&worklist.instanceid = 2;
&ret = &worklist.SelectByKey();
&worklist.inststatus = "2"; /* mark entry worked */
If (&worklist.Update() <> 0) Then
If (&worklist.Save() <> 0) Then
/* success */
Else
/* handle error */
End-If;
Else
/* handle error */
End-If;
The other values for inststatus are given below. This property is read-write:
0: New worklist entry
1: Selected worklist entry
2: Worked worklist entry
3: Cancel string
No comments:
Post a Comment