Bug: Workflow with a setting crashes in "When the form has been Opened" state
Hi
We are trying to create a workflow which can mark all checkboxes on a checkboxlist in the workflow state "When the form has been Opened".
You can not use a workflow with a setting on "When the form has been Opened" state.
This is the simple test workflow:
namespace Upac.CampaignMonitor.ContourExtensions { using System; using System.Collections.Generic; using Umbraco.Forms.Core; using Umbraco.Forms.Core.Enums;
public class CheckCheckBoxListWorkflow : WorkflowType { #region Constructors
public CheckCheckBoxListWorkflow() { Name = "Check all checkboxes on a checkboxlist"; Description = "This workflow will check all checkboxes in a checkboxlist fieldtype."; Id = new Guid("1387A641-3143-4dbd-8DEB-CB0430164E01"); }
#endregion Constructors
#region Properties
[Umbraco.Forms.Core.Attributes.Setting("Test", description = "This is a test", control = "Umbraco.Forms.Core.FieldSetting.TextField")] public string Checkboxlist { get; set; }
public override List<Exception> ValidateSettings() { return new List<Exception>(); }
#endregion Methods } }
When the workflow is attached it will only render previous/next buttons and not the UI of the form. And there is no wizard step in the form. There is no warning or error in the log.
If you preview the form you will get an exception
[NullReferenceException: Object reference not set to an instance of an object.]
Umbraco.Forms.Data.StringHelper.parseRecordPlaceholders(String value, Record record) in d:\TeamCity\buildAgent\work\e4473b9ec9597356\Umbraco.Forms.Core\Data\StringHelper.cs:110
Umbraco.Forms.Data.StringHelper.ParsePlaceHolders(HttpContext Context, Record record, String value) in d:\TeamCity\buildAgent\work\e4473b9ec9597356\Umbraco.Forms.Core\Data\StringHelper.cs:148
Umbraco.Forms.Core.Services.WorkflowService.ExecuteWorkflows(List`1 workflows, RecordEventArgs e) in d:\TeamCity\buildAgent\work\e4473b9ec9597356\Umbraco.Forms.Core\Services\WorkflowService\WorkflowService.cs:136
Umbraco.Forms.Core.Services.WorkflowServiceApplication.FormService_FormEvent(Object sender, RecordEventArgs e) in d:\TeamCity\buildAgent\work\e4473b9ec9597356\Umbraco.Forms.Core\Services\WorkflowService\WorkflowService.cs:71
Umbraco.Forms.Core.Services.RecordService.Open() in d:\TeamCity\buildAgent\work\e4473b9ec9597356\Umbraco.Forms.Core\Services\RecordService\RecordService.cs:105
Umbraco.Forms.UI.Usercontrols.RenderForm.GetCurrentService() in d:\TeamCity\buildAgent\work\e4473b9ec9597356\Umbraco.Forms.UI\Usercontrols\RenderForm.ascx.cs:465
Umbraco.Forms.UI.Usercontrols.RenderForm.OnInit(EventArgs e) in d:\TeamCity\buildAgent\work\e4473b9ec9597356\Umbraco.Forms.UI\Usercontrols\RenderForm.ascx.cs:263
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Control.AddedControl(Control control, Int32 index) +198
System.Web.UI.ControlCollection.Add(Control child) +80
Umbraco.Forms.UI.Dialogs.previewFormDialog.OnInit(EventArgs e) in d:\TeamCity\buildAgent\work\e4473b9ec9597356\Umbraco.Forms.UI\Dialogs\previewFormDialog.aspx.cs:38
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
If you remove the setting it will work.
Can you please confirm the bug or is it by design not possible to have a workflow with a setting in the "When the form has been Opened" state.
I've got this same issue stopping me moving forward on my project. Just wondering when the maintenance release will be due. And if it is far off, is there a way I can get around it.
Bug: Workflow with a setting crashes in "When the form has been Opened" state
Hi
We are trying to create a workflow which can mark all checkboxes on a checkboxlist in the workflow state "When the form has been Opened".
You can not use a workflow with a setting on "When the form has been Opened" state.
This is the simple test workflow:
When the workflow is attached it will only render previous/next buttons and not the UI of the form. And there is no wizard step in the form. There is no warning or error in the log.
If you preview the form you will get an exception
If you remove the setting it will work.
Can you please confirm the bug or is it by design not possible to have a workflow with a setting in the "When the form has been Opened" state.
Comment author was deleted
Hmm looks like the settings aren't set yet, adding this to our issue tracker, will be fixed in next maintenance release.
Hi Tim,
I've got this same issue stopping me moving forward on my project. Just wondering when the maintenance release will be due. And if it is far off, is there a way I can get around it.
Thanks
Dean
is working on a reply...