Invalid index: Cannot index property 'result' of type Text into type HttpResponse

I am using trying to pass httpResponse.result in one of the expression rule .. in script task 

rule!OIT_getTransactionDetails(

httpResponse:ri!httpResponse.result,

activeStatus:ri!status

)

But it returns Error like Invalid index: Cannot index property 'result' of type Text into type HttpResponse.

I know its casting issue , tried with index function also but it returns null then .. not the  values which  i want to retrieve

  Discussion posts and replies are publicly visible