I have a Controller Command (FirstCmd) which is inturn calling a Task Command(SecondCmd). Now as per the WCS info center, all the task commands should extend the com.ibm.commerce.commands.TaskCommand and com.ibm.commerce.commands.TaskCommandImpl for the interface and the implementation resp. But in my case my SecondCmd is extending a Controller Command.
My question here is that can a Controller Command call another Controller command?.. if yes then how to handle access policies ? ..
regards
Dharmesh
1) Never call a controller command within a controller command, just
invoke task commands.
2) Each controller command is assigned its own policies for access
control (regardless of how it is invoked)
3) Each controller command should accept the URL parameter in the
request for redirection purposes (this URL can be another controller
command or a view command or another type of redirection)
4) You can assign access control policies on task commands (resource
level) but you rarely need to.
My recommendation is to pay attention to 3) since you are trying to run
two controller commands in the same request. Best to let the first
controller command return true and redirect to the second with URL as a
NVP argument.
R