Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Can I use task object to access its rule or role information within CreatAccountJSON?

alc
Regular Contributor
Regular Contributor

Hello Saviynt Expert,

When my connector receive a provisioning task to execute such as createAccount. I want to know if this task is triggered by a rule or by a role assignment or by a manual application account request.

Can I get such information via createAccountJSON configuration?

For example, define a parameter: "operationTrigger":"${task?.assignedFromRule?.rule_name}"

Any idea if it does not work this way? We need determine some account attribute values based on the trigger source. Account dynamic attributes cannot help us because each rule (provisioning policy) will need a set of custom attribute values to be set on target application.

Thanks!

8 REPLIES 8

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @alc 

Can you please let me know which connector are you looking for the binding variable as it also depends on the connector type to check if those variables are exposed are not

alc
Regular Contributor
Regular Contributor

Hello Darshan,

I use JarConnector for a legacy application.

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @alc 

You can use the variable ${task?.assignedFromRule}", You can get the rule key populated from this.  Rulename wont be fetched as it is not exposed.

This is for a generic rest connector.

Note: For roles the object is exposed ( ${task?.assignedFromRole?.role_name})

alc
Regular Contributor
Regular Contributor

Thanks Darshan, this is helpful!

Any idea to get the rule_name through some magic? you know if we only use rulekey, it will be different from different Saviynt instance. it will make configuration migration complicated as we have to update the rulekey logic. 

Can I access to REST endpoint to get rule_name by rule_key?

Thanks,

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @alc 

No, you can access task.endpoint table but it doesn't contain rule_key but anyways from key even if you get you wont be able to get the rule_name.

If you still want this variable to be exposed, you can raise it in ideas portal as enhancement request.

I would suggest the best way is to use the variable -  ${task?.assignedFromRule}". You use the if else condition and pass the rule_name, it may have one time issue if you want to migrate from one env to another but it will be a one time update and you are good to go.

 

Thanks

Darshan

alc
Regular Contributor
Regular Contributor

Thanks Darshan, I'll try it out.

alc
Regular Contributor
Regular Contributor

Hi Darshan,

unfortunately, when I try it out. the tasks table does not have a value on the assignedFromRule column for a task of createAccount for a new user triggered by a technical rule. Any idea please?

Thanks,

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @alc 

No, this is a OOTB behavior, if the task is created from rule , then assignedFromRule column will have the rule key mentioned, You can check again for other tasks , if you still face any issue you can raise a FD ticket and support team will check further.

 

Thanks

Darshan