Hi,
Ok, I understand what you would like (and I understand you may have your reasons for wanting to do that).
I thought it was an interesting thought experiment, so I came up with a simple way for you to do it.
Create a Boolean process variable called something like Process.StartSuspended, whose default value is False.
The first operator in your process can be an evaluate expression which checks to see if the value is true, if it isn't (by default) the process would execute normally. But if you have passed a value of Process.StartSuspended = True via the REST API to start the job, it would trigger a PUT REST API command to CAPA to suspend the job.
So basically your PUT operator pre-execution code would be something like:
Process[OpName].TestURL = "https://servername:port/api/rest/v1/processinstances/" + Process.RuntimeROID + "/suspend";
This would pass the current job's ROID to the API and tell it to suspend (itself), I then added a small delay of 30 seconds just in case the API command takes a few seconds to kick in.
From my tests, this seemed to work pretty quickly, and the jobs were suspended.
Hope this helps!
Ian
