5 Replies Latest reply on Aug 24, 2011 12:52 PM by Mauricio Salatino

    Problem on adding users to HumanTaskService

    reza sadeghzadeh Newbie

      Hi,  I'm using Liferay Portal for my membership. I'm adding users to  taskSession this like: --------------------------------------------------------------------------------------------------- 



      EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.task");


      TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());


      TaskServiceSession taskSession = taskService.createSession();


      // Add users


      List<com.liferay.portal.model.User> users = null;


      try {



      users = UserLocalServiceUtil.getUsers(0, 100000000);



      } catch (SystemException e) {



      e.printStackTrace();



      }



      for ( com.liferay.portal.model.User user : users ) {


      User jBPMUser = new User(String.valueOf(user.getUserId()));



      taskSession.addUser( jBPMUser );


      }

       



      List<Organization> orgs = null;


      try {



      orgs = OrganizationLocalServiceUtil.getOrganizations(0, 100000000);



      } catch (SystemException e) {



      e.printStackTrace();



      }



      for ( Organization org : orgs ) {


      Group group = new Group(String.valueOf(org.getOrganizationId()));



      taskSession.addGroup( group );


      }






      // start server


      MinaTaskServer server = new MinaTaskServer(taskService);


      Thread thread = new Thread(server);


      thread.start();


      taskSession.dispose();


      System.out.println("Task service started correctly !");


      System.out.println("Task service running ...");

              

      ---------------------------------------------------------------------------------------------------

      after start my server I can work with ProcessDefinition and ProcessInstances properly but I can't see list of task in my panel If I remove above codes and start HumanTask Service with "ant start.demo" the system works properly I see a lot logs:

      Would you please guide me How can I troubleshooting this problem ?

       

       

      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

      15:48:12,475 INFO  [LoggingFilter] CREATED

      15:48:12,476 INFO  [LoggingFilter] OPENED

      15:48:12,536 INFO  [STDOUT] Loaded user admin:

      15:48:12,538 INFO  [STDOUT]  admin

      15:48:12,538 INFO  [STDOUT]  manager

      15:48:12,538 INFO  [STDOUT]  user

      15:48:12,538 INFO  [STDOUT] Loaded user krisv:

      15:48:12,538 INFO  [STDOUT]  admin

      15:48:12,538 INFO  [STDOUT]  manager

      15:48:12,538 INFO  [STDOUT]  user

      15:48:12,538 INFO  [STDOUT] Loaded user sales-rep:

      15:48:12,539 INFO  [STDOUT]  admin

      15:48:12,539 INFO  [STDOUT]  manager

      15:48:12,539 INFO  [STDOUT]  user

      15:48:12,539 INFO  [STDOUT]  sales

      15:48:12,539 INFO  [STDOUT] Loaded user john:

      15:48:12,539 INFO  [STDOUT]  admin

      15:48:12,539 INFO  [STDOUT]  manager

      15:48:12,540 INFO  [STDOUT]  user

      15:48:12,540 INFO  [STDOUT]  PM

      15:48:12,540 INFO  [STDOUT] Loaded user mary:

      15:48:12,541 INFO  [STDOUT]  admin

      15:48:12,541 INFO  [STDOUT]  manager

      15:48:12,541 INFO  [STDOUT]  user

      15:48:12,541 INFO  [STDOUT]  HR

      15:48:12,648 INFO  [LoggingFilter] RECEIVED: HeapBuffer[pos=0 lim=178 cap=2048: 00 00 00 AE AC ED 00 05 73 72 01 00 1D 6F 72 67...]

      15:48:12,770 INFO  [LoggingFilter] SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]

      15:48:12,816 INFO  [STDOUT] 15:48:12,816 INFO  [PluginMgr] Successfully loaded plugin 'org.jboss.bpm.console.server.plugin.FormDispatcherPlugin': class org.jbpm.integration.console.forms.FormDispatcherComposite

      15:48:12,973 INFO  [STDOUT] JSon Result: => {"tasks":[]}

      15:48:12,973 INFO  [STDOUT] task json result: {"tasks":[]}

      15:48:14,185 INFO  [STDOUT] INFO  30-07 15:48:14,180 (NilAuthenticator.java:authenticate:35)      All users are guests.

      15:48:14,189 INFO  [STDOUT] INFO  30-07 15:48:14,182 (NilAuthenticator.java:authenticate:35)      All users are guests.

      15:48:14,194 INFO  [STDOUT] INFO  30-07 15:48:14,193 (RepositoryServlet.java:allowUser:114)      admin authenticated for rest api

      15:48:14,195 INFO  [STDOUT] INFO  30-07 15:48:14,193 (RepositoryServlet.java:allowUser:114)      admin authenticated for rest api

      15:48:14,197 INFO  [STDOUT] INFO  30-07 15:48:14,195 (PackageDeploymentServlet.java:execute:141)      PackageName: defaultPackage

      15:48:14,198 INFO  [STDOUT] INFO  30-07 15:48:14,196 (PackageDeploymentServlet.java:execute:141)      PackageName: defaultPackage

      15:48:14,199 INFO  [STDOUT] INFO  30-07 15:48:14,198 (PackageDeploymentServlet.java:execute:142)      PackageVersion: LATEST

      15:48:14,200 INFO  [STDOUT] INFO  30-07 15:48:14,197 (PackageDeploymentServlet.java:execute:142)      PackageVersion: LATEST

      15:48:14,201 INFO  [STDOUT] INFO  30-07 15:48:14,200 (PackageDeploymentServlet.java:execute:143)      PackageIsLatest: true

      15:48:14,202 INFO  [STDOUT] INFO  30-07 15:48:14,199 (PackageDeploymentServlet.java:execute:143)      PackageIsLatest: true

      15:48:14,203 INFO  [STDOUT] INFO  30-07 15:48:14,202 (PackageDeploymentServlet.java:execute:144)      PackageIsSource: false

      15:48:14,204 INFO  [STDOUT] INFO  30-07 15:48:14,201 (PackageDeploymentServlet.java:execute:144)      PackageIsSource: false

      15:48:15,608 INFO  [STDOUT] Loading process from Guvnor: vacation

      15:48:15,608 INFO  [STDOUT] Loading process from Guvnor: vacation

      15:48:15,608 INFO  [STDOUT] jbpm.console.directory property not found

      15:48:15,609 INFO  [STDOUT] jbpm.console.directory property not found

      15:48:16,758 INFO  [STDOUT] Loading session data ...

      15:48:16,758 INFO  [STDOUT] Loading session data ...

      15:48:16,869 INFO  [STDOUT] Hibernate:

          select

              sessioninf0_.id as id70_0_,

              sessioninf0_.lastModificationDate as lastModi2_70_0_,

              sessioninf0_.rulesByteArray as rulesByt3_70_0_,

              sessioninf0_.startDate as startDate70_0_,

              sessioninf0_.OPTLOCK as OPTLOCK70_0_

          from

              SessionInfo sessioninf0_

          where

              sessioninf0_.id=?

      15:48:16,869 INFO  [STDOUT] Hibernate:

          select

              sessioninf0_.id as id69_0_,

              sessioninf0_.lastModificationDate as lastModi2_69_0_,

              sessioninf0_.rulesByteArray as rulesByt3_69_0_,

              sessioninf0_.startDate as startDate69_0_,

              sessioninf0_.OPTLOCK as OPTLOCK69_0_

          from

              SessionInfo sessioninf0_

          where

              sessioninf0_.id=?

      15:48:20,759 INFO  [LoggingFilter] CREATED

      15:48:20,759 INFO  [LoggingFilter] OPENED

      15:48:20,760 INFO  [LoggingFilter] CREATED

      15:48:20,761 INFO  [LoggingFilter] OPENED

      15:48:20,773 INFO  [LoggingFilter] RECEIVED: HeapBuffer[pos=0 lim=339 cap=2048: 00 00 01 4F AC ED 00 05 73 72 01 00 1D 6F 72 67...]

      15:48:20,775 INFO  [LoggingFilter] RECEIVED: HeapBuffer[pos=0 lim=339 cap=2048: 00 00 01 4F AC ED 00 05 73 72 01 00 1D 6F 72 67...]

      15:48:20,780 INFO  [STDOUT] Successfully loaded default package from Guvnor

      15:48:20,781 INFO  [STDOUT] Successfully loaded default package from Guvnor

      15:48:20,790 INFO  [LoggingFilter] RECEIVED: HeapBuffer[pos=0 lim=673 cap=2048: 00 00 01 4C AC ED 00 05 73 72 01 00 1D 6F 72 67...]

      15:48:20,792 INFO  [STDOUT] 15:48:20,792 INFO  [PluginMgr] Successfully loaded plugin 'org.jboss.bpm.console.server.plugin.FormDispatcherPlugin': class org.jbpm.integration.console.forms.FormDispatcherComposite

      15:48:20,793 INFO  [LoggingFilter] RECEIVED: HeapBuffer[pos=0 lim=673 cap=2048: 00 00 01 4C AC ED 00 05 73 72 01 00 1D 6F 72 67...]

      15:48:20,793 INFO  [STDOUT] 15:48:20,792 INFO  [PluginMgr] Successfully loaded plugin 'org.jboss.bpm.console.server.plugin.FormDispatcherPlugin': class org.jbpm.integration.console.forms.FormDispatcherComposite

      15:48:20,820 INFO  [STDOUT] INFO  30-07 15:48:20,818 (NilAuthenticator.java:authenticate:35)      All users are guests.

      15:48:20,821 INFO  [STDOUT] INFO  30-07 15:48:20,818 (NilAuthenticator.java:authenticate:35)      All users are guests.

      15:48:20,822 INFO  [STDOUT] INFO  30-07 15:48:20,820 (RepositoryServlet.java:allowUser:114)      null authenticated for rest api

      15:48:20,822 INFO  [STDOUT] INFO  30-07 15:48:20,821 (RepositoryServlet.java:allowUser:114)      null authenticated for rest api

      15:48:20,823 INFO  [STDOUT] INFO  30-07 15:48:20,822 (PackageDeploymentServlet.java:execute:141)      PackageName: defaultPackage

      15:48:20,824 INFO  [STDOUT] INFO  30-07 15:48:20,823 (PackageDeploymentServlet.java:execute:141)      PackageName: defaultPackage

      15:48:20,824 INFO  [STDOUT] INFO  30-07 15:48:20,823 (PackageDeploymentServlet.java:execute:142)      PackageVersion: LATEST

      15:48:20,825 INFO  [STDOUT] INFO  30-07 15:48:20,824 (PackageDeploymentServlet.java:execute:142)      PackageVersion: LATEST

      15:48:20,825 INFO  [STDOUT] INFO  30-07 15:48:20,825 (PackageDeploymentServlet.java:execute:143)      PackageIsLatest: true

      15:48:20,826 INFO  [STDOUT] INFO  30-07 15:48:20,826 (PackageDeploymentServlet.java:execute:144)      PackageIsSource: true

      15:48:20,827 INFO  [STDOUT] INFO  30-07 15:48:20,824 (PackageDeploymentServlet.java:execute:143)      PackageIsLatest: true

      15:48:20,828 INFO  [STDOUT] INFO  30-07 15:48:20,827 (PackageDeploymentServlet.java:execute:144)      PackageIsSource: true

      15:48:20,980 INFO  [STDOUT] 15:48:20,980 INFO  [PluginMgr] Successfully loaded plugin 'org.jboss.bpm.console.server.plugin.GraphViewerPlugin': class org.jbpm.integration.console.graph.GraphViewerPluginImpl

      15:48:20,980 INFO  [STDOUT] 15:48:20,980 INFO  [PluginMgr] Successfully loaded plugin 'org.jboss.bpm.console.server.plugin.GraphViewerPlugin': class org.jbpm.integration.console.graph.GraphViewerPluginImpl

      15:48:20,989 INFO  [STDOUT] INFO  30-07 15:48:20,988 (NilAuthenticator.java:authenticate:35)      All users are guests.

      15:48:20,991 INFO  [STDOUT] INFO  30-07 15:48:20,989 (NilAuthenticator.java:authenticate:35)      All users are guests.

      15:48:20,991 INFO  [STDOUT] INFO  30-07 15:48:20,990 (RepositoryServlet.java:allowUser:114)      null authenticated for rest api

      15:48:20,992 INFO  [STDOUT] INFO  30-07 15:48:20,991 (RepositoryServlet.java:allowUser:114)      null authenticated for rest api

      15:48:20,992 INFO  [STDOUT] INFO  30-07 15:48:20,991 (PackageDeploymentServlet.java:execute:141)      PackageName: defaultPackage

      15:48:20,993 INFO  [STDOUT] INFO  30-07 15:48:20,993 (PackageDeploymentServlet.java:execute:142)      PackageVersion: LATEST

      15:48:20,993 INFO  [STDOUT] INFO  30-07 15:48:20,993 (PackageDeploymentServlet.java:execute:143)      PackageIsLatest: true

      15:48:20,994 INFO  [STDOUT] INFO  30-07 15:48:20,994 (PackageDeploymentServlet.java:execute:144)      PackageIsSource: false

      15:48:20,995 INFO  [STDOUT] INFO  30-07 15:48:20,992 (PackageDeploymentServlet.java:execute:141)      PackageName: defaultPackage

      15:48:20,995 INFO  [STDOUT] INFO  30-07 15:48:20,995 (PackageDeploymentServlet.java:execute:142)      PackageVersion: LATEST

      15:48:20,996 INFO  [STDOUT] INFO  30-07 15:48:20,995 (PackageDeploymentServlet.java:execute:143)      PackageIsLatest: true

      15:48:20,996 INFO  [STDOUT] INFO  30-07 15:48:20,996 (PackageDeploymentServlet.java:execute:144)      PackageIsSource: false

      15:48:21,216 INFO  [STDOUT] JSon Result: => {"definitions":[{"id":"vacation","name":"vacation","version":24,"packageName":"defaultPackage","deploymentId":"N/A","suspended":false,"formUrl":"http://localhost:8080/gwt-console-server/rs/form/process/vacation/render","diagramUrl":"http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST/vacation-image.png"}]}

      15:48:21,217 INFO  [STDOUT] JSon Result: => {"definitions":[{"id":"vacation","name":"vacation","version":24,"packageName":"defaultPackage","deploymentId":"N/A","suspended":false,"formUrl":"http://localhost:8080/gwt-console-server/rs/form/process/vacation/render","diagramUrl":"http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST/vacation-image.png"}]}

      15:48:21,224 INFO  [STDOUT] process name is: vacation

      15:48:21,224 INFO  [STDOUT] process name is: vacation

      15:48:21,919 INFO  [STDOUT] Hibernate: select processins0_.id as id93_, processins0_.processInstanceId as processI2_93_, processins0_.processId as processId93_, processins0_.START_DATE as START4_93_, processins0_.END_DATE as END5_93_ from ProcessInstanceLog processins0_ where processins0_.processId=? and (processins0_.END_DATE is null)

      15:48:21,946 INFO  [STDOUT] JSon Result: => {"instances":[{"id":"1","definitionId":"vacation","startDate":"2011-07-30 10:39:37","suspended":false,"rootToken":{"id":"1","name":"","currentNodeName":"","children":[],"availableSignals":[],"canBeSignaled":false}},{"id":"2","definitionId":"vacation","startDate":"2011-07-30 10:57:24","suspended":false,"rootToken":{"id":"2","name":"","currentNodeName":"","children":[],"availableSignals":[],"canBeSignaled":false}}]}

      15:48:21,950 INFO  [STDOUT] process name is: 1

      15:48:21,950 INFO  [STDOUT] process name is: 2

      15:48:21,950 INFO  [STDOUT] Fetched processInstances:2

      15:48:23,233 INFO  [LoggingFilter] IDLE

      15:48:30,793 INFO  [LoggingFilter] IDLE

      15:48:30,795 INFO  [LoggingFilter] IDLE

      15:48:33,236 INFO  [LoggingFilter] IDLE

      15:48:40,793 INFO  [LoggingFilter] IDLE

      15:48:40,795 INFO  [LoggingFilter] IDLE

      15:48:43,236 INFO  [LoggingFilter] IDLE

      15:48:50,794 INFO  [LoggingFilter] IDLE

      15:48:50,796 INFO  [LoggingFilter] IDLE

      15:48:53,237 INFO  [LoggingFilter] IDLE

      15:49:00,794 INFO  [LoggingFilter] IDLE

      15:49:00,796 INFO  [LoggingFilter] IDLE

      15:49:03,238 INFO  [LoggingFilter] IDLE

      15:49:10,795 INFO  [LoggingFilter] IDLE

      15:49:10,797 INFO  [LoggingFilter] IDLE

      15:49:13,238 INFO  [LoggingFilter] IDLE

      15:49:20,796 INFO  [LoggingFilter] IDLE

      15:49:20,798 INFO  [LoggingFilter] IDLE

       

       

       

      Really thanks