Hi,
This is my Create Policy for webService connector. I receive below error for provisioning.
An unexpected error occurred: java.lang.NullPointerException: Cannot invoke "java.util.Map.entrySet()" because "table" is null
{
"name": "Create Policy",
"description": "Create Policy Description",
"usageType": "CREATE",
"fields": [
{
"name": "email",
"transform": {
"type": "identityAttribute",
"attributes": {
"name": "email"
}
},
"attributes": {},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "firstName",
"transform": {
"type": "identityAttribute",
"attributes": {
"name": "firstname"
}
},
"attributes": {},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "lastName",
"transform": {
"type": "identityAttribute",
"attributes": {
"name": "lastname"
}
},
"attributes": {},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "userId",
"transform": {
"type": "usernameGenerator",
"attributes": {
"sourceCheck": true,
"patterns": [
"$roleInitial.$fi$ln",
"$fi$ln",
"$roleInitial.$fi$ln${uniqueCounter}",
"$fi$ln${uniqueCounter}"
],
"roleInitial": {
"type": "lookup",
"attributes": {
"input": {
"type": "identityAttribute",
"attributes": {
"name": "businessUnit"
}
},
"table": {
"Administrators": "A",
"Build Team": "B",
"Call Center Team": "C",
"IT API & Data Validation Team": "D",
"Education Team": "E",
"Finance Team": "F",
"Home Trial Services": "H",
"Leadership": "L",
"CTM/PM": "P",
"Recruitment Team": "R",
"Site Users": "S",
"Testing": "T",
"Internal QA": "Q",
"VST Team": "V",
"default": "X"
}
}
},
"fi": {
"type": "upper",
"attributes": {
"input": {
"type": "substring",
"attributes": {
"input": {
"type": "identityAttribute",
"attributes": {
"name": "firstname"
}
},
"begin": 0,
"end": 1
}
}
}
},
"ln": {
"type": "replaceAll",
"attributes": {
"input": {
"type": "identityAttribute",
"attributes": {
"name": "lastname"
}
},
"regex": "[^\\p{L}]",
"replacement": ""
}
}
}
},
"attributes": {
"cloudMaxUniqueChecks": "25",
"cloudMaxSize": "100",
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
}
]
}
I checked the roleInitial as separate transform and it works. I even tired to reference that transform into the create policy, but it didnt work.
{
"name": "Create Policy",
"description": "Create Policy Description",
"usageType": "CREATE",
"fields": [
{
"name": "email",
"transform": {
"type": "identityAttribute",
"attributes": {
"name": "email"
}
},
"attributes": {},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "firstName",
"transform": {
"type": "identityAttribute",
"attributes": {
"name": "firstname"
}
},
"attributes": {},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "lastName",
"transform": {
"type": "identityAttribute",
"attributes": {
"name": "lastname"
}
},
"attributes": {},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "userId",
"transform": {
"type": "usernameGenerator",
"attributes": {
"sourceCheck": true,
"patterns": [
"$roleInitial.$fi$ln",
"$fi$ln",
"$roleInitial.$fi$ln${uniqueCounter}",
"$fi$ln${uniqueCounter}"
],
"roleInitial": {
"type": "reference",
"name": "Role Initial Reference",
"attributes": {
"id": "Role Initial Lookup"
}
},
"fi": {
"type": "upper",
"attributes": {
"input": {
"type": "substring",
"attributes": {
"input": {
"type": "identityAttribute",
"attributes": {
"name": "firstname"
}
},
"begin": 0,
"end": 1
}
}
}
},
"ln": {
"type": "replaceAll",
"attributes": {
"input": {
"type": "identityAttribute",
"attributes": {
"name": "lastname"
}
},
"regex": "[^\\p{L}]",
"replacement": ""
}
}
}
},
"attributes": {
"cloudMaxUniqueChecks": "25",
"cloudMaxSize": "100",
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
}
]
}