Upgrade to Paloma 17.x Troubleshooting

The following areas can cause issues after an upgrade to Paloma 17.x. Read this section before you upgrade.

Condition Records

Condition Record Logic Runs Read-Only

From version 17.0, a Condition Record logic runs in a read-only context.

The logic stores only the condition records that it passes to conditionRecordHelper. Pricefx does not store any other change that the logic makes.

What happens to the other changes depends on the version:

  • 17.0 to 17.2.4: The call runs, and Pricefx then rolls back its changes. No error or warning appears.

  • From 17.2.5: Pricefx skips the call and writes an INFO message to the server log. Other read-only logics, for example Live Price Grid and Price List logics, work the same way.

Call in a Condition Record logic

17.0 to 17.2.4

From 17.2.5

api.add(), api.addOrUpdate(), api.update()

Pricefx discards the new or changed record.

Pricefx skips the call. The server log shows API call: update() can be called only from CFS or Calculation Flow., with the name of the call.

api.delete(), api.massDelete()

Pricefx discards the deletion.

Pricefx skips the call. The server log shows API call: delete() can be called only from CFS or Calculation Flow., with the name of the call.

api.recalculatePriceGridItem()

Pricefx discards the recalculated values.

Pricefx skips the call. The server log shows API call: recalculatePriceGridItem() can be called only from CFS or Calculation Flow.

api.customEvent()

Pricefx discards the event.

Pricefx skips the call. The server log shows Trying to send an event from invalid context.

api.enableAutoFlushMode()

No error.

The call throws the error Cannot switch to AutoFlush Mode when object modifications is not allowed.

This behavior is intentional. Pricefx can retry or recalculate a Condition Record item, and each run must give the same result.

Action Required

Before you upgrade, check your Condition Record logics for the calls in the table. From version 17.2.5, you can also search the server log of the Condition Record job for the messages in the table.

Move these writes and events to a step that runs after the Condition Record job:

  1. Enable the CONDITION_RECORD_CREATION_FINISHED event type for the partition.

  2. Create a follow-up step that this event triggers, in IntegrationManager or in a PlatformManager event workflow.

  3. Move the writes and the custom events from the Condition Record logic to the follow-up step.

Remove api.enableAutoFlushMode() from your Condition Record logics.

Pricefx sends the event when the Condition Record job finishes, after splicing. The event data contains the job ID, the ID of the source object and the IDs of the changed Condition Record Sets.

For a PlatformManager event workflow, see How to Create Event Workflow. For an integration with SAP S/4HANA that uses this event, see Event-driven Process (Condition Record).

Temporary 16.x Behavior

From version 17.2.3, Pricefx Support can switch one partition back to the 16.x behavior until its logics use the event. To request it, contact Pricefx Support.

With the 16.x behavior on:

  • The Condition Record logic creates, changes and deletes records, and creates custom events, as in 16.x. Pricefx does not skip the calls in the table.

  • The Condition Record job runs on one node. Pricefx does not distribute it.

  • A retried item can write its changes twice, as in 16.x.

The 16.x behavior is not available in version 18.0.

Condition Record Helper Saves Records After the Logic Runs

From version 17.0, conditionRecordHelper.addOrUpdate(), invalidate() and shortenValidTo() collect the record values. Pricefx creates the records after the logic has finished.

Behavior

16.x

17.x

When Pricefx saves the record

At the call

After the logic has finished

Return value of the call

The saved processing record, with its ID

The map that the logic passed, with the Condition Record Set ID added. The map has no record ID.

The logic changes the map after the call

No effect on the saved record

The record gets the last values of the map.

Two calls with identical values

Two records

One record

A value is not valid

The call throws an error. The logic can catch it.

The error occurs after the logic has finished. The logic cannot catch it.

The temporary 16.x behavior does not change how the helper saves records.

Action Required

Check your Condition Record logics for these patterns:

  1. Pass a new map for each record, for example conditionRecordHelper.addOrUpdate(new HashMap(record)).

  2. Do not use the return value as a saved record. Convert values in the logic before you use them, for example String.valueOf(itemId).

  3. Do not rely on catching an error from these calls. Validate the values in the logic before the call.

Model Tables

Model Table Load Can Change Columns That the Query Does Not Load

model.loadTable() can load a row with key values that already exist in the Model Table. The columns that the query does not load then get a null value or keep their values.

The result depends on the version and on where the logic calls model.loadTable(). No error or warning appears. Calculation results can change after the upgrade.

Where the logic calls model.loadTable()

Before 16.0

16.x

From 17.0

Model calculation logic, and the Init and Summary contexts of a parallel calculation

The columns get a null value.

The columns keep their values.

The columns get a null value.

Item context of a parallel calculation

The columns get a null value.

The columns keep their values.

The columns keep their values.

A call can have a different result after the upgrade only if all of these conditions are true:

  • The Model Table has key fields.

  • The query does not load all fields of the Model Table.

  • The query loads a row with key values that exist in the Model Table.

  • The call does not truncate the Model Table. The truncate parameter is false.

The calls that change depend on the version that you upgrade from:

  • From 16.x: Calls in the model calculation logic, and in the Init and Summary contexts of a parallel calculation.

  • From a version before 16.0: Calls in the Item context of a parallel calculation.

Action Required

Before you upgrade, check your Model Class logics for model.loadTable() calls that meet these conditions.

If you upgrade from 16.x, do one of these for each call in the model calculation logic, or in the Init or Summary context:

  • Load all fields. Add the missing fields to the query, for example with a join to the existing rows of the Model Table.

  • Keep the 16.x behavior. Build the query with QueryAPI, and call model.loadTable(table, query, false, true). The fourth parameter, updateRows, keeps the values of the columns that the query does not load. The call accepts only a QueryAPI query. If the logic uses an SQL query, load all fields.

If you upgrade from a version before 16.0, check each call in the Item context. If the logic needs a null value in a column, add the column to the query with a null value.