Develop > Business logic layer > Name-value pair command framework
Customize existing task commands
There are two standard ways to modify existing WebSphere Commerce task commands. You can add new business logic to a task command, or replace the business logic of an existing task command.
- Add new business logic to a task command
Suppose there is an existing WebSphere Commerce task command, called ExistingTaskCmd. Following the WebSphere Commerce naming conventions, this task command would have an interface class named ExistingTaskCmd and an implementation class named ExistingTaskCmdImpl. Now assume that a business requirement arises and add new business logic to this existing command. One portion of the logic must be executed before the existing command logic and another portion must be executed after the existing command logic.
- Replace business logic of an existing task command
To replace the business logic of an existing task command, create a new implementation class for the task command. This new implementation class must extend from the existing task command but it should not implement the existing interface. Additionally, in the new implementation class, do not call the performExecute method of the superclass.
Related concepts
Task command programming model