How about simply reusing the human task node for this. Your process is then
a simple sequence of 2 human task nodes. You can use the properties of the
human task node (like name, description, content and input/output mapping to
add the necessary information). Instead of using the default human task
service for executing these tasks, you can then just write your own work
item handler that notifies your UI when a task is created. Your UI should
also notify the handler when a task is completed.
Regarding continuing where you stopped last time, this happens
automatically. When a work item is encountered, the process will halt until
that work item has been completed. You should just keep your session alive,
or if you use persistence you can simply restore the state from db as well.
Kris
----- Original Message -----
From: "jawa" <agohar(a)gmail.com>
To: <rules-users(a)lists.jboss.org>
Sent: Wednesday, July 21, 2010 1:02 PM
Subject: Re: [rules-users] Drools Flow - Human Task
Hi,
Thanks for your reply.
What I am trying to do is create a task which needs human input. Like I
said
above my post that there will be two tasks. One will be 'Ask User a
Question', this will let my front end know to display next question to
user.
We'll have to wait for user's answer and flow should stop here until user
answers the question and front end let drools flow know that an answer is
received. So I want my flow to continue where it stopped last time which I
think I can do with StatefulKnowledgeSession and store it in db? The Other
task will be 'Record Answer', this will record answer to db.
So I need to write that Ask question handler somehow to let drools flow
know
to stop at this task and when an answer is received just mark this task as
complete and move to next node.
Thanks
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Human-Tas...
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
Disclaimer:
http://www.kuleuven.be/cwis/email_disclaimer.htm