Franklin Antony [
http://community.jboss.org/people/frankee787] created the discussion
"Re: In memory TaskClient without Mina or JMS"
To view the discussion, visit:
http://community.jboss.org/message/616710#616710
--------------------------------------------------------------
Hi Mauricio,
I have tried to put together as much information as possible , but its really hard to
express all the possible use cases. Anyways, following are what I am facing right now.
I think one of the major pains everyone is suffering is the Transaction Management
aspect.
As mentioned, the HumanTask Service is completely emebedabble and is one of the
*STRONGEST* points of jBPM. However that is also one of the biggest problems now. Let me
explain
*USE CASE 1*
My application uses the the following to create a client and interact with a task. No
process is associated with this.
client = new TaskClient(new MinaTaskClientConnector("client", new
MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
In a situation like the following
1)I insert/update into my database(Flight ticket Task / User Approval Task / Backoffice
Data Auditing etc: business specific data)
2)I call client.addTask(task, null, addTaskResponseHandler) (to create a task in jBPM)
3)I update my database saying the task has been created sucessfully in jBPM
NOTE: Reason for step 1 is as follows : Putting all business related data inside the
TaskData doesnt seem to be good idea(Getting serialized and persisted, looses the ability
to search). Also there is no task history being mainted in the jBPM
*QUESTIONS:*
How can I ensure steps 1 - 3 are in one transaction?
This should be achieveable outside an appserver since HumanTask Service is completely
emebedabble.
*USE CASE 2*
My application uses a Kession to start of a process(which comprises of mutiple human
tasks)
In a situation like the following
1)I insert/update into my database saying process has been started(Flight ticket booking
Process/ User Enrollment Process etc: business specific processes)
2)I call ksession.startProcess("com.sample.evaluation", params) (to start the
process in jBPM)
3)I update my database saying the process has been started sucessfully in jBPM
*QUESTIONS:*
How can I ensure steps 1 - 3 are in one transaction?
How can my business application be notified when a Task is being created as part of a
process execution?
This should also be achieveable outside an appserver since HumanTask Service is completely
emebedabble.
*USE CASE 3*
Putting all business related data inside the TaskData doesnt seem to be good idea(Getting
serialized and persisted, looses the ability to search). It would be better just to keep a
reference of your business data inside TaskData and look it up when interacting with a
Task.
*QUESTIONS:*
Which brings us to the last question. How can my business application be notified when a
Task is being created as part of a process so that this reference can be made in my
application.
I hope my USER CASESes are clear now ?
Thanks a lot Mauricio for hearing out for the community.
Regards,
Franklin
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/616710#616710]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]