Change WRE Workflow State on multiple documents

The current process is to select one document at a time and change the WRE workflow states.

What we need is to be able to select 20 drawings for example and change state.

Ideally this would be done using the api and iterate through each document.

These two functions look promising: aaOApi_CallInstanceRule and aaApi_WREDoExecute

Is there a way to do this?