Hi All, I have a Expression Rule below which returns me a Data value

Hi All,

I have a Expression Rule below which returns me a Data value of DocumentMetaData CDT :

='type!{localhost:8080/.../}DocumentMetaData'(
documentId: fn!tointeger(ri!doc)
)

I need to create Data value from documentlist hence I have used apply function to achieve it shown in first image in script task node but it gives an error "Invalid Cast: Cannot cast from type 'List of Document' to type 'List of Data Store Entity', for variable 'pv!documentmetadatastore'".

I am not sure what is the problem here, please check each image for more details on use of script task and expression....

OriginalPostID-134728

OriginalPostID-134728

  Discussion posts and replies are publicly visible

Parents
  • Hi I have changed the variable data type to DocumenMetaData CDT though it was not working. Though it was one of the mistake I have made including other two items below.

    1. The object loadDocuments I was iterating was not having any value at all , which I have corrected.
    2. For the script task I was using the operator as "is stored as" which I have changed to "is appended to list" as shown in attached image and its working now.

    The 2nd one is bit strange for me that why the first operator "is stored as" was not working ?



Reply
  • Hi I have changed the variable data type to DocumenMetaData CDT though it was not working. Though it was one of the mistake I have made including other two items below.

    1. The object loadDocuments I was iterating was not having any value at all , which I have corrected.
    2. For the script task I was using the operator as "is stored as" which I have changed to "is appended to list" as shown in attached image and its working now.

    The 2nd one is bit strange for me that why the first operator "is stored as" was not working ?



Children
No Data