HowTo: Close and complete a Workitem using the Workflow API

Official Content
This documentation is valid for:

Suppose that you want to complete the workitem automatically, once the associated application has been processed. In this case, you can execute the following code:

&WorkflowContext.Workitem.Complete()
commit
return

Where the data types variables are the following:

&WorkflowContext – WorkflowContext