Bug 848945

Summary: Mistakes related to HornetQ task client transport
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Alessandro Lazarotti <alazarot>
Component: doc-BRMS_Business_Process_Management_GuideAssignee: lcarlon <lcarlon>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GA   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 22:19:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alessandro Lazarotti 2012-08-16 22:12:15 UTC
The default port for HornetQ is not 5445, it is 5446:
https://access.redhat.com/knowledge/docs/en-US/JBoss_Enterprise_BRMS_Platform/5/html-single/BRMS_Business_Process_Management_Guide/index.html#id3289108

As HornetQ is the default protocol, the section below should be fixed. WSHumanTaskHandler and CommandBasedWSHumanTaskHandler don't work with HornetQTaskClientConnector, so, must be used CommandBasedHornetQWSHumanTaskHandler.
https://access.redhat.com/knowledge/docs/en-US/JBoss_Enterprise_BRMS_Platform/5/html-single/BRMS_Business_Process_Management_Guide/index.html#id3119294

In the same topic above, the example using Mina should be changed to use HornetQ (the documentation does not have any example about it).
So, instead of:

TaskClient client = new TaskClient(new MinaTaskClientConnector("client 1",
    new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
client.connect("127.0.0.1", 9123);

Might be used:

1. TaskClient client = new TaskClient(new HornetQTaskClientConnector("HornetQConnector" + UUID.randomUUID(),
2.     new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));		
3. client.connect("127.0.0.1", 5446);	
4. CommandBasedHornetQWSHumanTaskHandler handler = new CommandBasedHornetQWSHumanTaskHandler(ksession);
5. handler.setClient(client);
6. handler.connect();
7. ksession.getWorkItemManager().registerWorkItemHandler("Human Task", handler);

Some things in the example above is important to mention (according with several jBPM community foruns and customers):
1) (line 1) The HornetQ Client Connector "must" use an unique name, so the UUID.randomUUID() should be used to compose its name.
2) (line 4) CommandBasedHornetQWSHumanTaskHandler should be used instead of WSHumanTaskHandler or CommandBasedWSHumanTaskHandler as already mentioned.
3) (line 5,6 and 7)The ksession, taskclient and the handler must be linked to each other. It is a important piece where several example are missing. Including this on the topic "10.2.3. Interacting with the Human Task Service" is very important.

Comment 1 lcarlon 2012-08-16 22:19:45 UTC
Hi Alessandro.

This is a duplicate of BZ845992, however, it does provide some of the information I asked for in the other bug, so I will copy the report across to the comments.

Thanks 
Lee

*** This bug has been marked as a duplicate of bug 845992 ***