|
Hello,
I'll explain my situation: I have a document validation workflow, where 3 different ranks of users can post documents and their superior rank has to validate them. I use an sql role provider with the 3 roles defined. When a user wants to submit a document he has to fire an event ("start workflow"). My idea is that after receiving that event I would like to insert a code activity where I check the username of the person that fired the event and check wich is his role. And then based on that role, I would change the "Roles" property of the other event handlers to set it to the role of the superior that has to validate.
So for example, a person with the role "Technician" submits a document. Then after he fires the first event I see what his role is and change the other eventhandlers "Roles" property so that only his superior ("ProjectManager") can fire those events. That is the idea, and I don't see why this can't be done, but the problem is that I don't know how to change the property in runtime and not in design time, from the code beside file I cant find the eventhandler objects and get to their properties. Is it possible to do that? Or someone has some suggestion on another way to achieve the same result?
Thank you very much,
Rubén |