Adding a new custom service to the 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: Create, Update, and Delete.
Before you begin
- Created a new WebSphere Commerce table in the schema.
- Generated object relational metadata and the physical SDO.
- Configured the Business Object Manager to include new properties in user data.
- Updated query templates for read and update.
- Created a Struts action that maps the processing action to a component service.
Procedure
- Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
- Complete one of the following steps:
- In the Enterprise Explorer view, expand lzx/commerce/foundation/restricted/CustomService.lzx/wcfCustomService. , where Management_Center_component is the name of the tool you want to customize. Custom services are declared as child nodes of primary object definitions using
- In the Enterprise Explorer view, expand , where Management_Center_component is the name of the tool you want to customize. Custom services are declared by adding CustomService elements as child elements of primary object definitions.
- Identify the file that contains the object definition that
you want to add the custom service to. Open the file and locate:
- the object definition class
- the object definition
- Update the object definition with the custom service. The
following examples demonstrate:
Option Description The instantiation of a custom service that activates a promotion The custom service declaration includes an enablement condition that ensures that the action is only available when the promotion is inactive. <wcfCustomService url="/cmc/ActivatePromotion" toolbarIcon="activateToolbarIcon" displayName="${promotionResources.promotionList_activate_displayName.string}"> <wcfEnablementCondition conditionId="activate" propertyName="status" enablementValue="Inactive" /> <wcfServiceParam name="promotionId" propertyName="promotionId"/> </wcfCustomService>
The declaration of a custom service that activates a promotion The custom service declaration includes an enablement condition that ensures that the action is only available when the promotion is inactive. <CustomService url="/cmc/ActivatePromotion" toolbarIcon="activateToolbarIcon" displayName="${promotionResources.promotionList_activate_displayName}"> <EnablementCondition conditionId="activate" propertyName="status" enablementValue="Inactive" /> <ServiceParam name="promotionId" propertyName="promotionId"/> </CustomService>
What to do next
Version | Steps |
---|---|
|
|
|