Created On: 28 October 2011
Problem:
The Notification Agent throws an error:
There are no templates for type "Change Request" and view "[viewname]" or all templates are disabled
This error occurs even though these have been defined for the view specified in the above error.
There are no templates for type "Change Request" and view "[viewname]" or all templates are disabled
This error occurs even though these have been defined for the view specified in the above error.
Resolution:
This is a known issue, and should be resolved in a future version of the Notification Agent / StarFlow Extensions. This can occur when using sub-folders / child views defined in StarFlow Extensions.
There must be a workflow defined in the immediate parent in the 'Projects' folders structure in Extensions for each View that is being used.
What should happen if a grand-child View does not have a workflow.xml file in the folder, is that it will traverse up the view tree in StarFlow Extensions folder tree until it finds a workflow.xml file. This is why it is not necessary to have multiple copies of the same files, if the same workflows are used in each view.
If there is a workflow.xml file in the 'Root' Project folder, any View sub-folder below will work. But if it is missing from the Root folder, the Notifcation Agent will only check one level up the tree.
For example, if there is no xml file in 'RootProject', but one in 'ChildView' then creating a Notification Agent watch on 'ChildView' will work, but watching 'GrandChild' will not. It should go up a level until it finds a valid xml file but it is bypassing this view and looking for an xml file in the "root" e.g. 'RootProject' but not finding any in 'ChildView' and therefore failing.

The workaround is to ensure ChangeRequest Workflow.xml (or whichever type of workflow) is copied (or shared) into each of the folders' parents, or checked-in to the Root 'Projects' folder in StarFlow Extensions project.
There must be a workflow defined in the immediate parent in the 'Projects' folders structure in Extensions for each View that is being used.
What should happen if a grand-child View does not have a workflow.xml file in the folder, is that it will traverse up the view tree in StarFlow Extensions folder tree until it finds a workflow.xml file. This is why it is not necessary to have multiple copies of the same files, if the same workflows are used in each view.
If there is a workflow.xml file in the 'Root' Project folder, any View sub-folder below will work. But if it is missing from the Root folder, the Notifcation Agent will only check one level up the tree.
For example, if there is no xml file in 'RootProject', but one in 'ChildView' then creating a Notification Agent watch on 'ChildView' will work, but watching 'GrandChild' will not. It should go up a level until it finds a valid xml file but it is bypassing this view and looking for an xml file in the "root" e.g. 'RootProject' but not finding any in 'ChildView' and therefore failing.

The workaround is to ensure ChangeRequest Workflow.xml (or whichever type of workflow) is copied (or shared) into each of the folders' parents, or checked-in to the Root 'Projects' folder in StarFlow Extensions project.
Incident #2521607