Package org.jbpm.eventmessaging

Examples of org.jbpm.eventmessaging.EventResponseHandler


                    }
                }
                break;
            }
            case EventTriggerResponse: {
                EventResponseHandler responseHandler = (EventResponseHandler) responseHandlers.get(cmd.getId());
                if (responseHandler != null) {
                  if (responseHandler.isRemove()) {
                    responseHandlers.remove(cmd.getId());
                  }
                    if (!cmd.getArguments().isEmpty() && cmd.getArguments().get(0) instanceof RuntimeException) {
                        responseHandler.setError((RuntimeException) cmd.getArguments().get(0));
                    } else {
                        Payload payload = (Payload) cmd.getArguments().get(0);
                        responseHandler.execute(payload);
                    }
                }
                break;
            }
            case QueryGenericResponse: {
              QueryGenericResponseHandler responseHandler = (QueryGenericResponseHandler) responseHandlers.get(cmd.getId());
              if (responseHandler != null) {
                if (!cmd.getArguments().isEmpty() && cmd.getArguments().get(0) instanceof RuntimeException) {
                  responseHandler.setError((RuntimeException) cmd.getArguments().get(0));
                } else {
                  List<?> results = (List<?>) cmd.getArguments().get(0);
                  responseHandler.execute(results);
                }
              }
              break;
            }
        }
View Full Code Here

TOP

Related Classes of org.jbpm.eventmessaging.EventResponseHandler

Copyright © 2018 www.massapicom. 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.