The priority of a process instance can be changed via the following method setProcessInstancePriority:
ProcessInstance setProcessInstancePriority(long oid, int priority) throws ObjectNotFoundException; ProcessInstance setProcessInstancePriority(long oid, int priority, boolean propagateToSubProcesses) throws ObjectNotFoundException;
respectively in the AdministrationService.
You need to have the permission to modify process instances to be able to use one of these methods. Please refer to the section Permissions in the chapter Declarative Security Usage in Infinity Process Platform Services API for detailed information on this permission.
Parameters are the oid of the process instance and the new priority, which should be set for the process instance. Optional you can use the Boolean parameter propagateToSubProcesses, which determines, if the priority will be propagated to all subprocesses (true) or not (false). The return value is the process instance that was changed. In case no process instance with the given OID is found, an ObjectNotFoundException is thrown.