


Hi all,
I'm new to aem, so I'm trying to design a Adaptive Form and persist data to MySQL database.
Database connections are working fine.
AEM Version: 6.3
issue : When i submit the adaptive form, the data to the master table(employee) get saved successfully. but data to the child table (claim) is not saving to the database.
Log : this is the only warning i get when i submit the form
04.05.2018 06:02:38.688 *WARN* [124.43.18.74 [1525413758681] POST /content/forms/af/claim-for-on-call-allowance/claim-for-on-call-allowance-form-latest/jcr:content/guideContainer.af.internalsubmit.jsp HTTP/1.1] com.adobe.aemds.guide.internal.impl.utils.SubmitDataCollector TemplateKey not found in merge json:style
04.05.2018 06:02:38.690 *INFO* [124.43.18.74 [1525413758681] POST /content/forms/af/claim-for-on-call-allowance/claim-for-on-call-allowance-form-latest/jcr:content/guideContainer.af.internalsubmit.jsp HTTP/1.1] com.adobe.aemds.guide.internal.impl.utils.JsonSchemaUtils Value: isn't compliant with JSON Schema. It should be number
04.05.2018 06:02:38.690 *INFO* [124.43.18.74 [1525413758681] POST /content/forms/af/claim-for-on-call-allowance/claim-for-on-call-allowance-form-latest/jcr:content/guideContainer.af.internalsubmit.jsp HTTP/1.1] com.adobe.aemds.guide.internal.impl.utils.JsonSchemaUtils Value: isn't compliant with JSON Schema. It should be number
04.05.2018 06:02:38.690 *INFO* [124.43.18.74 [1525413758681] POST /content/forms/af/claim-for-on-call-allowance/claim-for-on-call-allowance-form-latest/jcr:content/guideContainer.af.internalsubmit.jsp HTTP/1.1] com.adobe.aemds.guide.internal.impl.utils.JsonSchemaUtils Value: isn't compliant with JSON Schema. It should be number
04.05.2018 06:02:38.690 *INFO* [124.43.18.74 [1525413758681] POST /content/forms/af/claim-for-on-call-allowance/claim-for-on-call-allowance-form-latest/jcr:content/guideContainer.af.internalsubmit.jsp HTTP/1.1] com.adobe.aemds.guide.internal.impl.utils.JsonSchemaUtils Value: isn't compliant with JSON Schema. It should be number
Full Log Link(9.21MB)
Request to the server when submitting the form captured using firefox:
{
"afData":{
"afUnboundData":{
"data":{}
},
"afBoundData":{
"data":{
"employee_1525240639590":{
"personId":8664,
"familyName":"Kuranage8",
"givenNames":"Yohan Aloka Perera8",
"location":"Batuwatta8",
"locationNumber":11011,
"jobTitle":"Software Engineer",
"classification":"None",
"telephone":"+94717043469",
"email":"kg.yohan@gmail.com",
"claim_employee_claim_1525409575878":{
"totalWorkingClaimDays":"55",
"totalNonWorkingClaimDays":"22"
}
}
}
},
"afSubmissionInfo":{
"computedMetaInfo":{},
"signers":{},
"afPath":"/content/dam/formsanddocuments/claim-for-on-call-allowance/claim-for-on-call-allowance-form-latest",
"afSubmissionTime":"20180504060238"
}
}
}
This is the Data Model Objects of my form.
This is the association properties between employee and claim(One to Many).
This is the response from server when i test form data modal.
This is how i have map data modal objects to the form.
properties of Adaptive Form Container related to submission.
I hope you will understand my question and help me to solve this.
Thank you & best regards..!
You can perform this use case in 2 ways
1 - see this doc - -https://helpx.adobe.com/ca/experience-manager/6-3/forms/using/data-integration.html
2 - the second way involves directly using the DataSOurcePool object from an OSGi bundle. You can post the data to an AEM Service (OSGi bundle) and then use the DataSourcePool to write the data to MySQL tables - see [0] and [1]
0 - Adobe Experience Manager Help | Posting Adobe Experience Manager Form Data to Custom Services
The second way gives you much more control.
Views
Replies
Sign in to like this content
Total Likes
Hello, I stumbled upon this when trying to solve the same issue. My configuration is pretty much the same as above, a parent table with a child table associated (mapped on ID elements) and when I submit data gets written to one and not the other. In your answer you recommend 2 methods that he could try. Does that mean that you can NOT submit parent / child data in the intended way by utilizing the OOB functionality with forms , associations, and data models?
I have been troubleshooting this for a bit and my error after submit is
Yet im looking at the submitted JSON and it looks fine
Currently testing to see if this is a viable option for a client by building a POC but I dont know how much custom development they are willing to do. Any help would be appreciated
Views
Replies
Sign in to like this content
Total Likes
They released more form content you can find here -- Scott's Digital Community: Getting Started with AEM Forms
Views
Replies
Sign in to like this content
Total Likes
Scott thanks so much for the quick response! I usually dont post until I have exhausted all of my other options by searching forums and other resources available to me (like the solution partner portal) Unfortunately I have not found anything that addresses this specific use case (including the additional links you've provided)
This seems like functionality that many would want to have with any data model that is more than one table ...Per my last comment here - Is this functionality supported OOB ?