[jboss-user] [jBPM] - Re: Create Custom Implementation for Human Task WorkItemHandler, Which class I should extend?

Timothy Charman do-not-reply at jboss.com
Mon Dec 3 05:24:12 EST 2012


Timothy Charman [https://community.jboss.org/people/tcharman] created the discussion

"Re: Create Custom Implementation for Human Task WorkItemHandler, Which class I should extend?"

To view the discussion, visit: https://community.jboss.org/message/779578#779578

--------------------------------------------------------------
default.session.template is in console-server code in src/main/resources.  It looks like this:
new SessionTemplate().{  
    businessKey = "jbpm/consolesession",
    imported = false,
    persistenceUnit = "org.jbpm.persistence.jpa",

    properties = ["drools.processInstanceManagerFactory":"org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory",
                  "drools.processSignalManagerFactory" : "org.jbpm.persistence.processinstance.JPASignalManagerFactory"  
                    ],

    workItemHandlers = ["Human Task" : "new org.jbpm.process.workitem.wsht.AsyncHornetQHTWorkItemHandler(\"jbpmConsoleHTHandler\", taskClient, ksession, org.jbpm.task.utils.OnErrorAction.LOG)",
                        "Service Task" : "new org.jbpm.process.workitem.bpmn2.ServiceTaskHandler(ksession)"],

    eventListeners = ["new org.jbpm.process.audit.JPAWorkingMemoryDbLogger(ksession)",
                      "new org.jbpm.integration.console.listeners.TriggerRulesEventListener(ksession)"  ]
};

You won't find a session.template unless you create one to override this.

The session template is loaded by the MVELSingleSessionManager.  The code is like this:
            InputStream templateFile = PropertyLoader.getStreamForConfigFile("/session.template", defaultSessionTemplate);

So it loads the property from the classpath - you just have to pick a place on the classpath  :) .

We gave up with this approach as we have dozens of human type tasks and didn't want to configure them all here, and we wrote our own SessionManager, but it is up to you.
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://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/20121203/c690f1dc/attachment-0001.html 


More information about the jboss-user mailing list