[rules-users] How to use Drools Flow?

Diego López León dieguitoll at gmail.com
Mon Aug 2 07:10:39 EDT 2010


On Mon, Aug 2, 2010 at 6:45 AM, XiaoMiTang <dingyongchang at hotmail.com> wrote:
>
> I have taken a look at the Human Task ,but i can not understand it.
> The ruleflow.rf  file should be split into two ?
> =====  ruleflow.rf  =====
> Start--->Action1(need user A to do it)---->Action2(need user B to do
> it)-->Email-->End
> ==========
>
> sub1.rf:  Start--->Action1(need user A to do it)---->End
> sub2.rf:  Start--->Action2(need user B to do it)-->Email-->End
>
> User A log in , execute the code:
> session.startProcess("com.sample.sub1");
> In action1,create a task by Human task management component:
> Task task1 = new Task();
> ……
> client.addTask(task1, null, addTaskResponseHandler);
>
> Then, user B log in,execute:
> session.startProcess("com.sample.sub2");
> in action2,do something like this:
> client.start(task.getId(), "user B", operationResponseHandler);
> ……
> client.complete(task.getId(), "user B", null, operationResponseHandler);
>
>  Maybe this can work out the problem,but it is too clumsy.
> How to use a Human Task node in the *.rf file? is there an example?
>

I would do something like

Start--->Human Task assigned to user A--->Action1---->Human Task
assigned to user B--->Action2-->Email-->End

wdyt?

-- 
diego




More information about the rules-users mailing list