Project

General

Profile

Actions

Task #1103

closed

Enable lookupService in Groovy scripts

Added by Alena Peterová almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ondřej Kopr
Category:
Scripts
Target version:
Start date:
05/22/2018
Due date:
% Done:

100%

Estimated time:
Owner:

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

selectLookup.png (28.7 KB) selectLookup.png Ondřej Kopr, 05/23/2018 08:48 AM
Actions #1

Updated by Ondřej Kopr almost 6 years ago

When I enable LookupService for script (interface ScriptEnabled) in script authorities is available these services, is this good?

Actions #2

Updated by Alena Peterová almost 6 years ago

  • Assignee changed from Alena Peterová to Ondřej Kopr

Yes, that's exactly what I needed.

Actions #3

Updated by Ondřej Kopr almost 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.

Actions #4

Updated by Alena Peterová almost 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?

Actions #5

Updated by Radek Tomiška almost 6 years ago

IdmTreeNodeDto is not Codeable => tree node doesn't have unique code, because more tree types can exist.

Actions #6

Updated by Alena Peterová almost 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 :-)

Actions #7

Updated by Ondřej Kopr almost 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.

Actions #8

Updated by Ondřej Kopr almost 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF