On Tue, May 18, 2010 at 08:36:15AM +0800, eric wrote:
> john,first thanks a lot.
>
> i also think the workitem is better,but workitem store a lot of info.
> in the enterprise application,users is lagre enough.
> everytime,when you get the user's todotask,you should query all the
> workitem.
> this increse the database I/O.the performence of the application will be
> weaker.
>
> the todolist is just focus on the user and the url(where is todotask).
> so i create a todotask table to slove this I/O performence problem.
Hello Eric,
then you can have something like
---8<---
class TodoParticipant
include Ruote::LocalParticipant
def initialize (opts)
end
def consume (workitem)
Todo.new(
:user => workitem.participant_name,
:at => workitem.fields['todo_at'],
:description = workitem.fields['todo_description']
).save!
# creates Todo record
reply_to_engine(workitem)
# let the process instance resume immediately
end
end
--->8---
This participant creates a Todo and then lets the process instance resume
immediately.
It assumes you have an ActiveRecord model named Todo with 3 columns 'user',
'at' and 'description'.
Best regards,
--
John Mettraux - http://jmettraux.wordpress.com
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en