Merging workitems on concurrence

13 views
Skip to first unread message

peterpunk

unread,
Feb 9, 2012, 4:15:34 PM2/9/12
to ruote
Hi:

I want to get the workitems merged when I have a concurrence :count
=>1 but the second branch got cancelled and I got the workitem from
the branch that was replied first.
On my use case I have 2 branches, in the lowest branch there is a lot
of expressions and workitem changes, so if the short branch replies
before the longest I want to have the latest workitem of the longest
branch merged with the first.

An example:

rset :field => "initial", :value => 1
concurrence :count =>1, :merge => "lowest", :merge_type => "union" do
alpha
subprocess :ref => "lot_of_things"
end
check_workitem
terminate

process "lot_of_things"
rset :field => "lot", :value => "of things"
some_participant_that_not_reply_inmediatly
end

alpha replies before than some_participant_that_not_reply_inmediatly
but in the merge I dont get the field "lot" with "of things" value
merged when the process reach check_workitem participant.

Can I get the workitem of lot_of_things merged when the fe got
cancelled?

I was thinking to do something on cancel, like if there's no children,
that is the latest and I can reply with the applied_workitem, but I
could not detect if the expression was the last on the tree on the
on_cancel.

I hope I was clear explaining it.

I'm very happy using ruote ;-)

Thanks

P


John Mettraux

unread,
Feb 11, 2012, 12:49:55 AM2/11/12
to openwfe...@googlegroups.com
Hello Peter,

I haven't forgotten you. I will come up with a solution soon. Stay tuned.

Best regards,

John

John Mettraux

unread,
Feb 11, 2012, 11:39:44 AM2/11/12
to openwfe...@googlegroups.com
Hello Pedro,

would that :remaining => 'wait'

https://github.com/jmettraux/ruote/commit/91fec4edc74de92b1d5a3b1d723d78a0ba5dd57a#diff-3

help you?


Best regards,

--
John Mettraux - http://lambda.io/processi

peterpunk

unread,
Feb 12, 2012, 3:53:14 AM2/12/12
to ruote
Thank you so much.

That helped me ;-)

So now when the last waiting participant receive the cancel I can
reply from there and get the current workitem merged ;-)

I have to test it already, I'll let you know how it worked.

Thanks again!

P

On Feb 11, 5:39 pm, John Mettraux <jmettr...@gmail.com> wrote:
> Hello Pedro,
>
> would that :remaining => 'wait'
>
>  https://github.com/jmettraux/ruote/commit/91fec4edc74de92b1d5a3b1d723...
Reply all
Reply to author
Forward
0 new messages