JBPM5HumanTaskServerOperations should provide a template method to create the TaskClient

29 views
Skip to first unread message

Marian Buenosayres

unread,
Feb 23, 2011, 3:38:12 PM2/23/11
to smart-tasks
This is a suggestion that could help in making an extension of
JBPM5HumanTaskServerOperations easier, so it can provide different
communication schemes easier.

Instead of having this constructor:

public
JBPM5HumanTaskServiceOperations(JBPM5HumanTaskClientConfiguration
configuration) {
//Create the taskClient
MinaTaskClientConnector minaTaskClientConnector =
new MinaTaskClientConnector("jBPM5TaskClient",
new
MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener()));
client = new TaskClient(minaTaskClientConnector);
this.configuration = configuration;


}

It could have this constructor and an overrideable method:

public
JBPM5HumanTaskServiceOperations(JBPM5HumanTaskClientConfiguration
configuration) {
this.configuration = configuration;
//Create the taskClient
client = newTaskClient(this.configuration);

}

public TaskClient newTaskClient(JBPM5HumanTaskClientConfiguration
configuration) {
MinaTaskClientConnector minaTaskClientConnector =
new MinaTaskClientConnector("jBPM5TaskClient",
new
MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener()));
return new TaskClient(minaTaskClientConnector);
}


That way, it becomes easy to create a JBPM5HumanTaskServiceOperations
extension that uses HornetQ and provides an extension point for new
communication schemes

Mauricio Salatino

unread,
Feb 23, 2011, 4:04:41 PM2/23/11
to smart...@googlegroups.com, Marian Buenosayres
sure.. the wrappers can be improved a lot.. we just mock it up in order to have something working quickly.
During the next couple of week we will try to get most of the mappers implementations and configurations ready to test more highlevel modules that are not yet on the master.
Help for the wrappers implementations are highly appreciated, feel free to join us.
--
 - CTO @ http://www.plugtree.com 
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar
 
 - Salatino "Salaboy" Mauricio -
Reply all
Reply to author
Forward
0 new messages