This content has been marked as final. Show 6 replies
My question is, how to get Role by having the request ID inside custom SOA composite !! In the example custom composite for approval process, I see that the embedded java code is retrieving requestId from the payload. But I do not know whether payload will have "Role name" also. !! Hope some OIM SOA expert will help me here.
I have no idea what will be there in the payload. This is what given in the embedded java code in the example Custom SOA composite :
Object reqIdXMLElem = getVariableData("inputVariable", "payload", "/ns3:process/ns4:*RequestID*");
The reason I am asking is, if I come to know the Role name, the approval Role can be formed using this role name !!
Example, if role name is "RoleA", then my approver will be "RoleA_APPROVER" ! So I can assign the request to RoleA_APPROVER in the custom SOA composite.
Edited by: Jyothi on Nov 4, 2012 7:37 PM
Edited by: Jyothi on Nov 4, 2012 7:45 PM
You will get the role name from the payload itself. In the payload as you are getting the requestId, similarly, you will get the object requested. In your case since you are requesting for the role, the payload will contain the role name. What you need to do it create a role request and then check the request from EM. In EM you will find the payload xml and there you can see the data being sent in the payload.
I donot have a running environment for role now but I think the payload would contain all the attributes of the role even. So you can directly read off the "Owned By" attribute off the payload and assign the task to that user. If not, you can use OIM APIs to connect to OIM and read a lookup which contains this mapping or just append _APPROVERS as the name of the approver group.
If you go into the Enterprise Manager (port 7001/em on admin server), expand SOA, then your soa-infra for the server, then default, you will see all your soa-composites. Select the one you are using. Under recent instances, select one of the Instance IDs and it will open a popup. click the Approval Process link. Fro here, you will be able to see all of the different steps of the approval process. Under recieveInput, expand the payload.
Now you can see the whole payload, all the variables, and pull the information you need using the suggested techniques already stated.