pfx-api:massedit
With this method, the whole response from the API is returned. You can change the target of the response in outputTarget
(body, header, property) and outputtargetName
(name for header, property).
Properties
Option | Type | Default | Description |
---|---|---|---|
| string | Â | Defines output target for data in the exchange. It can be stored in the header, property or body. |
| string | Â | Defines output target name for the target type header and property. Put here the name of exchange header and name of exchange property. |
| string | Â | Defines fields for mass edit, separated by a semicolon. |
| string | Â | Name of the Data Source. |
| string | Â | Defines the object type, e.g. DM, DMDS, Q, LTV, P, PX. |
| string | Â | Defines mapper name which is a Spring bean or a definition in the header or property. |
| string | Â | Contains strings separated by a comma that specify one or more fields to be returned. If omitted, all fields are returned. The server fetches only these valueFields from the database, so it generally gives a better performance. The result object is then sent as a list of fields instead of a Map. Compare with |
| string | Â | Contains strings separated by a comma that specify one or more fields to be returned. If omitted, all fields are returned. But the server still fetches all the fields from the database. The result object is sent as a Map. Compare with |
| string |  | Optional parameter. Can be used instead of a regular table filter. Accepts an SQL-like syntax to define a filter logic. Example: The From clause has to be omitted – it has no meaning in filter API. |
| string | Â | Defines connection to Pricefx. This is an optional parameter and if it is not mentioned, the connection is taken from the Spring bean named pricefx. |
| string | Â | Â |
| integer | Â | Â |
| string | Â | Defines mapper name which is a Spring bean or a definition in the header or property. |
| string | Â | Defines the sorting. It overrides |
| sting | Â | Sort by. It overrides |
| string | Â | Defines a custom filter expression. It allows for more advanced filtering, for example |
Examples
Defining Fields
Fields are defined by the parameter massEditFields
of pfx-api:massedit
. The format is following: fields are separated by ,
and pairs name/value are separated by ;
.
Example:
<to uri="pfx-api:massedit?massEditFields=attribute40;Y&mapper=carsMapper&filter=pxCarsFilter&objectType=CX"/>
to define a field attribute40
with a value Y
<to uri="pfx-api:massedit?massEditFields=attribute40;Y,attribute41;N&mapper=carsMapper&filter=pxCarsFilter&objectType=CX"/>
to define fields attribute40
with a value Y
and attribute41
with a value N
Datamart massedit Example
<route>
<from uri="direct:create5"/>
<toD uri="pfx-api:massedit?datasourceName=Accruals&massEditFields=DateSent;${headers.exportDate}&filter=fetchAccrualsUpdateFilter&objectType=DM"/>
</route>
You can either set directly the parameter typedId
, or you can set datasourceName
. If you pick the latter, there will be one more call to the partition to get typedId
from datasourceName
. Otherwise, the mass edit functionality is the same.
Standard massedit Example
<loadMapper id="carsMapper" includeUnmappedProperties="false">
<simple in="sku" out="13"/>
<simple in="manufacturer" out="bmw"/>
</loadMapper>
<filter id="pxCarsFilter">
<and>
<criterion fieldName="name" operator="equals" value="Cars"/>
</and>
</filter>
<routes xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:create"/>
<to uri="pfx-api:massedit?mapper=carsMapper&filter=pxCarsFilter&objectType=CX"/>
<to uri="mock:res"/>
</route>
</routes>
Â
IntegrationManager version 5.8.0