[jboss-user] [jBPM] - Re: From where taskClient.getTasksAssignedAsPotentialOwner(user, "en-UK", taskSummaryHandler); picks up the tasks

Rajan Bansal do-not-reply at jboss.com
Fri Sep 23 10:38:55 EDT 2011


Rajan Bansal [http://community.jboss.org/people/rajan01] created the discussion

"Re: From where taskClient.getTasksAssignedAsPotentialOwner(user, "en-UK", taskSummaryHandler); picks up the tasks"

To view the discussion, visit: http://community.jboss.org/message/628272#628272

--------------------------------------------------------------
Actually I start the "HumanTaskService" with my own in JBoss using the below code:-

        EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.task");
        TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
        TaskServiceSession taskSession = taskService.createSession();

         Map vars = new HashMap();
        Reader reader = new InputStreamReader( StartTaskService.class.getResourceAsStream( "LoadUsers.mvel" ) );     
        Map<String, User> users = ( Map<String, User> ) eval( reader, vars );   
        for ( User user : users.values() ) {
            taskSession.addUser( user );
        }           

        reader = new InputStreamReader( StartTaskService.class.getResourceAsStream( "LoadGroups.mvel" ) );      
        Map<String, Group> groups = ( Map<String, Group> ) eval( reader, vars );     
        for ( Group group : groups.values() ) {
            taskSession.addGroup(group);
        }

        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 ...YAHOOO..");

and I make the changes in jbpm-human-task-5.1.0.Final.jar's Persistence.xml, so it now points to my db.
And with this all the task related imformation is stored in my db and I can see it properly.

But the only thing is: if a "Process" having "3UserTasks" then on starting the Process, the db can contain only the imformation about the "first pending" but not others 2. 

But as soon as I complete the first task then its status changes to pending and then "second pending user" shows in my db.

So please tell me how I store "session db" to my own db.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/628272#628272]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110923/516d4aaf/attachment-0001.html 


More information about the jboss-user mailing list