pfx-api:delete
Delete records from Pricefx by filter criteria, by a single typedId, or by a list of typedId values. Supports asynchronous execution for long-running deletes.
Parameters
|
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
ObjectType (enum) |
-- |
The Pricefx object type to delete from (e.g., |
|
|
String |
-- |
Name of the filter bean used to select records for deletion. |
|
|
String |
-- |
The typedId of a single record to delete (e.g., |
|
|
String |
-- |
Comma-separated list of typedIds for batch deletion. |
|
|
Boolean |
false |
Run the delete operation asynchronously. The route will poll for completion. |
|
|
Integer |
30000 |
Timeout in milliseconds for async operations. |
|
|
Integer |
10000 |
Retry/poll interval in milliseconds for checking async job status. |
You must provide exactly one of filter, typedId, or typedIdList to identify which records to delete.
XML Route Examples
Delete by filter
Define a filter bean and reference it from the route:
<pfx:filter id="deleteFilter">
<pfx:and>
<pfx:criterion fieldName="attribute1" operator="equals" value="OBSOLETE"/>
</pfx:and>
</pfx:filter>
<route>
<from uri="direct:deleteByFilter"/>
<to uri="pfx-api:delete?objectType=P&filter=deleteFilter"/>
</route>
Delete by typedId (synchronous)
<route>
<from uri="direct:deleteById"/>
<to uri="pfx-api:delete?objectType=PL&typedId=123.PL"/>
</route>
Delete by typedId (asynchronous)
Use async mode for long-running deletes. The component will poll for completion using asyncRetry as the poll interval, up to asyncTimeout:
<route>
<from uri="direct:deleteByIdAsync"/>
<to uri="pfx-api:delete?objectType=PL&typedId=123.PL&async=true&asyncTimeout=60000&asyncRetry=5000"/>
</route>
Delete multiple records by typedIdList
<route>
<from uri="direct:deleteMultiple"/>
<to uri="pfx-api:delete?objectType=P&typedIdList=1.P,2.P,3.P"/>
</route>
Common Pitfalls
-
Missing target: You must specify one of
filter,typedId, ortypedIdList. If none are provided, the operation will fail. -
Async timeout too short: The default
asyncTimeoutis 30 seconds. For large deletes, increase this value or the operation may appear to fail even though it is still running on the server. -
Filter deletes all matching records: Double-check your filter criteria before running delete in production. There is no undo.
-
Object type mismatch: The
typedIdsuffix must match theobjectType(e.g.,123.PLwithobjectType=PL).