I would like to combine two design patterns in my software. I have first created a composite pattern, modeling my business problem.

Thus with this, I model the structure of my problem well, and an object tree will be created. I want to run some business logic on this (say execute function, which returns a number of elements). But this algorithm needs to be adjustable on high level. ie I want to be able to change the execute functions for all the classes shown in the picture.
I am looking for some usefull documentation and/or tips! Any ideas?