Re: Assign workflow steps to groups/roles
Hani Suleiman <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.devel |
|---|---|
| Message-ID | <[email protected]> |
Yeah, unfortunately there's no way around looping through all the steps, the problem with adding more columns to step tables is there where do you stop? There's always someone who needs just one more column to query/sort/restrict by. I do use the EJB provider yeah, but it also has its limits (eg, no query support). On Monday, May 5, 2003, at 01:08 PM, Philipp Hug wrote: > well, the problem is, if you use a WorkflowQuery to find the > open taks/steps for a specific user, you need to fetch each step > that has owner "null", then load the coresponding workflow > definition and call the OSUserGroup function. > >> AbstractWorkflow subclassing > well, you can't access the OSUserGroupFunction sections in sql, because > they're in the XML definition and not in the database. > > You're using CMP, right? Maybe I should switch to CMP too, > it seems to be better supported than JDBC ;-). > > philipp > ----- Original Message ----- > From: "Hani Suleiman" <[email protected]> > Subject: Re: [Opensymphony-developers] Assign workflow steps to > groups/roles > > >> I solve this by using my own caching group check function, using >> ThreadLocals. Basically what happens is that every time there's a >> group >> check (OSUserGroupFunction I think, too lazy to look up the actual >> classname), I use my own group function, which pretty much does what >> the standard group function does, except that it uses a threadlocal >> context which stores both cache hits and misses, so that the user is >> only ever checked against a group once, with the rest of the checks >> being very fast cache hits. Unfortunately you still end up potentially >> looping over hundreds of steps, but the cost per iteration is very >> minimal, so the performance becomes a lot more decent. >> >> Another option is to subclass your chosen AbstractWorkflow >> implementation and add a method which uses jdbc to constrain the >> number >> of steps returned to somehting that matches your group requirement, >> rather than doing it at the appserver level. >> >> On Monday, May 5, 2003, at 11:36 AM, Philipp Hug wrote: >> >>> Does anyone use roles/groups in his workflows? How did you implement >>> them? >>> The example workflow assigns workflow steps to owner "null" and then >>> uses >>> permissions >>> to see if a uses is allowed to see/change this workflow. >>> The problem with this implementation is, that it doesn't perform very >>> well, >>> because you might need to loop over hundereds of steps assigned to >>> "null". >>> How about adding a owner group field to Step? But now, if someone is >>> in a >>> bunch >>> of groups you have to do a lot of queries. >>> Any ideas? >>> >>> Philipp >>> >>> >>> >>> ------------------------------------------------------- >>> This sf.net email is sponsored by:ThinkGeek >>> Welcome to geek heaven. >>> http://thinkgeek.com/sf >>> _______________________________________________ >>> Opensymphony-developers mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/opensymphony-developers >>> >> >> >> >> ------------------------------------------------------- >> This sf.net email is sponsored by:ThinkGeek >> Welcome to geek heaven. >> http://thinkgeek.com/sf >> _______________________________________________ >> Opensymphony-developers mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/opensymphony-developers >> >> > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf