hi,john:
first,thank you very much!

i just want to create a todolist for a user.if workflow launch a process
definition,engine will send workitem to participant.
so if i map the participant to the user.the user will have a todo task about
workitem.

today,as your says,i implements the Ruote::StorageParticipant,after consume
the participant,i will create a relationship bewteen
the user and the participant,at the same time,i will create a todo task for
a user.

and then in the rails application,user will get todo task.

---8<---
module TestWoo
  class WooTestParticipant < Ruote::StorageParticipant
    def consume( workitem )
     super(workitem)
     puts "1----------------------__>" +workitem.nil?.to_s
     message = Rufus::Json.encode(workitem)
     wfid = workitem.h.fei['wfid']
     puts "2----------------------__>" + message.to_s
     participant = workitem.participant_name
     fields = workitem.to_h['fields']
     puts "3----------------------__>" + fields.to_s
     wfid_s = wfid.to_s
     participant_s = participant.to_s
     puts  "4===>wfid = " + wfid_s
     puts  "5===>participant = " + participant_s
     map_participant_user(wfid_s,participant_s)
     puts "6----------------------__>"
    end
    #just want to map the participant to user.
    #and the user will get from cloudsoft_security_roleuser.
    def map_participant_user(wfid_s,participant_s)
       ActiveRecord::Base.connection.insert("insert into
wfwiparticipant(workitem_id,participant,participant2,workitem_state,extend1)"
+
                                            "select
'#{wfid_s}','#{participant_s}',csru.user_id,1,'' from" +
                                            " cloudsoft_security_role
csr,cloudsoft_security_roleuser csru" +
                                            " where csr.role_id =
csru.role_id " +
                                            " and csr.role_id =
'#{participant_s}'");
    end
  end
end
--->8---

do you have any suggestion about this.
kind regards

eric

-- 
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

Reply via email to