Re-assigning assignment resource orders before approval

I have a set of application roles that are published as assignment resources to the portal. When a person orders the role, the following happens:

  • The order goes through standard approval by a named approver
  • The approval workflow's last step fires a custom event (approvals made externally) that will fire a custom process that does the following:
    • A subidentity of type admin is created for the ordered person, if one does not already exist
    • The subidentity is added to the IT-shop, if not already present
    • The order is re-assigned to the subidentity (UID_personOrdered, ObjectKeyElementUsedInAssign) using SQL update.
    • The order is approved and assigned with a MakeDecision method call.

What actually happens is that the assignment request is properly assigned to the subidentity, but the role is assigned to the primary identity. There is no reference to the primary identity in the PWO at the time when the order is approved. I have also tried re-assigning UID_personInserted to the sub, but no luck there.

Where and how is it determined that the role should go to the primary identity instead?

We have a similar setup for certain system roles, and there this approach works fine.

Parents
  • Figured this out. When the order is created the PWO has a bogus XObjectKey in ObjectKeyAssignment property, that points to a non-existent PersonINAERole entry. Since it does not exist it does not have a display value so it looks as if it's empty when you view it with ObjectBrowser. This XObjectKey is then used to create the actual PersonINAErole entry when the order is approved and assigned.

    I assumed it would use ObjectKeyElementUsedInAssign or PersonOrdered to create the assignment.

Reply
  • Figured this out. When the order is created the PWO has a bogus XObjectKey in ObjectKeyAssignment property, that points to a non-existent PersonINAERole entry. Since it does not exist it does not have a display value so it looks as if it's empty when you view it with ObjectBrowser. This XObjectKey is then used to create the actual PersonINAErole entry when the order is approved and assigned.

    I assumed it would use ObjectKeyElementUsedInAssign or PersonOrdered to create the assignment.

Children
No Data