3 Replies Latest reply on Jul 25, 2006 1:50 PM by jbpmndc

    dvd example - get process instance from order id question

    jbpmndc Newbie

      In the dvd example a process instance is retrieved using an entity bean's id. Is jBPM aware of all entity beans or how is it aware that there is a process that has an orderId of x value?

      ProcessInstance pi = (ProcessInstance) context.getSession()
       .createQuery("select pi from LongInstance si join si.processInstance pi " +
       "where si.name = 'orderId' and si.value = :orderId")
       .setLong( "orderId", order.getOrderId() )
       .uniqueResult();