Determining the current Role being used

Is there an obvious way to see which role is currently being used in a process? Something like ProcessContext.RoleName would have been quite handy... 

The role name is also not written to the eEvent table per event.Our client requires dashboards and reports which includes role based reporting...

Anyone know of a clean way to get hold of the Role Name at runtime?

 

Tagged:

Comments

  • Thomas,

     

    I'm not sure what you are trying to access.  Roles never really have a 1-1 relationship within the process.  A person, stage, action, form, report, etc.  can all be tied to more than one role.  Additionally, since our dynamic roles are parameterized, they are completely transient and can mutate depending on context.

     

    The eEvent table stores the user that has taken the action (if it is a user action).  If you want to know the roles the users has, you can check the eAssignment table, but this wouldn't help for the Dynamic Roles as I mentioned above.

     

    Rob

  • Thanks for the input Rob.

    I do agree that it won't be possible to determine which dynamic roles were used.
    I was referring to static roles. Yes, there's isn't a 1-1 relationship, but what we'd like to be able to have access to, is the current role of the user which allowed him to receive that alert on his ToDo list, or to action the folder. Ideally, if it was a 'eRoleName' column in the eEvent table, we could then extract data to determine role based SLAs etc.

    E.g. If 10 users are assigned to the Authorizers role today, but tomorrow we have 12 users in there, we'd like to track the performance of that specific department (role), independently of the users in that role.
    Reason being that the users are moved between roles almost on a daily basis depending on volumes, and building a role based report on the eAssignment table (by joining the username from the eEvent table) will only show true data for user's current role assignments and not necessarily his role at time of the event.

  • Unfortunately roles are not evaluated in a way that could allow that. The entire list of valid user names is generated, and then the current user is searched for in this list. If they are in, the action or form is visible. For generating alerts it is different, as no user is searched for, but the alert list is generated from the entire list of names.

     

    This is why using a role such as 'everybody', especially on large systems, is discouraged.

  • Thanks for confirming the restirction Jerome.

    If I recall correctly, v 7.6 of Metastorm stored the roles that had access to a stage in the eToDoList column of the eStage table? Is this no longer the case for v9?