I notice one can create a workflow to auto-magically generate documents via a Workflow which invokes the Nintex webservices. This process requires one or more Drawloop_Next# fields because each step is mutually disconnected, and so these fields are used to pass the various parameters such as attachments or delivery method.
I notice when using the client-side Javascript button, all the parameters necessary for Nintex to generate the desired document are sent right up to Nintex just fine w/o any need for Drawloop_Next# fields; the user just clicks the button and checks the attachments (if any) and the delivery method.
Could not an Apex Trigger invoke an Apex class (decorated with @Future of course) to automate the process similar to a Workflow, but possibly w/o the need to create one or more Drawloop_Next# fields since the Apex class could implement the rules regarding which attachments or which delivery method? In essence, could not an Apex trigger invoke the same end-point as the client-side Javascript?