Pedro Gonçalves [https://community.jboss.org/people/pgoncalves] created the discussion
"Re: Link the business object to the process instance" To view the discussion, visit: https://community.jboss.org/message/742644#742644 -------------------------------------------------------------- Thanks Mauricio. I've used the Variables to build Business Keys. This is how I've managed to solve the problem: //......Start process...... Map<String, Object> variables = new HashMap<String, Object>(); variables.put("business_key", buildBusinessKeyForMyObject(myObject)); kSession.startProcess("my_workflow_id",variables); //...................................... //.........Get Process Instances Id of My Object....... Query query = entityManager.createQuery("FROM " + VariableInstanceLog.class.getName() + " variable " + " WHERE variable.variableId = :business_key_id AND variable.value = :business_key_value); query.setParameter("business_key_id", "business_key"); query.setParameter("business_key_value", buildCoreDataBusinessKey(coreData)); List<VariableInstanceLog> resultList = query.getResultList(); for (VariableInstanceLog variableInstanceLog : resultList) { logger.info("******* " + variableInstanceLog.getProcessInstanceId()); } //............................................................... -------------------------------------------------------------- Reply to this message by going to Community [https://community.jboss.org/message/742644#742644] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
