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?
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.
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 :
Create bundle and set workgroup identity
Bundle testBundle; //with all details set
testBundle.setAttribute(“customRoleOwnerAttr”, wgIdentity);
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”);
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?
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.