[Product-Developers] AGX and workflows

cewing cewing at u.washington.edu
Fri Sep 25 16:13:42 UTC 2009

bad_my84 wrote:
> Hi all,
> I'm developing my own product with AGX.
> Now I'm trying to design my own workflow, but I'm running into problems:
> I have a contenttype called "Employee".
> On this type references can be set to other "Employees", so a employee can
> have a BackRef called "Manager".
> In my use case only managers can add or view content on the employee.
> Can someone give me some pointers on how to accomplish this?
> Thanks in advance!

There is some code in the Products.FacultyStaffDirectory that can point the
way to doing this. I seem to remember that it is called something like

The basic idea is that you want to give the role of 'Owner' of the employee
content object to the user designated by the reference to 'manager'. 
Archetypes has two events you can use to run this code, IObjectModifiedEvent
and IObjectInitializedEvent.  Create an event handler that delegates the
role and then register that handler for the two above events.  Every time a
new employee is created or an existing one is edited, the role will be
re-set to the correct user.

easy-peasy, eh?



View this message in context: http://n2.nabble.com/AGX-and-workflows-tp3684983p3713272.html
Sent from the Product Developers mailing list archive at Nabble.com.

More information about the Product-Developers mailing list