assertNotNull( processInstance );
Collection<NodeInstance> nodeInstances = processInstance.getNodeInstances();
assertEquals( 1,
nodeInstances.size() );
SubProcessNodeInstance subProcessNodeInstance = (SubProcessNodeInstance) nodeInstances.iterator().next();
long subProcessInstanceId = subProcessNodeInstance.getProcessInstanceId();
getProcessInstanceCommand = new GetProcessInstanceCommand();
getProcessInstanceCommand.setProcessInstanceId( subProcessInstanceId );
RuleFlowProcessInstance subProcessInstance = (RuleFlowProcessInstance) service.execute( getProcessInstanceCommand );
assertNotNull( subProcessInstance );
service.dispose();