AnsweredAssumed Answered

Message Event

Question asked by kotreshgt on Jul 6, 2012
public class OrderListener implements ActivityBehavior{
   RuntimeService runtimeService;
   public void execute(ActivityExecution arg0) throws Exception {

    public void orderReceived(Map<String, Object> message) throws Exception {
        int orderId = (Integer) message.get("orderId");
        int customerId = (Integer) message.get("customerId");
        double price = (Double) message.get("price");
        String orderCode = (String) message.get("orderCode");
        Order customer = new Order(orderId, customerId, price, orderCode);
        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();

        RuntimeService runtimeService = processEngine.getRuntimeService();

        System.out.println("Order received: "+ orderId + ", customerId: "+ customerId + ", price: "+ price);

this is my listerner call and receving messages;

and this is my bpmn file

<process id="helloCamelProcess">
      <startEvent id="start" />
      <sequenceFlow sourceRef="start" targetRef="serviceTask1" />
      <serviceTask id="serviceTask1"
         activiti:delegateExpression="${orderListener}" />
      <sequenceFlow sourceRef="serviceTask1" targetRef="waitState" />
      <receiveTask id="waitState" />
      <sequenceFlow sourceRef="waitState" targetRef="theEnd" />
      <endEvent id="theEnd" />

and now i am stuck how to the process should start arrival of message

please help me regarding this