Hi Guys,
I created a process model which let the user inserts his information then save them to the database, it worked fine, but doesn't save the data to the database. When I did refresh I got this.
Discussion posts and replies are publicly visible
Hi,Can you please share what the error message reads?
An error occurred in executing an Activity Class.
Details: An error occurred while trying to write to the entity "Employee_DB" [id=f3650a76-b78b-4f7b-a711-d3d7efd05e08@4093, type=ES_Employee (id=4016)] (data store: ES_Employee_DS). Details: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): ESEmployeeDT6506 Data: TypedValue[it=4016,v={Ali,<null>,AA@gmail.com,05347384882,Low-Code Team}]
Recommended Action: Examine the activity class to correct the error and then resume.
I got this on my email.
aaron.li said:I believe it takes houseBid as an amount that is being bid on and therefore doesn't default it to an integer.
that would be a strange thing to set as a primary key id field, then.
i'm a little unclear here whether you created the DB table then the CDT based on it, or the other way around - but if you create the CDT first, you'd need to make the PKID field Integer type. If you create the DB table first, you'd need to use int(11) type. "Double" is merely the DB-side type for the Appian data type of "decimal" as seen in your screenshot. (I know you might know these things already, but adding just in case clarificaiton is needed.)
Either way, at the end of the day, it seems as if something was not set correctly at creation time. I hope you have it working now as hinted by your reply.
Thank you for the clarification, its very much appreciated for my understanding. You are in fact right that I made the mistake of using the PK the for the houseBid which in my mind was supposed to be the Bid Amount hence the decimal type. Therefore it's now obvious why it made it a Double because it was a decimal type chosen by myself... Unclear setting up as to what fields I actually wanted which I've now done correctly which for anyone reading this in the future:
bidId (Int) (PK)
bidAmount (int)
other fields etc.
Thanks, I edited from the database, and it worked, but when the user inserts his information, it creates two copies into the database. is it because the process model or what?
this is probably due to something incorrectly configured in your Write to DSE node. It's hard to tell exactly what that might be though - can you post a screenshot of the data tab configuration of that node?
What does the process instance data look like after the node is run? What does the DB-side row duplication look like? Can you verify that there aren't 2 proecss instances being launched at the same time by accident somehow?
As a side note, though this likely isn't related to your particular issue, you don't want to have the "saveInto" set in the Data Input tab - the value that gets saved back into the PV from that configuration will *not* have the created primary key populated.
Mike Schmitt said:Can you verify that there aren't 2 proecss instance
Actually it does, but I don't know why
Ali Abdulqawi said:but I don't know why
It would depend on how/where you're calling the process, which you haven't really mentioned here.
I think calling the process occurs in "write to datastore entity" object.
Hi Mike, I am new to this platform can you please guide me how to configure for auto increment
Reagrds,
Indu Priya