I am a beginner working on the Appian Developer course and while creating a process model had an issue with a Write to Data Store Entity node.
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.
Instructions:
This Data Type is used for two interfaces and connected to a Data Store as well. Status says problem with task.
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.
Discussion posts and replies are publicly visible
A couple of questions about this issue:
Yes, there is a checkbox selected to auto-generate.
The AX_Maintenance custom data type does not refer to any other custom data type that I'm aware of. How can I check this?
Hi there,
This error is coming because you have a not-null column in your table. A not-null column cannot store null values, which you are trying to do in your case.
This might be a little tricky for you but can you click on that gearbox on the top right, and select Download XSD from there? After doing it, you will see an XSD file that you can open in a notepad. Please look for this property in the file.
This should be set to false for columns that can have null values at any point in time.
I did as you suggest and am now getting this error:
An error occurred while trying to write to the entity "AX_Maintenance" [id=a715498b-834b-4663-914f-c2b5b2246cf3@3764, type=AX_Maintenance (id=3838)] (data store: AX Data Store). Details: org.hibernate.PropertyValueException: not-null property references a null or transient value: AXMaintenanceDT5139.vehicleID Data: TypedValue[it=3838,v={<null>,<null>,2022-02-02,0,test ,Scheduled,<null>,<null>,<null>,<null>,<null>
I am also getting the same error.. In your case, the error got resolved?
This is not the real error. When we were creating, you can see there are null values provided in the AX_Maintenance interface, because of that write to store entity is not working. We are just doing the learning exercise, maybe the Appian community has to do an update on this. Just go on with your Appian Community Learning courses. Good Luck.
Got it.. Thank you!
The solution, in this case, is to add another New custom output in Script task, the output will be pv!vehicle.id for the target maintenance.vehicleid. It will work perfectly after that.
Hi! You will need to add in some test vehicle data so that the vehicle ID is not null by going into the process model properties. Exercise 9 has now been updated to include this step. Hope this helps!
yes... Thank you!