Workflow: An error has occured in Approval

Workflow: An error has occured in Approval

I have created a custom approval workflow in a document library. On customize workflow screen I selected the following option:

[x] Update the approval status (use this workflow to control content approval)
During workflow testing I was surprised when SharePoint reported the following error:
An error has occured in Approval.“

The solution for this problem is very simple, if you want your workflow to update approval status you need to enable content approval in your document library. To enable content approval here is what you need to do: Go to your document library Settings > Versioning Settings and select „Yes” for “Require content approval for submitted items?“ option.