Having trouble writing data to data store entity

Hi all,

 

I am a beginner in Appian and I have come across a problem that I've debugged for an hour but can't find the solution to. I'm attempting to write data to a data store entity and I continue to get the following error:

Problem:  An error occurred in executing an Activity Class.

Details:  An error occurred while trying to write to the entity "vehicle_parts" [id=7241da9e-15f3-402f-ae6d-b0f08195974e@87648, type=VFM_Part (id=3724)] (data store: VFM DS CK). Details: java.lang.IllegalArgumentException: The record to be saved must not be null: TypedValue[it=3724,v=<null>] Data: TypedValue[it=3724,v=<null>]

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

Priority of this problem: High Priority

 

Does anyone have any idea how to solve this? If it helps, I'm also having trouble finding the created table after I save and publish my data store with no issues.

  Discussion posts and replies are publicly visible

  • I guess I'm just puzzled as to why I'm having this issue because in the last two practice applications I created, I never had to define the table annotation in the XSD; it always saved to the entity I created in the data store. What you're saying definitely makes sense, my question now is how would I change the table name? Because the fact that it is saving to vfmpart tells me that my code is working, I just would need to change the name of something so that it doesn't save to someone else's table that is also named vfmpart, which is what is happening now. so should I change the CDT? or something else? Basically how do I solve this issue now that I know what the issue is?
  • Hi chynnak,

    You can download the DDL script that is generated after publishing the data store. In that script you can find the table name that need to save the data and configure the data store entity node inputs and outputs.

    Thanks,
    Sravani.
  • i think the data which you are trying to pass in data store entity is empty..
  • you can create one query rule is that return zero items of the cdt than table is their, if table isn't their it will give u error
  • Two simple steps I suggest:
    1- Check the process by monitoring it whether the data have some value as the statement clearly says "The record to be saved must not be null: ". If in some scenarios the values can be null check using XOR gateway and override write to DB if null values encounter.
    2- if data is their than, you might have change something in cdt defination after publishing, Download the XSD of that cdt by clicking on setting button and selecting download XSD, and check the definition in you cdt are same as in CDT. If these are not same definitions change them accordingly and use the update version by XSD in setting menu.

     

    IF not working at all, And u don't mind the previous data to loose, Their is a smart service as QueryDatabase use that and drop ur current table and publish the datastore again to create a new one.

    remember when you didn't provide table name annotations appian automatically removes '_' from cdt name to create table name
    ex cdt name: EX_employee than table name would be EXemployee



    Hope these point will help you

  • Super late reply but for anyone still running into this issue: you need to File > Save and Publish the process model before debugging it.