Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan Evans 616 posts 988 karma points
    Jan 29, 2010 @ 10:50
    Dan Evans
    0

    RecordPartiallySubmitted not being triggered

    I need to create a workflow for the 1st step in a 2 step form. I have the following code which sets a cookie. If i add this workflow to the "When the form has been Submitted" it fires and the cookie is set when the final step is carried out. However if I add exactly the same workflow to "When the form has been PartiallySubmitted" it does not fire when the first step is submitted. Am i doing something wrong?

    Thanks

    Dan

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Text.RegularExpressions;
    using System.Xml;
    using System.Xml.XPath;
    using System.Web;

    using Umbraco.Forms.Core;
    using Umbraco.Forms.Core.Enums;
    using Umbraco.Forms.Data.Storage;


    namespace FFDisclaimer
    {
    public class SetCookie : Umbraco.Forms.Core.WorkflowType
    {
    [Umbraco.Forms.Core.Attributes.Setting("ExpiryDate", description = "Enter length of the cookie in days", control = "Umbraco.Forms.Core.FieldSetting.TextField")]
    public string ExpiryDate { get; set; }

    public SetCookie()
    {
    this.Id = new Guid("0a9b6f85-3f24-4f46-b738-0a9984784d6b");
    this.Name = "Set cookie to show form submitted";
    this.Description = "Sets a cookie to show the user has completed the disclaimer and can visit the site";
    }

    public override List<Exception> ValidateSettings()
    {
    List<Exception> l = new List<Exception>();
    if (string.IsNullOrEmpty(ExpiryDate))
    l.Add(new Exception("'ExpiryDate' setting not filled out'"));
    return l;
    }


    public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e)
    {

    HttpCookie cookie = new HttpCookie("disclaimer");
    cookie.Value = "checked";
    cookie.Expires = DateTime.Now.AddDays(300);
    HttpContext.Current.Response.Cookies.Add(cookie);

    return WorkflowExecutionStatus.Completed;

    }
    }
    }

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Jan 31, 2010 @ 15:53
    Tim Geyssens
    0

    Hi Dan,

    Looks like you discovered a bug. Will add this to our bug tracker and we'll sort this out with the next maintenance release.

  • Dan Evans 616 posts 988 karma points
    Feb 01, 2010 @ 05:26
    Dan Evans
    0

    Does that mean that the PartiallySubmitted event is NEVER fired at the moment? Or are there specific circumstances that cause to fire or not fire?

    Thanks

    Dan

  • Dan Evans 616 posts 988 karma points
    Feb 17, 2010 @ 19:18
    Dan Evans
    0

    Hi Tim

    Any idea when this bug will be fixed and a patched version released?

    Thanks

    Dan

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Mar 05, 2010 @ 11:22
    Tim Geyssens
    0

    Looking into the issue today, new maintenance release following today or monday

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Mar 05, 2010 @ 17:11
    Tim Geyssens
    0

    Fixed the problem, should have the new maintenance release ready on monday (including several other fixes).

  • Dan Evans 616 posts 988 karma points
    Mar 11, 2010 @ 09:54
    Dan Evans
    0

    Hi Tim,

    Where can i find version 1.0.8? The package repository is still showing 1.0.7.

    Thanks

    Dan

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies