Connectorstatemap webservice

I’ve written an after-rule to store attribute values into the connectorStateMap so I can use them in the before-rule of the next operation. Could someone provide a sample of how to retrieve the information stored in connectorStateMap using a before-rule?
// Store the processed response into a map to return it
updatedMapInfo.put(“data”, processedResponseList); // This key might vary based on the endpoint’s expected structure

    // Store the 'Codes' in the connectorStateMap for later use
    Map connectorStateMap = new HashMap();
    connectorStateMap.put("storedCodes", storedCodes);  // Storing in connectorStateMap

    log.debug("Stored Codes for Later Use in connectorStateMap: " + storedCodes);

    return updatedMapInfo;  // Return the parsed response

Hi @pradeepireddy_123,

The values in connectorStateMap are updated within the application object. You can retrieve the information stored in connectorStateMap as shown below:

application.getAttributeValue(“storedCodes”);

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.