Attribute Resolver Script - Idp3/Java8
Cantor, Scott
cantor.2 at osu.edu
Fri Feb 17 19:35:28 EST 2017
> Migrating to Java8 and Shibbolet3.
You don't seem to be migrating the script, you're using the legacy package there.
> Having a bit of a stumble wrapping my head around the changes for java 8
The changes are around Nashorn as a sripting engine, but if you're trying to migrate the script you have to get rid of the legacy package and update all that. Otherwise what you have should mostly just work (if it was right to start with) except for the Nashorn changes, but none of the names of objects or what you can do with them should change. I have plenty of scripts that I use unmodified from V2 but that's because I use Rhino as the script engine.
Basically:
- pick a scripting engine
- decide whether to move off the edu.internet2... package stuff
- change accordingly
> In below -- the dependency 'bar' has 3 attributes -- where can I declare this?
> sourceAttributeId does not seem to be supported?
A data connector dependency fed into a script populates the script with all the attributes it contains, which is what the documentation says:
"A variable which implements ScriptedIdPAttribute for each attribute produced by the defined dependencies of this definition. If a dependency is an attribute definition, that attribute is supplied. If a dependency is a data connector, every attribute resolved by that connector is supplied. The variable's name will be that of the ID of the attribute from the dependency."
If "bar" is a DataConnector, then you can't just access it by that name, it isn't a single source of data. You say it contains 3 attributes so those are the named variables you have to access.
You could not possibly have been using that logic before, and if you were, I'm terrified that it "worked", that would be bizarre. To work, "bar" would have to be an AttributeDefinition.
-- Scott
More information about the users
mailing list