Error to write data to database at the step of Appian Automation Training: RPA Tutorial: Parse Excel Files issue

I am new Appian.  I am working the "RPA Tutorial: Parse Excel Files" version (23.2) to read data through RPA robot task, which works fine, but cannot figure out error at the step to Add Excel data to database in PM.. Your help is very appreciated!   

In Appian Community questions, there was similar question about working on the same training document, and the answer was written: missing one step in the tutorial : In the Appian RPA interface, for the Upload Excel File activity, you must enter "excelDocumentID" as the Target, in the Outputs section.  I don't understand this answer because the excelDocumentID column is set as primary key, auto-generate?  if this step is the missed step, how to do this step? 

The errors message I have had: 

An error occurred while evaluating expression: =pv!roboticTaskVariables.dataValues (Expression evaluation error: Cannot index null List of Map) (Data Inputs)  (* dot dataValues was added manually after pv!roboticTaskVariables) 

Without dot dataValues, got this error: 

An error occurred while trying to write to the entity "ExcelDatabusinessOpportunities" [id=58a9b60a-65cf-46e9-bdd7-612ad0ca8a9f@7890, type=DD_ExcelDataBusinessOpportunities (id=4670)] (data store: DD_Excel Data Tutorial DS). Details: java.lang.IllegalArgumentException: The list of records to be saved must not be null or empty: TypedValue[it=4671,v=<null>] Data: TypedValue[it=4671,v=<null>

thanks!

  Discussion posts and replies are publicly visible

  • The excelDocumentId should be returned to the robotic task once the excel document is uploaded with the 'Upload document' action.

    I was able to reproduce this error using a 'Write to Data Store Entity' with a null value for the second node input. Replacing the 'Write to Data Store Entity' with an 'Import Excel to Database' smart service prevented this error.

    Have you tried using the 'Import Excel to Database' smart service which is available with the 'Excel Tools' plugin? You should not need a 'Write to Data Store Entity'.

    You can pass the following value for the Excel Document:

    =todocument(pv!botVariables.excelDocumentID)

  • hi, Randall,  thank you so much!  I have tried to use the smart service: Import Excel to database service, but got error.  I could not find/locate a right documentation for how to configure this smart service to get idea reason.  In my PM, I cannot get .excelDocuemntID after pv! roboticTaskVariables when using the value what you mentioned =todocument(pv!botVariables.excelDocumentID).  also I am not sure what correct configuration should apply for the data source name and table name? 

    by reviewing the process detail, the process variable: roboticTaskVariables was stored all data from previous RPA node (see screenshot below),  

  • Try defining a robotic task integer variable for the excelDocumentId and then assign it as the target variable on the 'Upload Excel File' action.

  • As a follow-up, I believe the post you referenced was from last year and using different steps.

    My first 2 responses were for an earlier (22.3) 'Parse Excel Files Tutorial' that used the 'Import Excel to Database' smart service in the process model. This version did not use the 'Write to Data Store Entity'.

    The newer (23.2 and 23.3) 'RPA Tutorials' use the 'Write to Data Store Entity' (mentioned in the Tutorial) and do not use the 'Import Excel to Database' smart service in the process model. I was able to reproduce your error by not assigning the roboticTaskVariables on the Data 'Outputs' tab for the 'Execute Parse Excel Robotic Task' smart service in the process model. Try assigning the 'roboticTaskVariables' as a target mentioned in Step 11. Sorry for the confusion.




  • Hi, Randal,

    The roboticTaskVariables was configured on the Data 'Outputs' tab for the 'Execute Parse Excel Robotic Task' smart service in the process model.

    but  I can not pass the step "Write to Data Store Entity " got error. Very appreciated!

    May you please see anything I missed in this step?

  • Looks like you only have 1 node input. See steps 4-7 (printed page 18) of the tutorial.

  • Thank you, Randall.  Good catch!  The second node was there  but forgot to add after removed and re-added :Write to data Store entity" smart service.  The result with the second node got the error I posted before:

    An error occurred while evaluating expression: =pv!roboticTaskVariables.dataValues (Expression evaluation error: Cannot index null List of Map) (Data Inputs)  (* dot dataValues was added manually after pv!roboticTaskVariables) 

    Without dot dataValues, got this error: 

    An error occurred while trying to write to the entity "ExcelDatabusinessOpportunities" [id=58a9b60a-65cf-46e9-bdd7-612ad0ca8a9f@7890, type=DD_ExcelDataBusinessOpportunities (id=4670)] (data store: DD_Excel Data Tutorial DS). Details: java.lang.IllegalArgumentException: The list of records to be saved must not be null or empty: TypedValue[it=4671,v=<null>] Data: TypedValue[it=4671,v=<null>

    Any advice?  very appreciated!

  • Looks like your smart service dot dataValues does not match the robotic task dataValue parameter for your robotic task. Your earlier screenshot of the Process Details variables shows dataValue. Try changing the robotic task variable from dataValue to dataValues.

  • Yes, the issue was caused by the parameter specified in PM did not match what was defined in the robotic task. 

    thank you so much, Randall.