Multiple call integrations
-
- UpdatedAug 3, 2023
- 2 minutes to read
- Vancouver
- Vulnerability Response
Multiple call (or multiple page) integration scripts are a bit more complicated. They require multiple calls to a data source to retrieve data.
Like a single call integration, a multiple call integration must also have retrieveData() implemented. In the body of retrieveData(), the integration uses the hasMoreData() and setNextRunParameters() methods provided by VulnerabilityIntegrationBase.
The hasMoreData() method accepts a single Boolean that instructs the VulnerabilityIntegrationController to insert more processes to pull more data. When passing true to hasMoreData(), a call to setNextRunParameters() is made to provide context to the next process.
The setNextRunParameters() method accepts a single object that provides context information to be used by the next call to retrieveData(). This object is used to pass state to subsequent calls to retrieveData(). An example use case is to pass an object that indicates the current page number and page size to a web service.
For multiple call integrations, each retrieveData() call first checks the current process parameters. The _getProcessParameters() method is provided to all VulnerabilityIntegrationBase as a convenience to get the parameters set by the previous process. If there are no parameters, it would indicate that it is the first process.
