}
}
public ProcessInstance startProcess(final String processId) {
final Process process = ((InternalRuleBase) getRuleBase()).getProcess( processId );
if ( process == null ) {
throw new IllegalArgumentException( "Unknown process ID: " + processId );
}
if ( process instanceof RuleFlowProcess ) {
final RuleFlowProcessInstance processInstance = new RuleFlowProcessInstanceImpl();
processInstance.setWorkingMemory( this );
processInstance.setProcess( process );
processInstance.setId( ++processCounter );
processInstance.start();
getRuleFlowEventSupport().fireRuleFlowProcessStarted( processInstance,
this );
return processInstance;
} else {
throw new IllegalArgumentException( "Unknown process type: " + process.getClass() );
}
}