Adding a custom service to Management Center
You can define a custom service and associate it with a Management Center business object definition. Use a custom service to perform a processing action on a business object. For example, to activate a promotion. Do not use a custom service to perform the basic business operations, such as to create, update, and delete objects.
Before you begin
Procedure
- Open HCL Commerce Developer and switch to the Enterprise Explorer view.
- Expand , where component is the name of the Management Center component.
- Open the primary object definition file for the business object that you want to associate with your custom service.
-
Define the use of the custom service for business object by adding
CustomServiceelements as child elements of the primary object definition.For example, the following code snippet demonstrates the definition of a custom service that activates a promotion.<CustomService url="/cmc/ActivatePromotion" toolbarIcon="activateToolbarIcon" displayName="${promotionResources.promotionList_activate_displayName}"> <EnablementCondition conditionId="activate" propertyName="status" enablementValue="Inactive" /> <ServiceParam name="promotionId" propertyName="promotionId"/> </CustomService> - Save and publish your changes.