0
Answered

Blocking a transformation for one entity

Carol Wapshere 7 years ago updated by anonymous 7 years ago 6

I expect the answer is No, but worth asking...

Aurion has the head of Dept's position shown as reporting to her EA. This is apparently necessary for some internal Aurion reason. However they don't want her EA appearing as her Manager all over the place (as it currently is, including in the Corporate Directory).

As I can't do an Advanced Flow Rule on a reference attribute I can't selectively block "manager" coming into the Metaverse. (I may have to implement a scoped Sync Rule just for this one flow- yuck!)

If at all possible, is there any way I can exclude one entity on the Join transformation that is generating the Manager attribute inside the IdB Adapter?

Answer

+1
Answer
Answered

Hi Carol,

No, this is not directly possible with the Join transformation. If you're using Identity Broker v5.1 or above, you could consider using the PowerShell Transformation to remove the value (by assigning the value null) to the appropriate field of the target entity.

+1
Answer
Answered

Hi Carol,

No, this is not directly possible with the Join transformation. If you're using Identity Broker v5.1 or above, you could consider using the PowerShell Transformation to remove the value (by assigning the value null) to the appropriate field of the target entity.

Are you saying I'd replace the Join Transform with a Powershell one, or have the Powershell transform running after and setting the value back to NULL? If the second option sounds like it would be pretty simple to implement, with less change to the production solution - I like it!

+1

You're correct, he was referring to the second option (having the PowerShell after the join and setting the value to NULL).

Can I get some more help with this? I thought the following script would do it, but it does not identify the entity. I added in the logging and I'm just seeing that Warning in the logs.

When running the Powershell transformation in the Adapter, is it the Adapter entities that its looping through?


# Clear Reports-To/Manager attributes for the Secretary's position
$posID = "123456"
$found = $false
foreach ($entity in $entities)
{
   if ($entity["ActualPositionNumber"] -and $entity["ActualPositionNumber"] -eq $posID)
   {
       $entity["ReportsToPersonNumber"] = $null
       $entity["ReportsToPosition"] = $null
       $entity["Manager"] = $null
       $found = $true
       $logger.LogInformation("Aurion Personnel: ReportsTo and Manager attribute values stripped from the person in the Secretary position of {0}." -f $posID)
       break
   }
}

if (-not $found)
{
    $logger.LogWarning("Aurion Personnel: Did not find a person with ActualPositionNumber matching the expected Secretary's position of {0}. This is used by the PowerShell transformation that removes their ReportsTo and Manager attribute values." -f $posID)
}

Hi Carol,

As per PowerShell Connector Entities, the value returned when looking up a field is an IValue, if you want to get at the raw string value you'll need to access the Value sub-property, e.g.

$entity["ActualPositionNumber"].Value

The entities in this collection are adapter entities with all transformations previous to the currently executing PowerShell transformation already applied.

+1

Thanks - that was it!