Getting cast exception when I use start process function in link inside interface

Getting cast invalid exception when  I use startprocesslink inside interface.

Report ->Scenarios is  to get the data from DB based on few search filters on click of search button  and display the data  in GRID and also provide a link to download the same data to excel.

I am generating report (excel) inside that process and calling this process on click

PRTRR_VW_PipelinePlanning?list to Dictionary. Details: CastInvalid

Interface Definition: Expression evaluation error at function a!startProcessLink [line 82]: Could not cast from PRTRR_VW_PipelinePlanning?list to Dictionary. Details: CastInvalidCould not cast from

Attached the sample code

= load(
  local!pagingInfo: a!pagingInfo(
    1,
    cons!PRTRR_BATCH_SIZE_DEFAULT
    /*a!sortInfo(*/
      /*field: "PipelineKey",*/
      /*ascending: "false"*/
    /*)*/
  ),
  local!licenseNumber_txt,
  local!lineNumber_txt,
  local!fromLocation_txt,
  local!toLocation_txt,
  local!AMUList_txt,
  local!buList_txt,
  local!operatingDistrictList_txt,
  local!gatheringSystem_txt,
  local!plannedYearOfAbandonmentList_int,
  local!plannedQuarterOfAbandonmentList_txt,
  local!statusList_txt,
  local!subdecision_txt,
  local!decisionList_txt,
  local!concernList_txt,
  local!decisionUserList_txt,
  local!batchSize_int,
  local!licenseNumberValue_txt,
  local!lineNumberValue_txt,
  local!fromLocationValue_txt,
  local!toLocationValue_txt,
  local!AMUListValue_txt,
  local!buListValue_txt,
  local!operatingDistrictListValue_txt,
  local!gatheringSystemValue_txt,
  local!plannedYearOfAbandonmentListValue_int,
  local!plannedQuarterOfAbandonmentListValue_txt,
  local!statusListValue_txt,
  local!subdecisionValue_txt,
  local!decisionListValue_txt,
  local!concernListValue_txt,
  local!decisionUserListValue_txt,
  local!batchSizeValue_int,
  local!showFilters: true,
  local!GLOB_GISAMUList: rule!GLOB_getActiveGISAMUList(),
  local!GLOB_GISBusinessUnitList: rule!GLOB_getActiveGISBusinessUnitList(),
  local!GLOB_GISOperatingDistrictList: rule!GLOB_getActiveGISOperatingDistrictList(),
  local!PRTRR_PipelineDataSubset,
  with(
    local!PRTRR_PipelineDataSubset: rule!PRTRR_getVWPipelinePlanningListBySearchCriteria(
      pagingInfo: local!pagingInfo,
      licenseNumber_txt: local!licenseNumberValue_txt,
      lineNumber_txt: local!lineNumberValue_txt,
      deleted_bool: false,
      OperatingDistrictList_txt: local!operatingDistrictListValue_txt,
      BusinessUnitList_txt: local!buListValue_txt,
      AMUList_txt: local!AMUListValue_txt,
      gatheringSystem_txt: local!gatheringSystemValue_txt,
      concernList_txt: local!concernListValue_txt,
      plannedYearOfAbandonmentList_int: local!plannedYearOfAbandonmentListValue_int,
      plannedQuarterOfAbandonmentList_txt: local!plannedQuarterOfAbandonmentListValue_txt,
      decisionList_txt: if(
        rule!APN_isBlank(local!decisionListValue_txt),
        {
          cons!PRTRR_DECISION_RETAIN,
          cons!PRTRR_DECISION_RETIRE
        },
        local!decisionListValue_txt
      ),
      subdecision_txt: local!subdecisionValue_txt,
      decisionUserList_txt: local!decisionUserListValue_txt,
      statusList_txt: local!statusListValue_txt,
      fromLocation_txt: local!fromLocationValue_txt,
      toLocation_txt: local!toLocationValue_txt
      )
      ,          
     a!sectionLayout_17r1(
          label: "Search Results",
          firstColumnContents: {
          
                      a!linkField(
                        labelPosition: "COLLAPSED",
                        links: {
    a!startProcessLink(
      label: "Export Results to Excel",
      processModel: cons!PRTRR_PIPELINE_PROGRESS_CHECK_PROCESS,
      processParameters: {
       cast('type!{urn:com:husky:types:appian:PRTRR}PRTRR_VW_PipelinePlanning',local!PRTRR_PipelineDataSubset)
      
      }
    )
  }
)
}  
  )

    )
)

  Discussion posts and replies are publicly visible

Parents
  • Hi Soujanya,

    There are two observations here - 

    1) If the return type of the Expression Rule PRTRR_getVWPipelinePlanningListBySearchCriteria is Datasubset, inside the cast function pass the value as .data as follows - 

     cast('type!{urn:com:husky:types:appian:PRTRR}PRTRR_VW_PipelinePlanning',local!PRTRR_PipelineDataSubset.data)

    2) The other observation is if you wants to cast  the multiple values then mention the type as list as follows - 

     cast('type!{urn:com:husky:types:appian:PRTRR}PRTRR_VW_PipelinePlanning?list',local!PRTRR_PipelineDataSubset.data)

    Hope this helps,

    Thanks,

    Anju

Reply
  • Hi Soujanya,

    There are two observations here - 

    1) If the return type of the Expression Rule PRTRR_getVWPipelinePlanningListBySearchCriteria is Datasubset, inside the cast function pass the value as .data as follows - 

     cast('type!{urn:com:husky:types:appian:PRTRR}PRTRR_VW_PipelinePlanning',local!PRTRR_PipelineDataSubset.data)

    2) The other observation is if you wants to cast  the multiple values then mention the type as list as follows - 

     cast('type!{urn:com:husky:types:appian:PRTRR}PRTRR_VW_PipelinePlanning?list',local!PRTRR_PipelineDataSubset.data)

    Hope this helps,

    Thanks,

    Anju

Children
No Data