I am trying to create a number of WFM users with the WFM API. I can successfully produce the WFM accounts but when I view the new account in the WFM Configuration utility, the security role is visible on the user but the corresponding modules for the security role are not set.
Code:
int secRole = fetchSecurityRoleID(conn, context.getWfmJobFunctions(), props);
person.setGswUserId(context.getUserDBId());
person.setWmUser(context.getOwnerIDWithEnvironment());
person.setGswFirstName(context.getForename());
person.setGswLastName(context.getSurname());
person.setWmTimezoneId(tzID);
person.setWmSecurityRoleId(secRole);
CfgValidationHolder res = conn.insertUser(person, false);
if (res.isSuccess()) {
MyAccessLogger.log(Level.INFO, "Successfully created WFM user " + person.getWmUser());
}
Result: