Task #1103
closedEnable lookupService in Groovy scripts
100%
Description
I would like to lookup identity, tree node etc in a Groovy script according to this tutorial: https://wiki.czechidm.com/tutorial/dev/lookup_service
Please enable lookupService in groovy scripts.
Files
Updated by Ondřej Kopr over 6 years ago
- File selectLookup.png selectLookup.png added
- Assignee changed from Ondřej Kopr to Alena Peterová
When I enable LookupService for script (interface ScriptEnabled) in script authorities is available these services, is this good?
Updated by Alena Peterová over 6 years ago
- Assignee changed from Alena Peterová to Ondřej Kopr
Yes, that's exactly what I needed.
Updated by Ondřej Kopr over 6 years ago
- Status changed from New to Needs feedback
- Assignee changed from Ondřej Kopr to Alena Peterová
- Target version set to Jade (8.1.0)
- % Done changed from 0 to 90
Thanks, I added script enabled for lookup service and check behavior via scripts agenda.
Commit: https://github.com/bcvsolutions/CzechIdMng/commit/8e25e94ccf1010cf21fbe41382c87cc80aa35717
Please Alca could you make review? Thank you.
Updated by Alena Peterová over 6 years ago
- Assignee changed from Alena Peterová to Ondřej Kopr
Thanks, I tested that it can now be used in the scripts. It works perfectly for identities.
I tried to lookup an organisation by its code, but it didn't find it, the result of the following was null:
IdmTreeNodeDto org = (IdmTreeNodeDto) lookupService.lookupDto(IdmTreeNodeDto.class, "310003");
So the lookupService can't be used for searching tree nodes by codes, or is it some bug?
Updated by Radek Tomiška over 6 years ago
IdmTreeNodeDto is not Codeable => tree node doesn't have unique code, because more tree types can exist.
Updated by Alena Peterová over 6 years ago
Radek Tomiška wrote:
IdmTreeNodeDto is not Codeable => tree node doesn't have unique code, because more tree types can exist.
I see. OK, I will add only a little comment about this in that wiki page, so others won't be confused as I was :-)
Updated by Ondřej Kopr over 6 years ago
- Status changed from Needs feedback to Resolved
- % Done changed from 90 to 100
I thanks Alca for feedback, I will close the ticket.