Examples of sendEvent()


Examples of org.huihoo.workflow.impl.monitor.EventMonitorThread.sendEvent()

    WorkflowServiceBase context = (WorkflowServiceBase) workflowService;
    EventMonitorThread eventMonitorThread = context.getEventMonitorThread(workflowProcess.getWorkflowPackage());
    MonitorEvent monitorEvent =
      new MonitorEvent(workflowService, workflowProcess, operator, userTransaction, workflowWork, workflowTransition);
    eventMonitorThread.sendEvent(monitorEvent);

    MonitorEventResult eventResult = monitorEvent.getResult();

    if (eventResult.getException() != null)
    {
View Full Code Here

Examples of org.huihoo.workflow.impl.monitor.EventMonitorThread.sendEvent()

    log.debug("[dispatch_instanceXorJoin] workitem: " + workflowWork.getInfo() + " | transition: " + workflowTransition.getInfo());
    WorkflowServiceBase context = (WorkflowServiceBase) workflowService;
    EventMonitorThread eventMonitorThread = context.getEventMonitorThread(workflowProcess.getWorkflowPackage());
    MonitorEvent monitorEvent =
      new MonitorEvent(workflowService, workflowProcess, operator, userTransaction, workflowWork, workflowTransition);
    eventMonitorThread.sendEvent(monitorEvent);

    MonitorEventResult eventResult = monitorEvent.getResult();

    if (eventResult.getException() != null)
    {
View Full Code Here

Examples of org.mule.DefaultMuleEventContext.sendEvent()

        EndpointBuilder endpointBuilder = new EndpointURIEndpointBuilder(tempUrl, muleContext);
        endpointBuilder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE);
        OutboundEndpoint outboundEndpoint = endpointBuilder.buildOutboundEndpoint();

        MuleEventContext eventContext = new DefaultMuleEventContext(event);
        result = eventContext.sendEvent(
            new DefaultMuleMessage(requestBody, event.getMessage(), muleContext), outboundEndpoint);
        if (isErrorPayload(result))
        {
            handleException(new RestServiceException(CoreMessages.failedToInvokeRestService(tempUrl),
                event), result);
View Full Code Here

Examples of org.mule.api.MuleEventContext.sendEvent()

        EndpointBuilder endpointBuilder = new EndpointURIEndpointBuilder(tempUrl, muleContext);
        endpointBuilder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE);
        OutboundEndpoint outboundEndpoint = endpointBuilder.buildOutboundEndpoint();

        MuleEventContext eventContext = new DefaultMuleEventContext(event);
        result = eventContext.sendEvent(
            new DefaultMuleMessage(requestBody, event.getMessage(), muleContext), outboundEndpoint);
        if (isErrorPayload(result))
        {
            handleException(new RestServiceException(CoreMessages.failedToInvokeRestService(tempUrl),
                event), result);
View Full Code Here

Examples of org.mule.api.MuleEventContext.sendEvent()

                request.getAttribute(Scope.REQUEST, AbderaServiceComponent.EVENT_CONTEXT);

        try
        {
            MuleMessage requestMessage = new DefaultMuleMessage(request, ctx.getMuleContext());
            MuleMessage res = ctx.sendEvent(requestMessage);

            return (ResponseContext) res.getPayload();
        }
        catch (MuleException e)
        {
View Full Code Here

Examples of org.mule.api.MuleEventContext.sendEvent()

                request.getAttribute(Scope.REQUEST, AbderaServiceComponent.EVENT_CONTEXT);

        try
        {
            MuleMessage requestMessage = new DefaultMuleMessage(request, ctx.getMuleContext());
            MuleMessage res = ctx.sendEvent(requestMessage);

            return (ResponseContext) res.getPayload();
        }
        catch (MuleException e)
        {
View Full Code Here

Examples of org.mule.api.service.Service.sendEvent()

    {
        Service service = muleContext.getRegistry().lookupService("component1");
        MuleSession session = new DefaultMuleSession(service, muleContext);
        MuleEvent event = new DefaultMuleEvent(new DefaultMuleMessage("Test MuleEvent", muleContext),
            ((ServiceCompositeMessageSource) service.getMessageSource()).getEndpoints().get(0), session);
        service.sendEvent(event);
    }

    public static class DummyComponent implements Callable
    {
        public Object onCall(MuleEventContext context) throws Exception
View Full Code Here

Examples of org.mule.api.service.Service.sendEvent()

            // expected
        }

        try
        {
            c.sendEvent(getTestEvent("hello", c));
            fail();
        }
        catch (LifecycleException e)
        {
            // expected
View Full Code Here

Examples of org.mule.api.service.Service.sendEvent()

                    fail(e.getMessage());
                }
            }
        }).start();
        long t0 = System.currentTimeMillis();
        c.sendEvent(getTestEvent("hello"));
        long t1 = System.currentTimeMillis();
        assertTrue(t1 - t0 > 1000);
    }
}
View Full Code Here

Examples of org.mule.api.service.Service.sendEvent()

    {
        if (session.getFlowConstruct() instanceof Service)
        {
            Service service = (Service) session.getFlowConstruct();
            DefaultMuleEvent eventToSend = new DefaultMuleEvent(message, event.getEndpoint(), session);
            MuleEvent event = service.sendEvent(eventToSend);
            return event == null ? null : event.getMessage();
        }
        else
        {
            throw new MessagingException(
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.