Unable to refresh local variable that intialized by calling expression rule when referenced variable updated in interface

Hi Team,

I am facing one issue. In my application, in local variable section of Interface intializing local variable by calling expression rule and trying to refresh that variable based on refreshOnVarChange, also tried all available refresh options but nothing worked. Is there a limitation on refreshing variable for expression rules?

localVariables(

    local!record: a!refreshVariable(
    value: rule!ADMIN_DF_DH_getAllTestConfigs_Exp(
        bearerToken : ri!bearerToken,
        programId : ri!program.id,
        sourceId : ri!source.id,
        datasetId : ri!source.dataType,
        pageNo : local!pageNo +1,
        batchSize : local!batchSize
    ),
    refreshOnVarChange: local!testConfigResults,
    ),

    ........

    ........

    ........

)

ADMIN_DF_DH_getAllTestConfigs_Exp

a!localVariables(

    local!refreshRuleData: ri!refreshRuleData,
    local!integrationResults: rule!ADMIN_DF_DH_getAllTestConfigs_Integ(bearerToken : ri!bearerToken, programId : ri!programId, sourceId : ri!sourceId, datasetId : ri!datasetId),

    local!getTestConfig: if(
        local!integrationResults.result.statusCode = 200,
        index(local!integrationResults.result.body, "testDetails", {}),
        {}
    ),

    /*length function is not giving an actual count of the array, so wrapped it with data subset while finding actual length*/

    a!dataSubset(
        data: local!getTestConfig,
        totalCount: length(a!dataSubset(data: local!getTestConfig).data),
        identifiers: enumerate(length(a!dataSubset(data: local!getTestConfig).data))
    )

)

But when I eliminate expression by including all expression code in the interface itself then it is working it has an integration call for integration it is working, But when I wrap all this code in expression and use that in the interface then it is not refreshing values on all refresh options. But in the project, we are using this similar expressions couple of interfaces. Could you provide me any guidance on resolving this issue?  

localVariables(
    local!integrationResults: a!refreshVariable(
        value: rule!ADMIN_DF_DH_getAllTestConfigs_Integ(bearerToken : ri!bearerToken, programId : ri!program.id, sourceId : ri!source.id, datasetId : ri!source.dataType),
        refreshOnVarChange: {local!pageNo, local!testConfigResults}
    ),
    local!getTestConfig: if(
        local!integrationResults.result.statusCode = 200,
        index(local!integrationResults.result.body, "testDetails", {}),
       {}
    ),

    /*length function is not giving actual count of array, so wrapped it with datasubset while finding actual length*/

    local!record: a!dataSubset(
        data: local!getTestConfig,,
        totalCount: length(a!dataSubset(data: local!getTestConfig).data),
        identifiers: enumerate(length(a!dataSubset(data: local!getTestConfig).data))
    ),


    ........
    ........
    ........


)

Thank you,

Mahesh

  Discussion posts and replies are publicly visible