PowerShell connector use original entities on update
Adam van Vliet 8 years ago in PowerShell connector • updated by anonymous 7 years ago • 8
For the PowerShell connector, the collection of original entities should be available to the script.
Customer support service by UserEcho
Thanks Adam van Vliet
Continuing on from Yammer
The HTTP OData method we are invoking here via PowerShell is an UPSERT (insert or update - the server works it out). It is designed so we don't have to provide values of columns we don't care about (i.e. we can do what I'm doing now, and filter out all but the columns needed by Broker). So in this case, when a value is nulled (by FIM) for export via IdB to the target OData endpoint, I really need to know two things:
Resolved. Kevin, please confirm.
This issue is the same as with the compiled connectors, and we have the same options available to us. Either use the context entities, or retrieve the item from the target system. We've used both options with success, usually saving the latter for when we need the original object type to perform the update. Depending on the pattern being used in the script, you could loop through the schema and check the old and the new entity for that field (the pattern that I believe you're using); or loop through the values in the the entity; or access the known fields by name, one-by-one.
Really only useful for update, I can't think of a reason to check the ContextEntities on add, as it won't be there.
Yes on the second point Adam van Vliet - only applies to update (which is where I have the challenge right now).
Also what would be REALLY handy right now is some sort of PowerShell connector test harness that would enable me to run the script in debug via the IDE. I'm not sure if you can attach the ISE to a process like you can with VS.Net, but something that would aid in script debugging would help enormously, and save hours and hours of "educated guessing", particularly when it comes to simulating the IdB object model.
Bob Bradley, that would be possible with the connector test harness. Unfortunately not available in the product as it'd be a security flaw to allow everyone to access it. See
Adam van Vliet - while I'm in build/troubleshoot mode this test harness would be very handy indeed. It would be OK to use in DEV I presume so long as we never deployed to Prod? Longer term, when the "security enhancements" are made we could indeed include it in the product - and considering the amount of time I could have saved if I had a debugging feature, this could pay for itself very quickly.
Confirmed original entity made available to powershell script.