Hello all,
I configured the webservice connector, but I have some problems with the correct aggregation of multi valued attributes with a multiple endpoint. The first call is for listing all users, for every user a call should be executed to retrieve the groups. It looks like it is retrieving the correct groups but as soon as there are more groups the attribute on the link will be left empty.
The parent call is: GET endpoint/users, this call has an id that is used in the other call
The second call is: GET /users/$response.id$/memberships?type=Project, this has the following parameters:
Root path: $.[*]
Schema attribute: source_id → project_id
Parent Endpoint Name: Account Aggregation (name of first call)
both calls are set as Account Aggregation.
So far so good, the response seems to be correct. The response is build up like:
[
{
"source_id": 0001,
"source_name": "xxxx",
"source_type": "Project",
"access_level": xx
},
{
"source_id": 0002,
"source_name": "xxxx",
"source_type": "Project",
"access_level": xx
},
{
"source_id": 0003,
"source_name": "xxxx",
"source_type": "Project",
"access_level": xx
}
]
I have add a WebServiceAfterOperationRule to check the response. It just does the following:
log.error(processedResponseObject );
This is as follow for users with a single value:
PROCESSEDRESPONSE: [{project_id=0001}]
For multiple values it is like:
PROCESSEDRESPONSE: [{project_id=0001}, {project_id=0002}, {project_id=0003}]
I have added this attribute in the schema of the account as:
Name: project_id
Type: String
Properties: Multi-Valued
Now, when someone has only one value the link is aggregated with the one project_id the user have. But as soon as there are more values returned in the processedresponse it is left empty and it doesn’t exist on the link. I can not figure out why, is there anyone who can help with it?