Skip to Content
Former Member
Sep 09, 2009 at 03:10 PM

Error filling role?


I'm trying to programatically instantiate a process, and I'm getting this exception:

Error filling role Edit_Object of role type 4 during instantiation Error filling role Edit_PPRP0 of role type 4 during instantiation

The Administrator and Overseer roles are Initiator Defined, and mapped to a specific user in the GP Design Time. The Owner is set to Initiator, and the only role left 'Edit_Object', is assigned at runtime via the following code:

for (int i = 0; i < process.getRoleInfoCount(); i++) {
  IGPProcessRoleInstance roleInstance = roles.createProcessRoleInstance(process.getRoleInfo(i).getRoleName());				
  if (roleInstance.getProcessRoleTechName().equals("Edit_Object0")) {
    IUser manager = UMFactory.getUserFactory().getUserByLogonID(wdContext.currentContextElement().getUserid());		

I have verified that the 'manager' user is correctly fetched from the UME.

What am I doing wrong?

On a related note, how am I supposed to map from the role names in the GP Design Time, vs at runtime using the API? The only way I could determine which role I needed to assign a user to was to traverse the roles and inspect the role names until I came upon 'Edit_Object0' - this name (which I've changed to avoid exposing and private corporate information) does not bear any relation to the line item in the design time....and I was unable to find the technical name anywhere. Suggestions?