1 Reply Latest reply on Apr 23, 2012 3:59 AM by Maciej Swiderski

    Problem starting next tasks

    Pablo Umaña Newbie

      Hi everyone

       

      I'm having some problems with my JBPM app. My technology stack is: JBoss AS 6.1, jBPM 5.2 and a PostgreSQL 9.0 database.

       

      The problem is that when I init JBoss with a clean database, and then the app create a new process instance the app works fine, but when I restart de application server (and database have data loaded), the tasks are completed by the app but doesn't start the next task in the workflow and in the log don't show anything:

       

      When I init the tasks server I do like this:

       

      entityManagerFactory = cfg.buildEntityManagerFactory();
      TaskService taskService = new TaskService(entityManagerFactory, SystemEventListenerFactory.getSystemEventListener());
      taskSession = taskService.createSession();
      ...
      taskServer = new MinaTaskServer(taskService);
      Thread thread = new Thread(taskServer);
      thread.start();
      this.running = true;
      
      Runtime.getRuntime().addShutdownHook(new ThreadTaskServer(this));
      

       

      Then, to init my process I do this:

       

      KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
      kbuilder.add(ResourceFactory.newClassPathResource("process.bpmn"), ResourceType.BPMN2);
      KnowledgeBase kbase = kbuilder.newKnowledgeBase();
      ksession = kbase.newStatefulKnowledgeSession();
      logger = KnowledgeRuntimeLoggerFactory.newThreadedFileLogger(ksession, "test", 1000);
      
      ksession.getWorkItemManager().registerWorkItemHandler("Email", new SystemOutWorkItemHandler());
      
      ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new WSHumanTaskHandler());
      

       

      My code to create a new process instance:

       

      String[] procesos = { "Proceso.bpmn" };
      Map<String, Object> params = new HashMap<String, Object>();
      params.put("groups", "COORDINADOR_NACIONAL");
      
      ProcessInstance processInstance = ksession.startProcess(proceso, params);
      logger.close();
      id = processInstance.getId();
      

       

      My code to assign a new task:

       

      public static void assignTask(long taskId, String userId, List<String> groupIds) {
      connect();
      try {
      BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
      client.claim(taskId, userId, groupIds, responseHandler);
      } catch (Throwable t) {
      t.printStackTrace();
      }
      }
      

       

      My code to init and set a task in complete state is:

       

      public static void completeTask(long taskId, Map data, String userId) throws InterruptedException {
      connect();
      BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
      client.start(taskId, userId, responseHandler);
      responseHandler.waitTillDone(5000);
      responseHandler = new BlockingTaskOperationResponseHandler();
      ContentData contentData = null;
      if (data != null) {
      ByteArrayOutputStream bos = new ByteArrayOutputStream();
      ObjectOutputStream out;
      try {
      out = new ObjectOutputStream(bos);
      out.writeObject(data);
      out.close();
      contentData = new ContentData();
      contentData.setContent(bos.toByteArray());
      contentData.setAccessType(AccessType.Inline);
      } catch (IOException e) {
      e.printStackTrace();
      }
      }
      client.complete(taskId, userId, contentData, responseHandler);
      responseHandler.waitTillDone(5000);
      
      }
      


      I've a process that work fine, but for this type, in the stack trace doesn't appear nothing anormal... this is my stack:

       

      16:05:00,596 INFO  [STDOUT] Hibernate: insert into OrganizationalEntity (DTYPE, id) values ('User', ?)
      16:05:00,598 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 23505
      16:05:00,598 ERROR [org.hibernate.util.JDBCExceptionReporter] Batch entry 0 insert into OrganizationalEntity (DTYPE, id) values ('User', 'nacional') was aborted.  Call getNextException to see the cause.
      16:05:00,598 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 23505
      16:05:00,599 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: duplicate key value violates unique constraint "organizationalentity_pkey"
        Detail: Key (id)=(nacional) already exists.
      16:05:00,599 INFO  [cl.exe.monoTarea.task.TaskServerDaemon] Usuario nacional ya existe como usuario JBPM
      16:05:00,600 INFO  [STDOUT] Loaded user admin: admin manager user
      16:05:00,600 INFO  [STDOUT] Loaded user krisv: admin manager user
      16:05:00,601 INFO  [STDOUT] Loaded user john: admin manager user
      16:05:00,601 INFO  [STDOUT] Loaded user mary: admin manager user
      16:05:00,602 INFO  [STDOUT] Tarea: 5 asignada a: nacional**********
      16:05:00,602 INFO  [org.apache.mina.filter.logging.LoggingFilter] RECEIVED: HeapBuffer[pos=0 lim=316 cap=512: 00 00 01 38 AC ED 00 05 73 72 01 00 1D 6F 72 67...]
      16:05:00,603 INFO  [STDOUT] Loaded user admin: admin manager user
      16:05:00,603 INFO  [STDOUT] Loaded user krisv: admin manager user
      16:05:00,603 INFO  [STDOUT] Loaded user john: admin manager user
      16:05:00,603 INFO  [STDOUT] Loaded user mary: admin manager user
      16:05:00,604 INFO  [STDOUT] Hibernate: select task0_.id as id60_3_, task0_.allowedToDelegate as allowedT2_60_3_, task0_.taskInitiator_id as taskIni25_60_3_, task0_.priority as priority60_3_, task0_.activationTime as activati4_60_3_, task0_.actualOwner_id as actualO26_60_3_, task0_.createdBy_id as createdBy27_60_3_, task0_.createdOn as createdOn60_3_, task0_.documentAccessType as document6_60_3_, task0_.documentContentId as document7_60_3_, task0_.documentType as document8_60_3_, task0_.expirationTime as expirati9_60_3_, task0_.faultAccessType as faultAc10_60_3_, task0_.faultContentId as faultCo11_60_3_, task0_.faultName as faultName60_3_, task0_.faultType as faultType60_3_, task0_.outputAccessType as outputA14_60_3_, task0_.outputContentId as outputC15_60_3_, task0_.outputType as outputType60_3_, task0_.parentId as parentId60_3_, task0_.previousStatus as previou18_60_3_, task0_.processId as processId60_3_, task0_.processInstanceId as process20_60_3_, task0_.processSessionId as process21_60_3_, task0_.skipable as skipable60_3_, task0_.status as status60_3_, task0_.workItemId as workItemId60_3_, user1_.id as id55_0_, user2_.id as id55_1_, user3_.id as id55_2_ from Task task0_ left outer join OrganizationalEntity user1_ on task0_.taskInitiator_id=user1_.id left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id left outer join OrganizationalEntity user3_ on task0_.createdBy_id=user3_.id where task0_.id=?
      16:05:00,607 INFO  [STDOUT] Hibernate: select user0_.id as id55_0_ from OrganizationalEntity user0_ where user0_.id=? and user0_.DTYPE='User'
      16:05:00,608 INFO  [STDOUT] Hibernate: select potentialo0_.task_id as task1_60_1_, potentialo0_.entity_id as entity2_1_, organizati1_.id as id55_0_, organizati1_.DTYPE as DTYPE55_0_ from PeopleAssignments_PotOwners potentialo0_ inner join OrganizationalEntity organizati1_ on potentialo0_.entity_id=organizati1_.id where potentialo0_.task_id=?
      16:05:00,624 INFO  [STDOUT] Hibernate: update Task set allowedToDelegate=?, taskInitiator_id=?, priority=?, activationTime=?, actualOwner_id=?, createdBy_id=?, createdOn=?, documentAccessType=?, documentContentId=?, documentType=?, expirationTime=?, faultAccessType=?, faultContentId=?, faultName=?, faultType=?, outputAccessType=?, outputContentId=?, outputType=?, parentId=?, previousStatus=?, processId=?, processInstanceId=?, processSessionId=?, skipable=?, status=?, workItemId=? where id=?
      16:05:00,635 INFO  [org.apache.mina.filter.logging.LoggingFilter] SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
      16:05:00,636 INFO  [org.apache.mina.filter.logging.LoggingFilter] RECEIVED: HeapBuffer[pos=0 lim=274 cap=512: 00 00 01 0E AC ED 00 05 73 72 01 00 1D 6F 72 67...]
      16:05:00,636 INFO  [STDOUT] Hibernate: select task0_.id as id60_3_, task0_.allowedToDelegate as allowedT2_60_3_, task0_.taskInitiator_id as taskIni25_60_3_, task0_.priority as priority60_3_, task0_.activationTime as activati4_60_3_, task0_.actualOwner_id as actualO26_60_3_, task0_.createdBy_id as createdBy27_60_3_, task0_.createdOn as createdOn60_3_, task0_.documentAccessType as document6_60_3_, task0_.documentContentId as document7_60_3_, task0_.documentType as document8_60_3_, task0_.expirationTime as expirati9_60_3_, task0_.faultAccessType as faultAc10_60_3_, task0_.faultContentId as faultCo11_60_3_, task0_.faultName as faultName60_3_, task0_.faultType as faultType60_3_, task0_.outputAccessType as outputA14_60_3_, task0_.outputContentId as outputC15_60_3_, task0_.outputType as outputType60_3_, task0_.parentId as parentId60_3_, task0_.previousStatus as previou18_60_3_, task0_.processId as processId60_3_, task0_.processInstanceId as process20_60_3_, task0_.processSessionId as process21_60_3_, task0_.skipable as skipable60_3_, task0_.status as status60_3_, task0_.workItemId as workItemId60_3_, user1_.id as id55_0_, user2_.id as id55_1_, user3_.id as id55_2_ from Task task0_ left outer join OrganizationalEntity user1_ on task0_.taskInitiator_id=user1_.id left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id left outer join OrganizationalEntity user3_ on task0_.createdBy_id=user3_.id where task0_.id=?
      16:05:00,640 INFO  [STDOUT] Hibernate: update Task set allowedToDelegate=?, taskInitiator_id=?, priority=?, activationTime=?, actualOwner_id=?, createdBy_id=?, createdOn=?, documentAccessType=?, documentContentId=?, documentType=?, expirationTime=?, faultAccessType=?, faultContentId=?, faultName=?, faultType=?, outputAccessType=?, outputContentId=?, outputType=?, parentId=?, previousStatus=?, processId=?, processInstanceId=?, processSessionId=?, skipable=?, status=?, workItemId=? where id=?
      16:05:00,687 INFO  [org.apache.mina.filter.logging.LoggingFilter] SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
      16:05:00,688 INFO  [org.apache.mina.filter.logging.LoggingFilter] RECEIVED: HeapBuffer[pos=0 lim=512 cap=512: 00 00 02 17 AC ED 00 05 73 72 01 00 1D 6F 72 67...]
      16:05:00,689 INFO  [org.apache.mina.filter.logging.LoggingFilter] RECEIVED: HeapBuffer[pos=0 lim=27 cap=1024: 6D 65 78 71 00 7E 00 05 74 00 10 4F 70 65 72 61...]
      16:05:00,689 INFO  [STDOUT] Hibernate: select task0_.id as id60_3_, task0_.allowedToDelegate as allowedT2_60_3_, task0_.taskInitiator_id as taskIni25_60_3_, task0_.priority as priority60_3_, task0_.activationTime as activati4_60_3_, task0_.actualOwner_id as actualO26_60_3_, task0_.createdBy_id as createdBy27_60_3_, task0_.createdOn as createdOn60_3_, task0_.documentAccessType as document6_60_3_, task0_.documentContentId as document7_60_3_, task0_.documentType as document8_60_3_, task0_.expirationTime as expirati9_60_3_, task0_.faultAccessType as faultAc10_60_3_, task0_.faultContentId as faultCo11_60_3_, task0_.faultName as faultName60_3_, task0_.faultType as faultType60_3_, task0_.outputAccessType as outputA14_60_3_, task0_.outputContentId as outputC15_60_3_, task0_.outputType as outputType60_3_, task0_.parentId as parentId60_3_, task0_.previousStatus as previou18_60_3_, task0_.processId as processId60_3_, task0_.processInstanceId as process20_60_3_, task0_.processSessionId as process21_60_3_, task0_.skipable as skipable60_3_, task0_.status as status60_3_, task0_.workItemId as workItemId60_3_, user1_.id as id55_0_, user2_.id as id55_1_, user3_.id as id55_2_ from Task task0_ left outer join OrganizationalEntity user1_ on task0_.taskInitiator_id=user1_.id left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id left outer join OrganizationalEntity user3_ on task0_.createdBy_id=user3_.id where task0_.id=?
      16:05:00,692 INFO  [STDOUT] Hibernate: select nextval ('hibernate_sequence')
      16:05:00,694 INFO  [STDOUT] Hibernate: insert into Content (content, id) values (?, ?)
      16:05:00,704 INFO  [STDOUT] Hibernate: update Task set allowedToDelegate=?, taskInitiator_id=?, priority=?, activationTime=?, actualOwner_id=?, createdBy_id=?, createdOn=?, documentAccessType=?, documentContentId=?, documentType=?, expirationTime=?, faultAccessType=?, faultContentId=?, faultName=?, faultType=?, outputAccessType=?, outputContentId=?, outputType=?, parentId=?, previousStatus=?, processId=?, processInstanceId=?, processSessionId=?, skipable=?, status=?, workItemId=? where id=?
      16:05:00,707 INFO  [STDOUT] Hibernate: select subtaskstr0_.Task_Id as Task4_60_1_, subtaskstr0_.id as id1_, subtaskstr0_.id as id61_0_, subtaskstr0_.name as name61_0_, subtaskstr0_.DTYPE as DTYPE61_0_ from SubTasksStrategy subtaskstr0_ where subtaskstr0_.Task_Id=?
      16:05:00,708 INFO  [org.apache.mina.filter.logging.LoggingFilter] SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
      16:05:00,708 INFO  [STDOUT] Tarea completada: 5**********
      16:05:00,785 INFO  [STDOUT] Hibernate: insert into personas_fiscalizacion (id_fiscalizacion, id_persona, tipoRelacionPersonasFiscalizacion, id) values (?, ?, ?, ?)
      16:05:00,787 WARN  [org.hibernate.engine.loading.LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@2cf59135<rs=org.postgresql.jdbc4.Jdbc4ResultSet@973568c>
      16:05:00,788 WARN  [org.hibernate.engine.loading.CollectionLoadContext] On CollectionLoadContext#cleanup, localLoadingCollectionKeys contained [1] entries
      16:05:00,920 INFO  [STDOUT] Hibernate: select persona0_.id as id16_, persona0_.apellido_materno as apellido2_16_, persona0_.apellido_paterno as apellido3_16_, persona0_.email as email16_, persona0_.nacional as nacional16_, persona0_.nombre as nombre16_, persona0_.password as password16_, persona0_.tipoUsuario as tipoUsua8_16_, persona0_.usuario as usuario16_ from persona persona0_ where persona0_.usuario=? limit ?
      16:05:00,921 INFO  [STDOUT] Hibernate: select regiones0_.id_persona as id2_16_2_, regiones0_.id_region as id1_2_, region1_.id as id22_0_, region1_.nombre as nombre22_0_, region1_.id_zona as id3_22_0_, zona2_.id as id8_1_, zona2_.grupoJBPM as grupoJBPM8_1_, zona2_.nombre as nombre8_1_ from personas_region regiones0_ inner join region region1_ on regiones0_.id_region=region1_.id inner join zona zona2_ on region1_.id_zona=zona2_.id where regiones0_.id_persona=?
      16:05:00,923 INFO  [cl.exe.fonasa.fiscalizacion.servicios.ProcesoSvcBean] Obtener bandeja de: nacional, grupo: [COORDINADOR_NACIONAL]
      16:05:00,924 INFO  [STDOUT] Hibernate: select task0_.id as col_0_0_ from Task task0_ left outer join OrganizationalEntity user1_ on task0_.createdBy_id=user1_.id left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id cross join OrganizationalEntity organizati3_ where (organizati3_.id=? or organizati3_.id in (?)) and (organizati3_.id in (select potentialo4_.entity_id from PeopleAssignments_PotOwners potentialo4_ where task0_.id=potentialo4_.task_id)) and (task0_.status in ('Created' , 'Ready' , 'Reserved' , 'InProgress' , 'Suspended')) and (task0_.expirationTime is null) group by task0_.id
      16:05:00,927 INFO  [STDOUT] Loaded user admin: admin manager user
      16:05:00,927 INFO  [STDOUT] Loaded user krisv: admin manager user
      16:05:00,928 INFO  [STDOUT] Loaded user john: admin manager user
      16:05:00,928 INFO  [STDOUT] Loaded user mary: admin manager user
      16:05:00,928 INFO  [org.apache.mina.filter.logging.LoggingFilter] RECEIVED: HeapBuffer[pos=0 lim=211 cap=1024: 00 00 00 CF AC ED 00 05 73 72 01 00 1D 6F 72 67...]
      16:05:00,929 INFO  [STDOUT] Hibernate: select task0_.id as id60_3_, task0_.allowedToDelegate as allowedT2_60_3_, task0_.taskInitiator_id as taskIni25_60_3_, task0_.priority as priority60_3_, task0_.activationTime as activati4_60_3_, task0_.actualOwner_id as actualO26_60_3_, task0_.createdBy_id as createdBy27_60_3_, task0_.createdOn as createdOn60_3_, task0_.documentAccessType as document6_60_3_, task0_.documentContentId as document7_60_3_, task0_.documentType as document8_60_3_, task0_.expirationTime as expirati9_60_3_, task0_.faultAccessType as faultAc10_60_3_, task0_.faultContentId as faultCo11_60_3_, task0_.faultName as faultName60_3_, task0_.faultType as faultType60_3_, task0_.outputAccessType as outputA14_60_3_, task0_.outputContentId as outputC15_60_3_, task0_.outputType as outputType60_3_, task0_.parentId as parentId60_3_, task0_.previousStatus as previou18_60_3_, task0_.processId as processId60_3_, task0_.processInstanceId as process20_60_3_, task0_.processSessionId as process21_60_3_, task0_.skipable as skipable60_3_, task0_.status as status60_3_, task0_.workItemId as workItemId60_3_, user1_.id as id55_0_, user2_.id as id55_1_, user3_.id as id55_2_ from Task task0_ left outer join OrganizationalEntity user1_ on task0_.taskInitiator_id=user1_.id left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id left outer join OrganizationalEntity user3_ on task0_.createdBy_id=user3_.id where task0_.id=?
      16:05:00,931 INFO  [STDOUT] Hibernate: select names0_.Task_Names_Id as Task5_60_1_, names0_.id as id1_, names0_.id as id56_0_, names0_.language as language56_0_, names0_.text as text56_0_ from I18NText names0_ where names0_.Task_Names_Id=?
      16:05:00,932 INFO  [STDOUT] Hibernate: select subjects0_.Task_Subjects_Id as Task4_60_1_, subjects0_.id as id1_, subjects0_.id as id56_0_, subjects0_.language as language56_0_, subjects0_.text as text56_0_ from I18NText subjects0_ where subjects0_.Task_Subjects_Id=?
      16:05:00,932 INFO  [STDOUT] Hibernate: select descriptio0_.Task_Descriptions_Id as Task6_60_1_, descriptio0_.id as id1_, descriptio0_.id as id56_0_, descriptio0_.language as language56_0_, descriptio0_.text as text56_0_ from I18NText descriptio0_ where descriptio0_.Task_Descriptions_Id=?
      16:05:00,933 INFO  [STDOUT] Hibernate: select potentialo0_.task_id as task1_60_1_, potentialo0_.entity_id as entity2_1_, organizati1_.id as id55_0_, organizati1_.DTYPE as DTYPE55_0_ from PeopleAssignments_PotOwners potentialo0_ inner join OrganizationalEntity organizati1_ on potentialo0_.entity_id=organizati1_.id where potentialo0_.task_id=?
      16:05:00,934 INFO  [STDOUT] Hibernate: select excludedow0_.task_id as task1_60_1_, excludedow0_.entity_id as entity2_1_, organizati1_.id as id55_0_, organizati1_.DTYPE as DTYPE55_0_ from PeopleAssignments_ExclOwners excludedow0_ inner join OrganizationalEntity organizati1_ on excludedow0_.entity_id=organizati1_.id where excludedow0_.task_id=?
      16:05:00,935 INFO  [STDOUT] Hibernate: select taskstakeh0_.task_id as task1_60_1_, taskstakeh0_.entity_id as entity2_1_, organizati1_.id as id55_0_, organizati1_.DTYPE as DTYPE55_0_ from PeopleAssignments_Stakeholders taskstakeh0_ inner join OrganizationalEntity organizati1_ on taskstakeh0_.entity_id=organizati1_.id where taskstakeh0_.task_id=?
      16:05:00,935 INFO  [STDOUT] Hibernate: select businessad0_.task_id as task1_60_1_, businessad0_.entity_id as entity2_1_, organizati1_.id as id55_0_, organizati1_.DTYPE as DTYPE55_0_ from PeopleAssignments_BAs businessad0_ inner join OrganizationalEntity organizati1_ on businessad0_.entity_id=organizati1_.id where businessad0_.task_id=?
      16:05:00,936 INFO  [STDOUT] Hibernate: select recipients0_.task_id as task1_60_1_, recipients0_.entity_id as entity2_1_, organizati1_.id as id55_0_, organizati1_.DTYPE as DTYPE55_0_ from PeopleAssignments_Recipients recipients0_ inner join OrganizationalEntity organizati1_ on recipients0_.entity_id=organizati1_.id where recipients0_.task_id=?
      16:05:00,937 INFO  [STDOUT] Hibernate: select delegates0_.task_id as task1_60_1_, delegates0_.entity_id as entity2_1_, organizati1_.id as id55_0_, organizati1_.DTYPE as DTYPE55_0_ from Delegation_delegates delegates0_ inner join OrganizationalEntity organizati1_ on delegates0_.entity_id=organizati1_.id where delegates0_.task_id=?
      16:05:00,937 INFO  [STDOUT] Hibernate: select comments0_.TaskData_Comments_Id as TaskData5_60_2_, comments0_.id as id2_, comments0_.id as id52_1_, comments0_.addedAt as addedAt52_1_, comments0_.addedBy_id as addedBy4_52_1_, comments0_.text as text52_1_, user1_.id as id55_0_ from task_comment comments0_ left outer join OrganizationalEntity user1_ on comments0_.addedBy_id=user1_.id where comments0_.TaskData_Comments_Id=?
      16:05:00,938 INFO  [STDOUT] Hibernate: select attachment0_.TaskData_Attachments_Id as TaskData9_60_2_, attachment0_.id as id2_, attachment0_.id as id49_1_, attachment0_.accessType as accessType49_1_, attachment0_.attachedAt as attachedAt49_1_, attachment0_.attachedBy_id as attachedBy8_49_1_, attachment0_.attachmentContentId as attachme4_49_1_, attachment0_.contentType as contentT5_49_1_, attachment0_.name as name49_1_, attachment0_.attachment_size as attachment7_49_1_, user1_.id as id55_0_ from Attachment attachment0_ left outer join OrganizationalEntity user1_ on attachment0_.attachedBy_id=user1_.id where attachment0_.TaskData_Attachments_Id=?
      16:05:00,939 INFO  [STDOUT] Hibernate: select startdeadl0_.Deadlines_StartDeadLine_Id as Deadlines4_60_1_, startdeadl0_.id as id1_, startdeadl0_.id as id53_0_, startdeadl0_.deadline_date as deadline2_53_0_, startdeadl0_.escalated as escalated53_0_ from Deadline startdeadl0_ where startdeadl0_.Deadlines_StartDeadLine_Id=?
      16:05:00,939 INFO  [STDOUT] Hibernate: select enddeadlin0_.Deadlines_EndDeadLine_Id as Deadlines5_60_1_, enddeadlin0_.id as id1_, enddeadlin0_.id as id53_0_, enddeadlin0_.deadline_date as deadline2_53_0_, enddeadlin0_.escalated as escalated53_0_ from Deadline enddeadlin0_ where enddeadlin0_.Deadlines_EndDeadLine_Id=?
      16:05:00,940 INFO  [STDOUT] Hibernate: select subtaskstr0_.Task_Id as Task4_60_1_, subtaskstr0_.id as id1_, subtaskstr0_.id as id61_0_, subtaskstr0_.name as name61_0_, subtaskstr0_.DTYPE as DTYPE61_0_ from SubTasksStrategy subtaskstr0_ where subtaskstr0_.Task_Id=?
      16:05:00,940 INFO  [org.apache.mina.filter.logging.LoggingFilter] SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
      16:05:00,941 INFO  [org.apache.mina.filter.logging.LoggingFilter] RECEIVED: HeapBuffer[pos=0 lim=214 cap=512: 00 00 00 D2 AC ED 00 05 73 72 01 00 1D 6F 72 67...]
      16:05:00,942 INFO  [STDOUT] Hibernate: select content0_.id as id50_0_, content0_.content as content50_0_ from Content content0_ where content0_.id=?
      16:05:00,944 INFO  [org.apache.mina.filter.logging.LoggingFilter] SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
      

       

       

      Thanks in advance for any help.

       

      Cheers!

        • 1. Re: Problem starting next tasks
          Maciej Swiderski Master

          If you would like to to keep your processes after server restarts you need to use persistence and use dedicated HumanTask handler that will trigger process isntance to continue with the flow. So to do that you need:

          • build/load your sessions using JPAKnowledgeService
          • use CommandBasedWSHumanTaskHandler
          • after restart, make sure you have loaded back session before completing the task

          Once you have this in your application your process should work as expected.

           

          Take a look at documentation about jBPM persistence.

           

          HTH