@StartProcess("OrderConfirmation")
  public void saveNewOrder(Order order) {
    entityManager.persist(order.getCustomer());
    entityManager.persist(order);

    // flush to get the id generated
//    entityManager.flush();

    businessProcess.setVariable("orderId", order.getId());
  }
@StartProcess("OrderConfirmation")
  public void saveNewOrder(Order order) {
    entityManager.persist(order.getCustomer());
    entityManager.persist(order);

    


    businessProcess.setVariable("orderId", order.getId());
  }
@ StartProcess ( "OrderConfirmation" ) public void saveNewOrder ( Order order ) { entityManager . persist ( order . getCustomer ( ) ) ; entityManager . persist ( order ) ; // flush to get the id generated //    entityManager.flush(); businessProcess . setVariable ( "orderId" , order . getId ( ) ) ; }
Alternative to do a
"businessProcess.startProcessByKey('OrderConfirmation')" in JSF
Alternative to do a businessProcess . startProcessByKey ( OrderConfirmation ) in JSF