one-time-examples/order-confirmation-rules/src/main/java/org/camunda/bpm/demo/orderconfirmation/bean/OrderBean.java
@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);

    // 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 ) ; // 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