return processInstance;
}
public ProcessInstance getProcessInstance(final Process process) {
ProcessInstanceFactoryRegistry processRegistry = ((InternalRuleBase) getRuleBase()).getConfiguration().getProcessInstanceFactoryRegistry();
ProcessInstanceFactory conf = processRegistry.getProcessInstanceFactory( process );
if ( conf == null ) {
throw new IllegalArgumentException( "Illegal process type: " + process.getClass() );
}
ProcessInstance processInstance = conf.createProcessInstance();
if ( processInstance == null ) {
throw new IllegalArgumentException( "Illegal process type: " + process.getClass() );
}
return processInstance;
}