Hi Constance,
From the workflow, you can add that when the activity is closed you perform some logic. For that, you just need to right click your Approval entity and add an OnClose event:

On the OnClose event created, you can add your logic.
In the case you want the other way around, i.e. to close the activity when you are updating the task, my suggestion is to create a wrapper that performs the update and exectutes the ActivityClose from System:
Kind Regards,
João