This is part of the template. Does the activity exist in the template or are you dynamically trying to add a new activity to a workflow template or running instance of a workflow for which it presently does not exist. This can be done, but it’s not the sort of thing most try to do everyday. It would be better to clarify your requirements to see if other alternatives exist such an invocation of a subprocess workflow template that is different conditionally.