Create work item approval request for bundle and workgroup create operation

Which IIQ version are you inquiring about?

Version 8.4

Share all details related to your problem, including any error messages you may have received.

Hi,
I am looking for a way to create bundle/role in IIQ through custom workflow “Role Modeler - Owner Approval”. I am setting custom attribute roleOwner (of type Identity) on bundle object.
Whenever I set the roleOwner object to bundle, the custom workflow persists the workgroup identity object immediately without waiting for workitem approval.

However parent bundle object not persisted prior apporval. Is there any way to persist workgroup object along with bundle, only after approval?

Thanks!

Hi @dshitole,

can you share the code? and errors if you have?

Also, in your WF you use forms?

Maybe it would be stupid question - but isn’t requester the same person as the one set as owner in the bundle object? If yes Bundle Modeler workflow will skip approval and just save it.

Hi @enistri_devo

Thanks for the response.

I am customizing OOTB workflow “Role Modeler - Owner Approval”.
If you see the approval object can only be Bundle hence I am not able to put workgroup also in approval.

Below is an example pseudo code :

  1. Create bundle and set workgroup identity
    Bundle testBundle; //with all details set
    testBundle.setAttribute(“customRoleOwnerAttr”, wgIdentity);

  2. Pass bundle object to OOTB workflow along with other details.
    HashMap<String, Object> launchArgsMap = new HashMap<>();
    launchArgsMap.put(“approvalObject”, testBundle);
    Workflow wf = context.getObjectByName(Workflow.class, “Role Modeler - Owner Approval”);

  3. As soon as I launch the workflow, the workgroup identity (wgIdentity) is getting created in advance without waiting for approval. Is there any way to restrict workgroup persist until role/bundle approval success?

Hope this helps. Thanks!

Hi @kjakubiak

In this case the requester is not the role owner and I am using custom bundle attribute of type identity. Only issue is attribute of type identity which is set on bundle is not going into approval phase and workgroup identity directly getting created.

The approval request will get sent to default admin role owner workgroup which already exist.

Found the below possible solution,
Since, I was setting custom identity object on bundle, it was getting persisted while invoking the customized OOTB workflow.
So, in case if you have custom bundle attribute of type identity then just set name (String format) of that identity instead of object on approvalObject (bundle). This avoids relevant object creation in advance prior to approval. After approval step you can add custom step to create identity object.

    Bundle bundle = (Bundle) approvalObject;
    bundle.setAttribute("customRoleOwnerAttr", "newRoleWorkGroupName");

Feel free to share if anyone has better solution than this. Thanks!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.