About operations
Last updated
Last updated
In Patchworks, an operation is counted whenever a request is made to send or receive a payload to/from an endpoint.
Crucially, we're not concerned with the number of items in the payload - we simply count the number of times a process flow requests to send or receive a payload. This might happen in several ways:
Mechanism | Summary |
---|---|
The number of payloads that a process flow sends or receives correlates to the number of operations logged. In the most straightforward case, you might create a process flow that always receives a single, unpaginated payload from one system and then sends a single, unpaginated payload to another system - this would be an operations count of 2.
However, as the complexity of process flows increases, so does the possibility that the number of payloads can increase during a process flow run. The most likely ways that this can happen are:
Paginated data. If you receive paginated data, you receive 1 payload for each page of data - so each page represents 1 receive operation. In short, an initial data pull can result in multiple receive operations. And if you receive multiple pages, it follows that multiple pages continue through the flow - which means (potentially) multiple pages will be sent into your destination system, resulting in multiple send operations.
Flow control. The flow control shape is typically used to batch an incoming payload into multiple, smaller payloads for onward processing. So, even if you start by receiving 1 payload, it's likely that you will be sending multiple payloads at the end of the flow.
The examples below show the impact that these scenarios can have on operation counts:
Connector shape
A request is made (successfully or otherwise) to receive data from a specified endpoint.
Connector shape
A request is made (successfully or otherwise) to send data to a specified endpoint.
Webhook trigger
A webhook
is received (with or without a payload) in the first step of the process flow.
Event trigger
An event
is received (with or without a payload) in the first step of the process flow.
Patchworks API call
A Patchworks API call
is received (with or without a payload) in the first step of the process flow.
In the simplest of flows you might receive 1 payload from a source endpoint which contains 350 records in a single, unpaginated payload. The flow goes on to send that payload to a destination endpoint.
This results in 2 operations - 1 for the receive operation and 1 for the send operation.
In a slightly more complex flow you might receive 1 payload from a source endpoint which contains 350 records in a single, unpaginated payload.
This results in 6 operations - one for the receive operation and 5 for the send operations.
In this example our incoming data is paginated as 50 records per page, so we receive 350 records as 7 payloads (50 records in each).
The flow goes on to send all of these payloads to a destination endpoint.
This results 14 operations - 7 for receive operations and 7 for send operations.
In this example our incoming data is paginated as 50 records per page, so we receive 350 records as 7 payloads (50 records in each).
This results 357 operations - 7 for receive operations and 350 for send operations.
The flow continues with a shape which batches this data into smaller chunks, resulting in 5 payloads, each containing 70 records. The flow goes on to send all of these payloads to a destination endpoint.
The flow continues with a shape which batches this data into single-item payloads. The flow goes on to send all of these payloads to a destination endpoint.