* @return The {@link RuntimeEngine} instance.
*/
public RuntimeEngine getRuntimeEngine(String deploymentId, Long processInstanceId) {
RuntimeManager runtimeManager = getRuntimeManager(deploymentId);
if (runtimeManager == null) {
throw new DeploymentNotFoundException("No runtime manager could be found for deployment '" + deploymentId + "'.");
}
Context<?> runtimeContext;
if( runtimeManager instanceof PerProcessInstanceRuntimeManager ) {
if( processInstanceId == null || processInstanceId < 0 ) {
if( processInstanceId != null ) {