Hi everyone,
Could not display interface. Please check definition and inputs.
Interface Definition: Expression evaluation error: An error occurred while executing a smart service: An error occurred while trying to write to the data store [CR Data Store]. No values have been written. Details: could not insert: [CRModuleCommentsDT2354] (APNX-1-4208-004) This error will not be displayed to the user viewing this form.
I am getting this error in interface,as per the requirement made changes and in the existing implementation a!writeToMultipleDataStoreEntities used in UI.
Can anyone suggest me a solution for it?
Thanks in advance.
Discussion posts and replies are publicly visible
We can only make suggestion when you share some code snippets.
This is the component have added and below is the save and save draft button configuration. a!columnLayout( width: "NARROW", contents: { a!buttonArrayLayout( align: "END", buttons: { a!buttonWidget( label: cons!APN_TXT_SAVE_DRAFT, style: "NORMAL", value: cons!APN_TXT_SAVE, saveInto: { rule!CR_FN_storeModuleStatusHistory( moduleRecommendationStatus_cdt: ri!moduleRecommendationStatus_cdt, requestId_int: ri!requestId_int, cif_int: ri!cif_int, role_txt: ri!role_txt, originalExpiry_dt: ri!originalExpiry_dt, moduleStatus_txt: cons!CR_BP_FP_MODULE_STATUS[1], crModuleStatusHistory_cdt: ri!crModuleStatusHistory_cdt, moduleId_int: ri!moduleId_int, workflowId_int: ri!workflowId_int, buttonAction_txt: cons!APN_TXT_SAVE_DRAFT ), a!save( ri!CustomerAddress_cdt, rule!CR_FN_BP_getUpdateAuditTrailsByCDT( crInput_cdt: ri!CustomerAddress_cdt ) ), a!save( ri!RelatedPartyDetails_cdt, rule!CR_FN_BP_getUpdateAuditTrailsByCDT( crInput_cdt: ri!RelatedPartyDetails_cdt ) ), a!save( ri!ownershipDetails_cdt, rule!CR_FN_BP_getUpdateAuditTrailsByCDT( crInput_cdt: ri!ownershipDetails_cdt ) ), a!writeToMultipleDataStoreEntities( valuesToStore: { a!entityData( entity: cons!CR_ENTITY_MODULE_COMMENTS, data: ri!crModuleComments_cdt ), a!entityData( entity: cons!CR_ENTITY_BP_CUSTOMER_ADDRESS, data: ri!CustomerAddress_cdt ), a!entityData( entity: cons!CR_ENTITY_BP_RELATEDPARTY, data: ri!RelatedPartyDetails_cdt ), a!entityData( entity: cons!CR_ENTITY_BP_OWNERSHIP_DETAILS, data: ri!ownershipDetails_cdt ), a!entityData( entity: cons!CR_ENTITY_MODULE_STATUS_HISTORY, data: ri!crModuleStatusHistory_cdt ) }, onSuccess: { a!save( ri!moduleRecommendationStatus_cdt, rule!CR_FN_getModuleStatusHistoryByStatus( crModuleStatusHistory_cdt: ri!crModuleStatusHistory_cdt ) ), a!save( ri!crModuleComments_cdt, index( fv!storedValues, 1, "data", {} ) ), a!save( ri!CustomerAddress_cdt, index( fv!storedValues, 2, "data", {} ) ), a!save( ri!RelatedPartyDetails_cdt, index( fv!storedValues, 3, "data", {} ) ), a!save( ri!ownershipDetails_cdt, index( fv!storedValues, 4, "data", {} ) ), a!save( ri!crModuleStatusHistory_cdt, index( fv!storedValues, 5, "data", {} ) ), a!save( local!GroupStructureAndRelatedPartiesComments_cdt, rule!CR_FN_getModuleComments( crModuleComments: ri!crModuleComments_cdt, commentId_int: cons!CR_BP_COMMENT_IDS[2] ) ), a!save( local!businessOwnershipDetailsComments_cdt, { /*rule!CR_FN_getModuleComments(*/ /*crModuleComments: ri!crModuleComments_cdt,*/ /*commentId_int: cons!CR_BP_COMMENT_IDS[31]*/ /*),*/ rule!CR_FN_getModuleComments( crModuleComments: ri!crModuleComments_cdt, commentId_int: cons!CR_BP_COMMENT_IDS[32] ) } ), a!save( local!businessOwnershipDetailsComments_cdt, { rule!CR_FN_getModuleComments( crModuleComments: ri!crModuleComments_cdt, commentId_int: cons!CR_BP_COMMENT_IDS[31] ), } ), a!save( ri!save_dt, now() ) } ) }, validate: false() ), a!buttonWidget( label: cons!APN_TXT_SAVE, style: "NORMAL", value: cons!APN_TXT_SAVE, saveInto: { rule!CR_FN_storeModuleStatusHistory( moduleRecommendationStatus_cdt: ri!moduleRecommendationStatus_cdt, requestId_int: ri!requestId_int, cif_int: ri!cif_int, role_txt: ri!role_txt, originalExpiry_dt: ri!originalExpiry_dt, moduleStatus_txt: cons!CR_BP_FP_MODULE_STATUS[1], crModuleStatusHistory_cdt: ri!crModuleStatusHistory_cdt, moduleId_int: ri!moduleId_int, workflowId_int: ri!workflowId_int, buttonAction_txt: cons!APN_TXT_SAVE ), a!save( ri!CustomerAddress_cdt, rule!CR_FN_BP_getUpdateAuditTrailsByCDT( crInput_cdt: ri!CustomerAddress_cdt ) ), a!save( ri!RelatedPartyDetails_cdt, rule!CR_FN_BP_getUpdateAuditTrailsByCDT( crInput_cdt: ri!RelatedPartyDetails_cdt ) ), a!save( ri!ownershipDetails_cdt, rule!CR_FN_BP_getUpdateAuditTrailsByCDT( crInput_cdt: ri!ownershipDetails_cdt ) ), a!writeToMultipleDataStoreEntities( valuesToStore: { a!entityData( entity: cons!CR_ENTITY_MODULE_COMMENTS, data: ri!crModuleComments_cdt ), a!entityData( entity: cons!CR_ENTITY_BP_CUSTOMER_ADDRESS, data: ri!CustomerAddress_cdt ), a!entityData( entity: cons!CR_ENTITY_BP_RELATEDPARTY, data: ri!RelatedPartyDetails_cdt ), a!entityData( entity: cons!CR_ENTITY_BP_OWNERSHIP_DETAILS, data: ri!ownershipDetails_cdt ), a!entityData( entity: cons!CR_ENTITY_MODULE_STATUS_HISTORY, data: ri!crModuleStatusHistory_cdt ) }, onSuccess: { a!save( ri!moduleRecommendationStatus_cdt, rule!CR_FN_getModuleStatusHistoryByStatus( crModuleStatusHistory_cdt: ri!crModuleStatusHistory_cdt ) ), a!save( ri!crModuleComments_cdt, index( fv!storedValues, 1, "data", {} ) ), a!save( ri!CustomerAddress_cdt, index( fv!storedValues, 2, "data", {} ) ), a!save( ri!RelatedPartyDetails_cdt, index( fv!storedValues, 3, "data", {} ) ), a!save( ri!ownershipDetails_cdt, index( fv!storedValues, 4, "data", {} ) ), a!save( ri!crModuleStatusHistory_cdt, index( fv!storedValues, 5, "data", {} ) ), a!save( local!GroupStructureAndRelatedPartiesComments_cdt, rule!CR_FN_getModuleComments( crModuleComments: ri!crModuleComments_cdt, commentId_int: cons!CR_BP_COMMENT_IDS[2] ) ), a!save( local!businessOwnershipDetailsComments_cdt, { /*rule!CR_FN_getModuleComments(*/ /*crModuleComments: ri!crModuleComments_cdt,*/ /*commentId_int: cons!CR_BP_COMMENT_IDS[31]*/ /*),*/ rule!CR_FN_getModuleComments( crModuleComments: ri!crModuleComments_cdt, commentId_int: cons!CR_BP_COMMENT_IDS[32] ) } ), a!save( local!businessOwnershipDetailsComments_cdt, { /*rule!CR_FN_getModuleComments(*/ /*crModuleComments: ri!crModuleComments_cdt,*/ /*commentId_int: cons!CR_BP_COMMENT_IDS[31]*/ /*),*/ rule!CR_FN_getModuleComments( crModuleComments: ri!crModuleComments_cdt, commentId_int: cons!CR_BP_COMMENT_IDS[31] ) } ), a!save( ri!save_dt, now() ) } ) }, validate: true ) } ) } )
Not to seem too nit-picky, but code is unreadable like this, especially when it's this long. Please consider editing your original comment and re-pasting the code into a code box - re-copy it from the original source so your paste gets properly indented. Edit your existing comment instead of posting a new one, because one of the issues with the above paste is it makes the entire thread harder to scroll through.
My only suggestions for finding your error, are along the lines of:
Did you check the tomcat-stdout logfile for any details?
Seems like the data in this rule input crModuleComments_cdt got somehow mixed up. Did you check its value?
in rule input, values are present.
Did you find any details in the tomcat log?
From my perspective, it could be that the field types in the CDT might not match the DB.
in order to access tomcat log-these are the steps that has to be followed right? but I don't find system logs and cloud database in navigation.
If you are using Appian Cloud environment you will see System Logs in Navigation menu and the reason you cannot see Cloud database in navigation menu is that you are not having even viewer rights of the database as you are not added in Database Users group.
I would suggest to check if you are writing duplicate values to the columns configured to be unique and if there is any mismatch in the datatypes in DB and CDT. For that you will need DB access to view the schema or you can request someone who already has and ask for help.
edit: Also check if you have atleast viewer rights of the data store.