Issues with Lifecyclestate while using transformation logic

Hi Team,

We have facing issue with Lifecyclestate transformation logic.

Example:

{
“attributes”: {
“checkValue”: {
“attributes”: {
“value”: “LifeCycle State”
},
“type”: “static”
},
“value”: “#if( $checkValue.contains("LifeCycle") )active #else inactive #end
},
“type”: “static”,
“name”: “Test LifecycleState”
}

I can see the cloudLifecycle value is set to active, but on identity it is showing as Lifecycle State Not Valid (active ) (Automatic). Does any changes happened on LifeCyclestate identity attribute? If we directly give static value as active it works fine, when we try with logic we are facing the issue.

Provisioning is enabled for active and inactive as Maintain Status.

We have different criteria to derive the active and inactive logic. We can also write complexrule but we are trying to achieve through transformations.

Any pointers on this will be helpful.

Thank you!
Sailaja Prathi

Hey Sailaja, can you specify what is the criteria for deriving active and inactive LCS. The transform pasted here seems more of test transform.

HI Chirag,

PFB Transform:

    {
        "attributes": {
            "status": {
                "attributes": {
                    "attributeName": "empStatus",
                    "sourceName": "HRSource"
                },
                "type": "accountAttribute"
            },
            "dn": {
                "attributes": {
                    "attributeName": "distinguishedName",
                    "sourceName": "TestAD Sources"
                },
                "type": "accountAttribute"
            },
            "value": "#if($dn.contains(\"ou=Users,DC=test,DC=com\") && $status=='E')active #elseif(!($dn.contains(\"ou=disable,DC=test,DC=com\")) && $status=='D') inactive #end"
        },
        "id": "Transform - LifeCycleState Mapping",
        "type": "static"
    }

Thank you!
Sailaja Prathi

@sailajaprathi

Remove the spacing between “active #elseif” and also between “) inactive #end” and try again

2 Likes

Hi Piyush,

Thank you, you are correct It was space issue.

Regards,
Sailaja Prathi