The record to be saved must not be null

Hello,

I have created a CDT, User Input form & Data Store, I have mapped and verified the data store its successful. The mappings were also successful, I have created a record also its successful. But when in the process model when I input data to the form and connect it to the data store, it fails and throws the following error.

 

There is a problem with task “Collection of Uniform Residential Loan Applicants” in the process “AT my first Appian Action”

Problem:  An error occurred in executing an Activity Class.

Details:  An error occurred while trying to write to the entity “Freddie_Mac_Form” [id=3ad89d38-4131-427b-a496-a3837351fb77@4514, type=CDT_InputFields (id=2626)] (data store: Freddie_Mac_Form). Details: java.lang.IllegalArgumentException: The record to be saved must not be null: TypedValue[it=2626,v=<null>] Data: TypedValue[it=2626,v=<null>]

Recommended Action:  Examine the activity class to correct the error and then resume.

Priority of this problem: High Priority

 

Can anyone please recommend how to resolve this and where to check for this.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Look in the process model properties of a running instance of the process model. Under variables, you'll find the CDT you're trying to save to the database. It should have values after you've submitted the form. You can click on the link on the bottom of the alert to go to the process and look for the CDT variable.

    If it doesn't have any values after you submit the form, there's probably a step missing in the rigging to and from the form. You have to save the CDT or it's component parts as activity parameters (ac! variables). You do that on the Inputs tab on the node. You also have to make sure the saveInto dropdown is set to save the values back to the right place in the process variables (pv! variables). Then you go to the Form tab and make sure the correct ac! variables match to the inputs of the form's SAIL code. It's best to use keyword arguments to make sure you don't miss any. Also be very careful to check the spelling, if one's misspelled it will just not use it and won't warn you.

    So process variable saves to AC variable, saves to rule input (ri! variable) in your SAIL, goes to a user input, your user can type what they want into the input, that gets saved to the RI variable, when you submit that gets saved to the AC variable, which gets saved back to the PV variable, and that goes to the database node. I know it's a bit much, but you get used to it. Once you've got it working and you can see the data you input in the process variables, it should be a cinch to work out any other problems if you're still having them.
Reply
  • 0
    Certified Lead Developer
    Look in the process model properties of a running instance of the process model. Under variables, you'll find the CDT you're trying to save to the database. It should have values after you've submitted the form. You can click on the link on the bottom of the alert to go to the process and look for the CDT variable.

    If it doesn't have any values after you submit the form, there's probably a step missing in the rigging to and from the form. You have to save the CDT or it's component parts as activity parameters (ac! variables). You do that on the Inputs tab on the node. You also have to make sure the saveInto dropdown is set to save the values back to the right place in the process variables (pv! variables). Then you go to the Form tab and make sure the correct ac! variables match to the inputs of the form's SAIL code. It's best to use keyword arguments to make sure you don't miss any. Also be very careful to check the spelling, if one's misspelled it will just not use it and won't warn you.

    So process variable saves to AC variable, saves to rule input (ri! variable) in your SAIL, goes to a user input, your user can type what they want into the input, that gets saved to the RI variable, when you submit that gets saved to the AC variable, which gets saved back to the PV variable, and that goes to the database node. I know it's a bit much, but you get used to it. Once you've got it working and you can see the data you input in the process variables, it should be a cinch to work out any other problems if you're still having them.
Children
No Data