Which IIQ version are you inquiring about?
8.2
Hello community, I am using webservice connector disable account operation. Need to send JSON and i am manipulating json through before provisioning rule.
When i set the identity to inactive, the rule is not triggering after performance task and not updating the accoutn status on target and IIQ. Is there a way to trigger the disable and using the provisioning rule ? below is my rule , can you please advise
I am not using disable form in this scenario
Map body = requestEndPoint.getBody();
String jsonBody = (String) body.get("jsonBody");
log.error("Delete jsonBody BEFORE: " +jsonBody);
JSONObject jsonObj = new JSONObject(jsonBody);
JSONObject modifiedJson = new JSONObject();
//get userId from Link
Application application = context.getObjectByName(Application.class,"App Name");
String myIdentity = provisioningPlan.getNativeIdentity(); //returns native identity string
Identity identity = null;
String appUserId = "";
if (StringUtils.isNotEmpty(myIdentity) && application != null) {
identity = context.getObject(Identity.class,myIdentity);
Link appLink = identity.getLink(application);
if (appLink != null && appLink.getAttribute("userId") != null) {
appUserId = appLink.getAttribute("userId");
log.error("appUserId is " +appUserId);
}
}
// set Id from userAccount
AccountRequest accReq = provisioningPlan.getAccountRequest("UMS GBP");
if (accReq != null && jsonObj != null) {
JSONObject userReqMsg = jsonObj.get("userStatusMessage");
if (userReqMsg != null) {
log.error("Delete userReqMsg >> : " +userReqMsg.toString());
userReqMsg.put("userId", appUserId);
modifiedJson.put("userStatusMessage", userReqMsg);
}else {
log.error("jsonObj.get(\"userStatusMessage\") is null");
}
}
//set the body
Map bodyMap = new HashMap();
bodyMap.put("jsonBody",modifiedJson.toString());
requestEndPoint.getBody().put("jsonBody", modifiedJson);
requestEndPoint.setBody(bodyMap);
log.error("Modify requestEndPoint after body >> : " +requestEndPoint.getBody().get("jsonBody"));
context.commitTransaction();
return requestEndPoint;