JBoss Community

Re: jBPM processes started from Java code dont show up in jBPM process console

created by prakash prabhu in jBPM - View the full discussion

Thanks Demian.

I added the JPAWorkingMemoryDBLogger along with the persistence.xml, but sill not showing up in the process console.

The process is started w/o exceptions as I can see the user tasks in the process console, but not the process instances.

 

Below is my code.

 

private void StartWorkflow( String messageToPublish, String Identifier, String tag )

          {

                    try

                    {

                              KnowledgeBase kbase = readKnowledgeBase();

                              StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

                              JPAWorkingMemoryDbLogger dbLogger = new JPAWorkingMemoryDbLogger(ksession);

                              KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, "test");

                              //start a new process instance

 

 

                              ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new WSHumanTaskHandler());

                              // start a new process instance

                              Map<String, Object> params = new HashMap<String, Object>();

                              params.put("reason", "Registration");

                              params.put("patientXml", messageToPublish);

                              params.put("identifier", Identifier);

                              params.put("tag", tag);

 

 

 

                              ksession.addEventListener(new com.ge.edadmit.rest.RegistrationEventListener());

                              ksession.startProcess("com.ge.edadmit.EdAdmitWorkflow", params);

 

                              dbLogger.dispose();

                              //dblogger.

                              logger.close();

                    }

                    catch (Throwable t)

                    {

                              System.out.println(t.getMessage());

                          t.printStackTrace();

                    }

          }

Reply to this message by going to Community

Start a new discussion in jBPM at Community