This is an Attribute that can be used before any method, to add Integration Layer Sync logic.

It requires an OneCore.Core.Interfaces.IntegrationLayer.ODILEntityAction parameter to be provided to work. Depending on the action it executes different logic.

Default

The default logic, saves the provided OneCore.Core.Interfaces.IntegrationLayer.ODILEntityAction to OneDealerContext.

It uses  OneDealer.Common.BusinessLayer.MappingSystem.ThinkRIT.Managers.IntegrationLayerDmsSyncManager.SetContextSyncActionByEnum() to set the string value of the enum.

Use OneDealer.Common.BusinessLayer.MappingSystem.ThinkRIT.Managers.IntegrationLayerDmsSyncManager.GetContextSyncAction() anywhere in the code to fetch the stored ODILEntityAction.

Introduced in 3.4 (released), available in 3.0.17 too.

BusinessPartnerCreate

This is a specific logic for OneCore.Core.Interfaces.IntegrationLayer.ODILEntityAction.BusinessPartnerCreate. The purpose of this action is to provide a mechanism, to "lock" the Business Partner of the method is called for.

Instead of just saving the action to OneDealerContext as is, it appends the Business Partner CardCode by using SetContextSyncActionByName() instead of SetContextSyncActionByEnum()

Important

The logic assumes that the first parameter, the method the attribute is used for, is of type BusinessPartner and required. If not, the attribute will fail to store the key in OneDealerContext.

This enables the storage of multiple instances for the same action and thus it works in parallel.

When the instance identifier is stored in OneDealerContext, the developer can use CheckContextSyncActionByName() of OneDealer.Common.BusinessLayer.MappingSystem.ThinkRIT.Managers.IntegrationLayerDmsSyncManager to see if the instance exists in the context, or  DeleteContextSyncActionByName() to remove it from the context

Keep in mind

If you do not remove the instance from the context, it will remain until a restard of the application. In case you use this for "locking" Business Partners, you need to ensure, that eventually you remove the instance from the context, or else the BP will be forever locked

Introduced in 3.10 (released), available in 3.8.73.6.13, 3.4.19 too.

Related Links

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.