Skip to main content
srinivast0002
November 26, 2021
Question

write to data store enitity

  • November 26, 2021
  • 13 replies
  • 0 views

Problem:  An error occurred in executing an Activity Class.

Details:  An error occurred while trying to write to the entity "AX_Maintenance" [id=2ec391d4-a462-4e0e-92e4-b01ad2475087@3690, type=AX_Maintenance (id=3836)] (data store: AX Data Store). Details: org.hibernate.PropertyValueException: not-null property references a null or transient value: AXMaintenanceDT4830.vehicleid Data: TypedValue[it=3836,v={<null>,<null>,2021-11-25,0,o,Scheduled,<null>,<null>,<null>,<null>,<null>,srinivas.talasu@tcs.com,,,,2021-11-26,srinivas.talasu@tcs.com,2021-11-26,<null>}]

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

I am getting this error when I add details and storing it in data store. Can anyone help me to identify activity class

    13 replies

    stewart.burchell
    November 26, 2021

    Hi Srinivas

    The error message is telling you what the issue is:

    It's telling you that the vehicleid attribute of the data type 'AX_Maintenance' is set to null and is not allowed to be null. 

    tanvirs0003
    Inspiring
    November 26, 2021
    vehicleid

    It is the primary key for your table & CDT. Primary key can never be null, to avoid this set it to auto increment. Auto Increment will prevent it from being null. 

    stewart.burchell
    November 26, 2021

    I hesitated to say it was the Primary Key as there's nothing in the error message to tell us that. All it does say is that 'vehicleid' cannot be null...it may be, for example, another attribute in the 'AX_Maintenance' CDT which is actually a Foreign Key to, say, 'AX_Vehicle'...which may make more sense - a Vehicle can have one or more Maintenance records, but each Maintenance record MUST be for a specific vehicle...

    srinivast0002
    November 29, 2021

    How to make 'vehicleid' in  'AX_Maintenance' as Foreign Key. Can you please help me.

    February 10, 2022

    Are you able be solve this problem? I also have the similar issue.

    tanvirs0003
    Inspiring
    February 11, 2022

    the issue is your DB table is having few fields which are not nullable, means they should have a value before writing it to DB. But from Appian when you are trying to write the data to the table some of the not nullable fields are referencing null values. Due to this you are getting the above mentioned error. Check in DB which fields are showing not nullable & check the same in CDT values whether they are null. Also make your primary key auto increment in Appian

    shreyas978733
    February 25, 2022

    Still getting the same error