Trying to configure a Delete from Data Store Entities smart service

Hi all,

Has anyone used the Delete from Data Store Entities smart service and can point me what I am missing in my configuration?

I have a process variable - pv!requestData.  The datatype is a CDT that maps to a database table.  In my process, I am trying to pass pv!requestData to the Delete from Data Store Entities smart service to delete that specific row.

In my Delete from Data Store Entities smart service setup, the topmost node says - Data to Delete * (EntityDataIdentifiers) I am assuming this should be my primary key? So for this parameter, I entered  pv!requestData.id. This is because I am thinking  id is the identifier of the row to be deleted.

However, in the node where I am to define my Data Source, when I select the requestData data type, it gets automatically removed from the Entity Value in the dialogue box as soon as I move away from that parameter in the dialogue box.

I have looked at the documentation for Delete from Data Store Entities smart service but no step by step instructions are offered.

Thank you.

  Discussion posts and replies are publicly visible

Parents
  • Hello Nanfak,

    For this particular node in the expression you can set it as
    ={entity:--Entity, identifiers: pv!requestData.id }

    Just replace --Entity for your constant. Let me know if this is what you're looking for.
  • 0
    A Score Level 1
    in reply to Jose Cavazos
    Thanks for your advise.

    However, used the following code:
    ={entity: CSHV_Cash_Advance_Data, identifiers: pv!cash_advance_data.id }

    And when I publish, I get this publishing error: There was an error in an expression in Delete from Data Store Entities at DataToDelete: Neither variables(s) nor rule(s) found

    I then tried using the following code:
    ={entity: pv!cash_advance_data, identifiers: pv!cash_advance_data.id }

    And the process model publishes, but when I test and control reaching the delete smart service, it raises the following error: Invalid Cast: Cannot cast from type 'CSHV_Cash_Advance_Data' to type 'Data Store Entity' (Data Inputs)

    This is strange because I am suing the same CSHV_Cash_Advance_Data Data Store Entity in a Write to Data Store Entity in the same process model and it is working fine.
  • 0
    A Score Level 1
    in reply to nanfak
    Hi Nanfak,

    Make sure you use the constant so try it out with cons!CSHV_Cash_Advance_Data if that is your constant pointing to the Data Store Entity if you don't have a constant created for that particular Data store entity create one.

    This should be able to solve your issue.
Reply Children
No Data