Hi,
There does seem to be a bit of magic involved in the CTF and the documentation isn't all it could be. What it boils down to is essentially that code can only be generated for such entities as you find in Class diagrams.
The basic unit of code generation is the Class (and you may for instance find that a classless package behaves in a way you weren't expecting).
In the CTF Editor, if you click the "Add New Custom Template" button the drop-down "Template Type" lists the UML entities to which code generation templates may be associated. Activity and Region aren't in it.
Parameters, however, are OK - within methods within classes, that is. Activity Parameters, which I assume are what you're after, no can do.
In other words, EA can generate only code stubs, no actual method guts. So if you're trying to do what I think you're trying to do, get it to generate implementation code from Activity or State diagrams, then it can't be done.
... using the CTF.
A Model Transform would also be unable to hook into things like Activities, although a transform template is able to create such entities.
Leaves the Automation Interface, but I couldn't say how to go about it.
/Uffe