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
Discussion posts and replies are publicly visible
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.
srinivast0002 said: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.
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...
How to make 'vehicleid' in 'AX_Maintenance' as Foreign Key. Can you please help me.
I think you'll need to give us more context for us to help you. For instance - what is your data model? What is your process trying to do / which data are you updating? Can you share screenshots of your CDT?
I am trying to add AX_Maintenance record
Ok it looks to me like your maintenance CDT is expecting to receive the vehicle (with the ID provided), but you haven't done that. Does your process model expect that there will always be a vehicle provided or is it possible the value could be null? If so, you may need to make sure that you insert your vehicle information before you insert the maintenance information so that you get the correct ID for the vehicleid field.
Can you show what your process model looks like? What troubleshooting steps have you tried so far?
I am having a similar issue.
Details of my error: "An error occurred while trying to write to the entity "AX_Maintenance" [id=a715498b-834b-4663-914f-c2b5b2246cf3@3764, type=AX_Maintenance (id=3832)] (data store: AX Data Store). Details: org.hibernate.PropertyValueException: not-null property references a null or transient value: AXMaintenanceDT4982.vehicleID Data: TypedValue[it=3832,v={<null>,<null>,2022-01-28,0,test,Scheduled,<null>,<null>,<null>,<null>,<null>"
Process Model:
It looks like the issue is leading back to the AX_Maintenance Data Type that was created as part of Exercise 9 in the Appian Developer course - same exercise where this process model is later created.
This Data Type is used for two interfaces and connected to a Data Store as well.
Not sure where to go with this - wondering if something in the AX_Maintenance Data Type is causing the issue. Went back through some of the previous instructions to make sure I had everything but am still getting the issue.
Tried running through process for debugging multiple times taking different nodes to get to Write to Maintenance Entity but am still getting stuck at that node.
I don't have enough experience to add much more, but this is what I have observed.
Are you able be solve this problem? I also have the similar issue.