@Test public void executeShouldDelegateToDefaultBehaviourWhenBeanIsAvailable() { DelegateExecution execution = mock(DelegateExecution.class); given(defaultServiceTaskBehavior.hasConnectorBean(execution)).willReturn(true); behavior.execute(execution); verify(defaultServiceTaskBehavior).execute(execution); }
@Override public void execute(DelegateExecution execution) { if (defaultServiceTaskBehavior.hasConnectorBean(execution)) { defaultServiceTaskBehavior.execute(execution); } else { IntegrationContextEntity integrationContext = storeIntegrationContext(execution); publishSpringEvent(execution, integrationContext); } }
MQServiceTaskBehavior extends AbstractBpmnActivityBehavior implements TriggerableActivityBehavior { @Override public void execute(DelegateExecution execution) { if (defaultServiceTaskBehavior.hasConnectorBean(execution)) { defaultServiceTaskBehavior.execute(execution); } else { IntegrationContextEntity integrationContext = storeIntegrationContext(execution); publishSpringEvent(execution, integrationContext); } } }
MQServiceTaskBehavior extends AbstractBpmnActivityBehavior implements TriggerableActivityBehavior { @Override public void execute(DelegateExecution execution) { if (defaultServiceTaskBehavior.hasConnectorBean(execution)) { defaultServiceTaskBehavior.execute(execution); } else { IntegrationContextEntity integrationContext = storeIntegrationContext(execution); publishSpringEvent(execution, integrationContext); } } MQServiceTaskBehavior(IntegrationContextManager integrationContextManager,
                                 ApplicationEventPublisher eventPublisher,
                                 IntegrationContextBuilder integrationContextBuilder,
                                 RuntimeBundleInfoAppender runtimeBundleInfoAppender,
                                 DefaultServiceTaskBehavior defaultServiceTaskBehavior); }
MQServiceTaskBehavior extends AbstractBpmnActivityBehavior implements TriggerableActivityBehavior { @Override public void execute(DelegateExecution execution) { if (defaultServiceTaskBehavior.hasConnectorBean(execution)) { defaultServiceTaskBehavior.execute(execution); } else { IntegrationContextEntity integrationContext = storeIntegrationContext(execution); publishSpringEvent(execution, integrationContext); } } MQServiceTaskBehavior(IntegrationContextManager integrationContextManager,
                                 ApplicationEventPublisher eventPublisher,
                                 IntegrationContextBuilder integrationContextBuilder,
                                 RuntimeBundleInfoAppender runtimeBundleInfoAppender,
                                 DefaultServiceTaskBehavior defaultServiceTaskBehavior); @Override void execute(DelegateExecution execution); @Override void trigger(DelegateExecution execution,
                        String signalEvent,
                        Object signalData); }
MQServiceTaskBehavior extends AbstractBpmnActivityBehavior implements TriggerableActivityBehavior { @Override public void execute(DelegateExecution execution) { if (defaultServiceTaskBehavior.hasConnectorBean(execution)) { defaultServiceTaskBehavior.execute(execution); } else { IntegrationContextEntity integrationContext = storeIntegrationContext(execution); publishSpringEvent(execution, integrationContext); } } MQServiceTaskBehavior(IntegrationContextManager integrationContextManager,
                                 ApplicationEventPublisher eventPublisher,
                                 IntegrationContextBuilder integrationContextBuilder,
                                 RuntimeBundleInfoAppender runtimeBundleInfoAppender,
                                 DefaultServiceTaskBehavior defaultServiceTaskBehavior); @Override void execute(DelegateExecution execution); @Override void trigger(DelegateExecution execution,
                        String signalEvent,
                        Object signalData);  }