PureEngage On-Premises

 View Only

Sign Up

Security role module not set when creating a wfm user with the API

  • 1.  Security role module not set when creating a wfm user with the API

    Posted 09-10-2015 10:19
    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: