This project is read-only.

Conflicting Form Name between Rules and Workflow

Topics: General, Troubleshooting
Mar 7, 2013 at 5:36 PM
I do realize Workflow is still a work-in-progress, but I noticed it has a form called SelectContentTypes that serves in a similar function as the SelectContentTypes form in Rules. However, the Name value of the field is ContentTypes (camelcase) in the Workflow version whereas it is contenttypes (all lowercase) in the Rules version.

Because they have the same name, if both modules are active then creating a new rule in the Rules editor can cause the workflow version of the form to be shown. When the input is processed, it crashes because the handler looks for the key "contenttypes" which it can't find (only ContentTypes exists).

I was unsure whether to file as a bug since I am aware Workflow is still a work in progress. Either way I figured this information would help whoever is working on this.

Or, are Rules and Workflow never intended to be enabled simultaneously?

On a related note, the following code is what crashes:
            var contenttypes = context.Properties["contenttypes"];

            if (String.IsNullOrEmpty(contenttypes)) {
                return T("Any").Text;

            return contenttypes;
This code looks sort of like it's trying to catch the case when the key is not found in the dictionary, but context.Properties is a standard Dictionary<string, string>, and it crashes if the key is not found. Might be best to check with .ContainsKey().
Mar 7, 2013 at 6:11 PM
Now is a good time to file bugs, but yes, workflow is planned to replace the current rules.