Hi,
My requirement is to assign security group to the user profile in maximo which is created from the external system as inbound transaction based on the role of the person of the external system.I have mapped external fields in json mapping, am storing the security groups (groupname) in description of domain of maximo. below code is not working for me when the request is sent to external system from postman and getting error BMXAA7874E - Users cannot be removed from the EVERYONE group because it is specified as the group for all as a response. can you please suggest if my code is correct or not?
def beforeMboData(ctx):
mbo = ctx.getMbo() # The PERSON MBO being processed
if not mbo:
return
struc = ctx.getData()
print(struc)
child = struc.getChildrenData("MAXGROUP")
print("child is-------------"+child);
role = child.getCurrentData("GROUPNAME")
print("role is"+role);
if not role:
return
user_info = mbo.getUserInfo()
person_id = mbo.getString("PERSONID")
domainset = MXServer.getMXServer().getMboSet("ALNDOMAIN", user_info)
domainset.setWhere("VALUE = 'role'")
domainset.reset()
if domainset.isEmpty() == False:
domainMbo = domainset.getMbo(0)
if domainMbo is not None:
domainMboSecGroup = domainMbo.getString("DESCRIPTION")
mbo.putData("GROUPNAME",domainMboSecGroup)
#MaximoApplicationSuite------------------------------
chidambar shastry
GE
------------------------------