I'm writing a workflow to delete a page. In our project user requires that Delete page action need approval. Initiator run the workflow on certain page (workflow's paylaod). Once approver approve, the page (i.e. paylaod) will be delete.
Here is the problem: delete action is written in the end of workflow's ecma: pageManager["delete"](payloadresource, false);
Once this code is executed, the workflow status will change to "ABORTED" as it's payload is deleted. I expect workflow status will be COMPLETED.
Do you have any suggestions?