Defect #2096
closedApply the "Write only on create of the entity" strategy authoritatively
100%
Description
@10.1
According to wiki https://wiki.czechidm.com/tutorial/adm/systems#attributes_mapping:
"Write only on create of the entity - If checked, the attribute value is sent to end system only together with CREATE operation. If UPDATE is sent to connected system, this attribute is not sent again."
When you have an attribute that the connector does not return at all, e.g. a parameter for a create PowerShell script that is only needed for the create operation and is not in the schema of the object, this attribute will be in the CREATE operation, but also in the UPDATE operation as well. The "Write only on create of the entity" strategy somehow does not apply.
In the schema, the attribute is (manually added):
[ ] Required
[ ] Able to read
[ ] Multivalued
[x] Able to create
[x] Able to edit
[ ] Returned by default
Seems like the "[x] Able to edit" overrides the strategy. When I uncheck it, the attribute is sent only in the CEATE operation. I would expect that the schema settings defines what IDM can do with the attribute and the actual mapping (including the strategy) defines what IDM realy does with it.
I also have an attribute that is in the schema of the object (not manually added in IDM) and is returned from the system by GET operation, which has the "Write only on create of the entity" set for provisioning and following schema settings:
[ ] Required
[x] Able to read
[ ] Multivalued
[x] Able to create
[x] Able to edit
[x] Returned by default
and this attribute is only sent in CREATE operation not in UPDATE operation.
Updated by Vít Švanda about 4 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
- % Done changed from 0 to 90
The problem occured only if the schema attribute was set as returnByDefault = false. In this case is uses different branch (created for the #767).
I fixed this. Value for this attribute is not send in this case now.
I crated test for this scenario.
Commit: https://github.com/bcvsolutions/CzechIdMng/commit/ff8a222d63c62612f52edb3565af0bbbd550b948
Updated by Radek Tomiška about 4 years ago
- Status changed from Needs feedback to Resolved
- Assignee changed from Radek Tomiška to Vít Švanda
- % Done changed from 90 to 100
I did test and code review, it works and code is nice, thx!
Updated by Radek Tomiška about 4 years ago
- Status changed from Resolved to Closed