Package org.openengsb.core.workflow.api

Examples of org.openengsb.core.workflow.api.WorkflowService.processEvent()


        ContextHolder.get().setCurrentContextId("foo");
        WorkflowService workflowService = getOsgiService(WorkflowService.class);

        authenticate("admin", "password");
        workflowService.processEvent(new LogEvent());

        assertThat(exampleMock.wasCalled, is(true));
    }

    @Test
View Full Code Here


        ContextHolder.get().setCurrentContextId("foo");
        WorkflowService workflowService = getOsgiService(WorkflowService.class);
        LogEvent event = new LogEvent();
        event.setOrigin("example2");
        authenticateAsAdmin();
        workflowService.processEvent(event);

        assertThat(exampleMock.wasCalled, is(true));
    }

    @Test
View Full Code Here

    public void testRaiseEvent_shouldForwardToConnector() throws Exception {
        ContextHolder.get().setCurrentContextId("foo");
        WorkflowService workflowService = getOsgiService(WorkflowService.class);
        authenticateAsAdmin();
        Event event = new Event();
        workflowService.processEvent(event);
        assertThat(exampleMock.lastEvent, equalTo(event));
    }

    @Test
    public void testRaiseEvent_shouldForwardToRemoteConnector() throws Exception {
View Full Code Here

                new ConnectorDescription("example", "external-connector-proxy", attributes, properties));
        WorkflowService workflowService = getOsgiService(WorkflowService.class);
        Event event = new Event("test");
        ContextHolder.get().setCurrentContextId("foo");
        authenticateAsAdmin();
        workflowService.processEvent(event);
        assertThat(eventRef.get().getName(), equalTo("test"));
    }

    public static class MyExampleConnector extends ExampleConnector {
        private final AtomicReference<Event> eventRef;
View Full Code Here

        ContextHolder.get().setCurrentContextId("foo");
        WorkflowService workflowService = getOsgiService(WorkflowService.class);

        authenticate("admin", "password");
        workflowService.processEvent(new LogEvent());

        transformationEngine.deleteDescriptionsByFile("testDescription.transformation");
        ExampleRequestModel result = exampleMock.getModel();
        assertThat(result.getName(), is("test"));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.