...
Because task is already completed some operations (example; trying to set action on current workitem) are invalid at this stage and error is thrown.
Postwork script defined area is reached from related task. When you click on "Postwork script" button on the task, postwork script page will open.
Example:
In postwork script following objects are available:
...