Pipeline Management
The Pipeline Component contains fields that determine and control the overall management of the application.
To access the Pipeline File:
- Navigate to the Explorer tab in Plateau Studio and click the + button on the right side of the UI Settings module.
- Select Pipeline File from the menu that opens.
Events
Pipeline Component should contain the following events:
event | usage | params |
---|---|---|
onBeforeRequest | manipulates before request. You can add/delete/update request data/headers .vs all request member. | requestObject: IRequest |
onAfterResponse | manipulates the successful response You can add/delete/update response data/headers .vs all response member. | response: INetworkResponse |
onAfterErrorResponse | manipulates the failed response You can add/delete/update response data/headers .vs all failed response member. | response: INetworkResponse |
onPostRender | This event is triggered after each page render in the application. | |
logHandler | Controls the logs (see the Client Side Log Handling document | messages: IMessage |
onNetworkStatusChange | Listens for changes in network status. Gets the online/offline status of the network.(see the Permanent Data Stroage) | isNetworkConnected: boolean |
To interact with REST Services in UI Editor, you can see Calling REST Service
How to use Events?
The Pipeline Events are designed to address specific needs, such as running tasks before every service request or after every service response. Typically, these needs are common across all service calls, and these events can be defined within the Pipeline.
- You should edit or add PageComponent's events according to your needs in Pipeline.
- Extarnal Visible option must be checked.
onBeforeRequest
- Set data to Bag Store before send request in your page.
- Get the stored data in your Pipeline component and manipulate the request.
onAfterResponse
onAfterErrorResponse
onPostRender
logHandler
onNetworkStatusChange