test_class.declarator: wod = new WoDispatcher()
test_class.modifier: private final
test_class.original_string: private final WoDispatcher wod = new WoDispatcher();
test_class.type: WoDispatcher
test_class.var_name: wod
test_class.file: controller/src/test/java/com/oneops/controller/workflow/WoDispatcherTest.java
test_class.identifier: WoDispatcherTest
test_case.body: @Test
  	public void distachWOTest(){
  		DelegateExecution delegateExecution = mock(DelegateExecution.class);
  
  		
  		CmsWorkOrderSimple cmsWorkOrderSimple = new CmsWorkOrderSimple();
  		CmsRfcCISimple rfcCi = new CmsRfcCISimple();
  		rfcCi.setImpl("class::com.oneops.controller.workflow.WoProcessorMockImpl::rfc::impl");
  		cmsWorkOrderSimple.rfcCi= rfcCi;
  		
  		when(delegateExecution.getVariable("wo")).thenReturn(cmsWorkOrderSimple);
  		
  		when(delegateExecution.getId()).thenReturn("88888");
  
  		when(delegateExecution.getProcessInstanceId()).thenReturn("55555");
  		
  		wod.dispatchWO(delegateExecution, cmsWorkOrderSimple, "mock-waiter");
  		
  	}
test_case.class_method_signature: WoDispatcherTest.distachWOTest()
test_case.full_signature: @Test public void distachWOTest()
test_case.identifier: distachWOTest
test_case.invocations: mock setImpl thenReturn when getVariable thenReturn when getId thenReturn when getProcessInstanceId dispatchWO
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void distachWOTest()
focal_class.declarator: ERROR_MESSAGE = "error-message"
focal_class.modifier: private static final
focal_class.original_string: private static final String ERROR_MESSAGE = "error-message";
focal_class.type: String
focal_class.var_name: ERROR_MESSAGE
focal_class.declarator: logger = Logger.getLogger(WoDispatcher.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger logger = Logger.getLogger(WoDispatcher.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: inductorPublisher
focal_class.modifier: private
focal_class.original_string: private InductorPublisher inductorPublisher;
focal_class.type: InductorPublisher
focal_class.var_name: inductorPublisher
focal_class.declarator: wfController
focal_class.modifier: private
focal_class.original_string: private WorkflowController wfController;
focal_class.type: WorkflowController
focal_class.var_name: wfController
focal_class.declarator: cmsClient
focal_class.modifier: private
focal_class.original_string: private CMSClient cmsClient;
focal_class.type: CMSClient
focal_class.var_name: cmsClient
focal_class.declarator: sensorClient
focal_class.modifier: private
focal_class.original_string: private SensorClient sensorClient;
focal_class.type: SensorClient
focal_class.var_name: sensorClient
focal_class.declarator: WAIT_STATE_NODE = "pwoWaitResponse"
focal_class.modifier: private static
focal_class.original_string: private static String WAIT_STATE_NODE = "pwoWaitResponse";
focal_class.type: String
focal_class.var_name: WAIT_STATE_NODE
focal_class.declarator: NR_OF_INSTANCES = "nrOfInstances"
focal_class.modifier: private static
focal_class.original_string: private static String NR_OF_INSTANCES = "nrOfInstances";
focal_class.type: String
focal_class.var_name: NR_OF_INSTANCES
focal_class.declarator: LOOP_COUNTER = "loopCounter"
focal_class.modifier: private static
focal_class.original_string: private static String LOOP_COUNTER = "loopCounter";
focal_class.type: String
focal_class.var_name: LOOP_COUNTER
focal_class.declarator: gson = new Gson()
focal_class.modifier: final private
focal_class.original_string: final private Gson gson = new Gson();
focal_class.type: Gson
focal_class.var_name: gson
focal_class.file: controller/src/main/java/com/oneops/controller/workflow/WoDispatcher.java
focal_class.identifier: WoDispatcher
focal_class.class_method_signature: WoDispatcher.setCmsClient(CMSClient cmsClient)
focal_class.full_signature: public void setCmsClient(CMSClient cmsClient)
focal_class.identifier: setCmsClient
focal_class.modifiers: public
focal_class.parameters: (CMSClient cmsClient)
focal_class.return: void
focal_class.signature: void setCmsClient(CMSClient cmsClient)
focal_class.class_method_signature: WoDispatcher.setInductorPublisher(InductorPublisher inductorPublisher)
focal_class.full_signature: public void setInductorPublisher(InductorPublisher inductorPublisher)
focal_class.identifier: setInductorPublisher
focal_class.modifiers: public
focal_class.parameters: (InductorPublisher inductorPublisher)
focal_class.return: void
focal_class.signature: void setInductorPublisher(InductorPublisher inductorPublisher)
focal_class.class_method_signature: WoDispatcher.setWfController(WorkflowController wfController)
focal_class.full_signature: public void setWfController(WorkflowController wfController)
focal_class.identifier: setWfController
focal_class.modifiers: public
focal_class.parameters: (WorkflowController wfController)
focal_class.return: void
focal_class.signature: void setWfController(WorkflowController wfController)
focal_class.class_method_signature: WoDispatcher.dispatchAndUpdate(CmsDeployment dpmt, WorkOrderContext woContext)
focal_class.full_signature: public void dispatchAndUpdate(CmsDeployment dpmt, WorkOrderContext woContext)
focal_class.identifier: dispatchAndUpdate
focal_class.modifiers: public
focal_class.parameters: (CmsDeployment dpmt, WorkOrderContext woContext)
focal_class.return: void
focal_class.signature: void dispatchAndUpdate(CmsDeployment dpmt, WorkOrderContext woContext)
focal_class.class_method_signature: WoDispatcher.dispatchWO(WorkOrderContext woContext, CmsWorkOrderSimple assembledWo)
focal_class.full_signature: public void dispatchWO(WorkOrderContext woContext, CmsWorkOrderSimple assembledWo)
focal_class.identifier: dispatchWO
focal_class.modifiers: public
focal_class.parameters: (WorkOrderContext woContext, CmsWorkOrderSimple assembledWo)
focal_class.return: void
focal_class.signature: void dispatchWO(WorkOrderContext woContext, CmsWorkOrderSimple assembledWo)
focal_class.class_method_signature: WoDispatcher.publishMessage(CmsActionOrderSimple ao, String woType)
focal_class.full_signature: public void publishMessage(CmsActionOrderSimple ao, String woType)
focal_class.identifier: publishMessage
focal_class.modifiers: public
focal_class.parameters: (CmsActionOrderSimple ao, String woType)
focal_class.return: void
focal_class.signature: void publishMessage(CmsActionOrderSimple ao, String woType)
focal_class.class_method_signature: WoDispatcher.dispatchWO(DelegateExecution exec, CmsWorkOrderSimple wo, String waitTaskName)
focal_class.full_signature: public void dispatchWO(DelegateExecution exec, CmsWorkOrderSimple wo, String waitTaskName)
focal_class.identifier: dispatchWO
focal_class.modifiers: public
focal_class.parameters: (DelegateExecution exec, CmsWorkOrderSimple wo, String waitTaskName)
focal_class.return: void
focal_class.signature: void dispatchWO(DelegateExecution exec, CmsWorkOrderSimple wo, String waitTaskName)
focal_class.class_method_signature: WoDispatcher.setOrCreateLocalVar(DelegateExecution exec, String name, Object value)
focal_class.full_signature: private void setOrCreateLocalVar(DelegateExecution exec, String name, Object value)
focal_class.identifier: setOrCreateLocalVar
focal_class.modifiers: private
focal_class.parameters: (DelegateExecution exec, String name, Object value)
focal_class.return: void
focal_class.signature: void setOrCreateLocalVar(DelegateExecution exec, String name, Object value)
focal_class.class_method_signature: WoDispatcher.processWOResult(WoProcessResponse woResult)
focal_class.full_signature: public void processWOResult(WoProcessResponse woResult)
focal_class.identifier: processWOResult
focal_class.modifiers: public
focal_class.parameters: (WoProcessResponse woResult)
focal_class.return: void
focal_class.signature: void processWOResult(WoProcessResponse woResult)
focal_class.class_method_signature: WoDispatcher.getAndDispatch(DelegateExecution exec, CmsWorkOrderSimple dpmtRec)
focal_class.full_signature: public void getAndDispatch(DelegateExecution exec, CmsWorkOrderSimple dpmtRec)
focal_class.identifier: getAndDispatch
focal_class.modifiers: public
focal_class.parameters: (DelegateExecution exec, CmsWorkOrderSimple dpmtRec)
focal_class.return: void
focal_class.signature: void getAndDispatch(DelegateExecution exec, CmsWorkOrderSimple dpmtRec)
focal_class.class_method_signature: WoDispatcher.handleReplace(CmsWorkOrderSimple wo)
focal_class.full_signature: private void handleReplace(CmsWorkOrderSimple wo)
focal_class.identifier: handleReplace
focal_class.modifiers: private
focal_class.parameters: (CmsWorkOrderSimple wo)
focal_class.return: void
focal_class.signature: void handleReplace(CmsWorkOrderSimple wo)
focal_class.class_method_signature: WoDispatcher.pokeSubProcAsync(final String procId, final String execId, final Map<String,Object> params)
focal_class.full_signature: private void pokeSubProcAsync(final String procId, final String execId, final Map<String,Object> params)
focal_class.identifier: pokeSubProcAsync
focal_class.modifiers: private
focal_class.parameters: (final String procId, final String execId, final Map<String,Object> params)
focal_class.return: void
focal_class.signature: void pokeSubProcAsync(final String procId, final String execId, final Map<String,Object> params)
focal_class.class_method_signature: WoDispatcher.setSensorClient(SensorClient sensorClient)
focal_class.full_signature: public void setSensorClient(SensorClient sensorClient)
focal_class.identifier: setSensorClient
focal_class.modifiers: public
focal_class.parameters: (SensorClient sensorClient)
focal_class.return: void
focal_class.signature: void setSensorClient(SensorClient sensorClient)
focal_method.body: public void dispatchWO(WorkOrderContext woContext, CmsWorkOrderSimple assembledWo) throws Exception {
  		try {
  			if (assembledWo.rfcCi.getImpl() == null) {
  				inductorPublisher.publishMessage(
  						Long.toString(assembledWo.getDeploymentId()), Long.toString(assembledWo.getDpmtRecordId()),
  						assembledWo, "", "deploybom");
  			} else {
  				String[] implParts = assembledWo.rfcCi.getImpl().split("::");
  				if ("class".equalsIgnoreCase(implParts[0])) {
  					WoProcessor wop = (WoProcessor) Class.forName(implParts[1]).newInstance();
  					String processComplexId = Integer.toString(woContext.getExecOrder());
  					WoProcessRequest wopr = new WoProcessRequest();
  					wopr.setProcessId(processComplexId);
  					wopr.setWo(assembledWo);
  					wop.processWo(wopr);
  				} else {
  					inductorPublisher.publishMessage(
  							Long.toString(assembledWo.getDeploymentId()), Long.toString(assembledWo.getDpmtRecordId()),
  							assembledWo, "", "deploybom");
  				}
  			}
  		} catch (Exception e) {
  			logger.error("unable to dispatch", e);
  			woContext.setWoDispatchError(e.getMessage());
  			throw e;
  		}
  	}
focal_method.class_method_signature: WoDispatcher.dispatchWO(WorkOrderContext woContext, CmsWorkOrderSimple assembledWo)
focal_method.full_signature: public void dispatchWO(WorkOrderContext woContext, CmsWorkOrderSimple assembledWo)
focal_method.identifier: dispatchWO
focal_method.invocations: getImpl publishMessage toString getDeploymentId toString getDpmtRecordId split getImpl equalsIgnoreCase newInstance forName toString getExecOrder setProcessId setWo processWo publishMessage toString getDeploymentId toString getDpmtRecordId error setWoDispatchError getMessage
focal_method.modifiers: public
focal_method.parameters: (WorkOrderContext woContext, CmsWorkOrderSimple assembledWo)
focal_method.return: void
focal_method.signature: void dispatchWO(WorkOrderContext woContext, CmsWorkOrderSimple assembledWo)