Error running rule transform:Rule with ID or name null was not found

I am trying to get a transform for password and it keeps giving error and null value for the attribute

{
  "name": "Temporary Password Generator",
  "type": "static",
  "attributes": {
    "firstInitialUppercase": {
      "type": "upper",
      "attributes": {
        "input": {
          "type": "substring",
          "attributes": {
            "input": {
              "type": "accountAttribute",
              "attributes": {
                "attributeName": "FirstName",
                "sourceName": "SAP SuccessFactors"
              }
            },
            "begin": 0,
            "end": 1
          }
        }
      }
    },
    "lastInitialUppercase": {
      "type": "upper",
      "attributes": {
        "input": {
          "type": "substring",
          "attributes": {
            "input": {
              "type": "accountAttribute",
              "attributes": {
                "attributeName": "LastName",
                "sourceName": "SAP SuccessFactors"
              }
            },
            "begin": 0,
            "end": 1
          }
        }
      }
    },
    "dateOfBirth": {
      "type": "split",
      "attributes": {
        "delimiter": "-",
        "index": "1",
        "input": {
          "type": "accountAttribute",
          "attributes": {
            "attributeName": "dateOfBirth",
            "sourceName": "SAP SuccessFactors"
          }
        }
      }
    },
	"socialsecuritynumber": {
      "type": "rule",
      "attributes": {
        "input": {
          "type": "substring",
          "attributes": {
            "input": {
              "type": "accountAttribute",
              "attributes": {
                "attributeName": "nationalid",
                "sourceName": "SAP SuccessFactors"
              }
            },
            "begin": 7,
            "end": 10
          }
        }
      }
    },
    "value": "$firstInitialUppercase$lastInitialUppercase$dateOfBirth$socialsecuritynumber"
  }
}

Hello @Pratik_Shrestha,

Welcome to the developer community!

It looks to me that your last static attribute socialsecuritynumber is a little off. You will not need the rule type here, just the substring and your input value as below:

"socialsecuritynumber": {
            "type": "substring",
            "attributes": {
                "input": {
                    "type": "accountAttribute",
                    "attributes": {
                        "attributeName": "nationalid",
                        "sourceName": "SAP SuccessFactors"
                    }
                },
                "begin": 7,
                "end": 10
            }
        }

The full transform would then be as shown here.

{
    "name": "Temporary Password Generator",
    "type": "static",
    "attributes": {
        "firstInitialUppercase": {
            "type": "upper",
            "attributes": {
                "input": {
                    "type": "substring",
                    "attributes": {
                        "input": {
                            "type": "accountAttribute",
                            "attributes": {
                                "attributeName": "FirstName",
                                "sourceName": "SAP SuccessFactors"
                            }
                        },
                        "begin": 0,
                        "end": 1
                    }
                }
            }
        },
        "lastInitialUppercase": {
            "type": "upper",
            "attributes": {
                "input": {
                    "type": "substring",
                    "attributes": {
                        "input": {
                            "type": "accountAttribute",
                            "attributes": {
                                "attributeName": "LastName",
                                "sourceName": "SAP SuccessFactors"
                            }
                        },
                        "begin": 0,
                        "end": 1
                    }
                }
            }
        },
        "dateOfBirth": {
            "type": "split",
            "attributes": {
                "delimiter": "-",
                "index": "1",
                "input": {
                    "type": "accountAttribute",
                    "attributes": {
                        "attributeName": "dateOfBirth",
                        "sourceName": "SAP SuccessFactors"
                    }
                }
            }
        },
        "socialsecuritynumber": {
            "type": "substring",
            "attributes": {
                "input": {
                    "type": "accountAttribute",
                    "attributes": {
                        "attributeName": "nationalid",
                        "sourceName": "SAP SuccessFactors"
                    }
                },
                "begin": 7,
                "end": 10
            }
        },
        "value": "$firstInitialUppercase$lastInitialUppercase$dateOfBirth$socialsecuritynumber"
    }
}
1 Like