Rule type transform

Hello guys.

I’m learning about rule type transform. I’ve read this documentation Rule | SailPoint Developer Community

But I didn’t understand exctly how this transforman works correctly.

I’d like to know if the parameter name is actually rule, for example:

“type”: “rule”,
“attributes”: {
“name”: “Generate Random Number”
}

the name “name”: “Generate Random Number”, Is it a reference to a rule ?

So I need this transform (“name”: “Generate Random Number”) to exist in my tenant ?

I created it by looking at the documentation, but it doesn’t work.
{
“id”: “aaafca7e-427f-452c-b054-adee358bc27c”,
“name”: “Gui - Transform Rule”,
“type”: “static”,
“attributes”: {
“rule”: {
“type”: “rule”,
“attributes”: {
“name”: “Generate Random Number”
}
},
“value”: “$rule”
},
“internal”: false
}

Mensage error

Can someone help me ?

Does anyone have a simple example of this transform ?

Hello @guilherme_sec

the name “name”: “Generate Random Number”, Is it a reference to a rule ?

No , it is reference to another transform , but not rule .

So I need this transform (“name”: “Generate Random Number”) to exist in my tenant ?

yes , it should be existing on your tenant .

Error states that “Generate Random Number” transform does not exists on the tenant , to implement this follow the below steps :

  • Create a transform with name Generate Random Number and of type randomNumeric
{
  "type": "randomNumeric",
  "name": "Generate Random Number"
}

Now , you can create another transform , in which you can refer the previously created transform by it’s name

{
  "attributes": {
    "name": "Generate Random Number"
  },
  "type": "rule",
  "name": "Rule Transform"
}

Hope this helps !

Thanks
Sid

2 Likes

@sidharth_tarlapally I don’t think this is accurate. A transform can be referenced using the reference primitive, so it wouldn’t make sense for the rule primitive to also call a different transform. My understanding is that this lets you call a rule, though the documentation on what type of rule (is it a regular cloud rule? what does it need to look like?) is unfortunately sparse.

Document reference:

Like the reference transform, the rule transform allows you to reuse logic that has already been written for a previous use case. However, you can use the rule transform to reuse code contained within a Transform rule that either is not possible through only transforms or is too complex to maintain with Seaspray.

Transform structure

In addition to the standard type and name attributes, the structure of a rule transform requires the name of the rule you want to reference:

{
  "attributes": {
    "name": "Transform Calculation Rule"
  },
  "type": "rule",
  "name": "Rule Transform"
}

Attributes

  • Required Attributes
    • type - This must always be set to rule.
    • name - This is a required attribute for all transforms. It represents the name of the transform as it will appear in the UI’s dropdown menus.
    • attributes.name - This is the name of the Transform rule the transform must invoke.

Example:

Transform Rule | SailPoint Developer Community