Getting Error on Write to multiple store entities in Appian Process model

[The EntityData at index [2] has an entity field that does not have a value. Each EntityData passed to the smart service must have a valid value for the entity. No values have been written.]
   
This is an error I am getting when I am trying to save an array to the database, using Write to multiple store entities in the Process model.
Data which I am trying to save :
[[taskid=, annoucncementid=105, samaccid=7, istaskdone=Yes, customervisitdate=11/2/2020, customerpocname=ABC, documentid=401527, feedback=Testing for insertion in database, creationDate=11/6/2020, lastUpdateDate=11/6/2020, createdBy=Arshbir Sandhu, lastUpdatedBy=Arshbir Sandhu, comments=Row created at CCA task interface by user, customeracknowlegdedate=11/6/2020, proofofcommunication=Email],[taskid=, annoucncementid=105, samaccid=6, istaskdone=, customervisitdate=, customerpocname=, documentid=, feedback=, creationDate=11/6/2020, lastUpdateDate=11/6/2020, createdBy=Arshbir Sandhu, lastUpdatedBy=Arshbir Sandhu, comments=Row created at CCA task interface by user, customeracknowlegdedate=, proofofcommunication=]]

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to arshbirs0001

    Is there any reason why you use "writeToMULTIPLE Datae store entities"?

    Please check "write to data store entity.
    https://docs.appian.com/suite/help/20.3/Write_to_Data_Store_Entity_Smart_Service.html

    As the name suggest: one is to save multiple values in potential multiple data store entities (of the same data store).
    The other one is to save into one Data store.

    ___________________________________________________________________________
    if you want to use the Multiple node read the following:

    Requirements: you need an already created and maintained datastore with the suitable entity (CDT,Table).

    to explain it more detailed:
    currently you inserting just a process variable.

    The data store cannot understand random values. Every function in appian needs a specific structure. Data stores as well.
    A "write to data store entity" needs definied the entity aka location, where to save, and the data in a very specific structure.
    Please use the CDT structure you want to save. The  CDT used in the data store and CDT of the data you want to save have to match.

    check the article stefan linked. The structure for "value" has to look like this:

    1
    2
    3
    4
    5
    6
    7
    8
    
    ={
    {entity:pv!ENTITY_OPPORTUNITIES,
     data:{pv!RadiationOpp,pv!NewBusinessOpp}},
    {entity:pv!ENTITY_ACCOUNT,
     data:{pv!AcmeAccount}},
    {entity:pv!ENTITY_AE_NOTES,
     data:{pv!ListOfNotesFromAccountExec}}
    }

    Hints:
    1.) perhaps you create a constant for the entity first. Not necessary, but I would recommend it.
    so you have a smoother structure

    2.) perhaps you create a rule. you can insert the pure code into the "value" field, but its more "clean" with a rule.
    You insert your process data as rule inputs and you call the constant with the data store in it

    Solution without rule; written in the value field:

    {
        entity: cons!EXA_MY_ENTITY_CONSTANT,
        value: pv!my_process_variable_to_save
    }

    __________________________________________________________________
    Solution with rule:


    value:

    rule!EXA_myDataStoreRule(
        my_process_variable_as_rule_Input:  pv!my_process_variable_to_save
    )

    _______________

    Rule content:

    {
        entity: cons!EXA_MY_ENTITY_CONSTANT,
        value: ri!my_process_variable_as_rule_Input
    }

Children
No Data