public Object getWorkflowState(Object parameters) throws Exception { LOGGER.debug("getWorkflowState: " + parameters); Exchange exchange = endpoint.createExchange(parameters, SWFConstants.GET_STATE_ACTION); getProcessor().process(exchange); return endpoint.getResult(exchange); }
public Object processWorkflow(Object[] parameters, long startTime, boolean replaying) throws Exception { LOGGER.debug("Processing workflow task: " + parameters); Exchange exchange = endpoint.createExchange(parameters, SWFConstants.EXECUTE_ACTION); exchange.getIn().setHeader(SWFConstants.WORKFLOW_START_TIME, startTime); exchange.getIn().setHeader(SWFConstants.WORKFLOW_REPLAYING, replaying); getProcessor().process(exchange); return endpoint.getResult(exchange); }
public void signalRecieved(Object[] parameters) throws Exception { LOGGER.debug("signalRecieved: " + parameters); Exchange exchange = endpoint.createExchange(parameters, SWFConstants.SIGNAL_RECEIVED_ACTION); exchange.setPattern(InOnly); getProcessor().process(exchange); }
@Override protected void doStart() throws Exception { CamelWorkflowDefinitionFactoryFactory factoryFactory = new CamelWorkflowDefinitionFactoryFactory(this, configuration); genericWorker = new GenericWorkflowWorker( endpoint.getSWClient(), configuration.getDomainName(), configuration.getWorkflowList()); genericWorker.setWorkflowDefinitionFactoryFactory(factoryFactory); genericWorker.start(); super.doStart(); }