Copied to clipboard

Flag this post as spam?

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


  • Ulf Möllerström 70 posts 247 karma points
    Mar 17, 2021 @ 10:49
    Ulf Möllerström
    0

    Forms: How to handle WorkflowExecutionStatus.Failed

    As the topic states: how do I handle a custom workflow-item with the failed status - anyone found a solution?

    _

    Also, the documentation on a product that costs EUR 149, and that is this bad, is really embarrassing for Umbraco HQ.

  • AddWeb Solution Pvt. Ltd 109 posts 360 karma points
    Mar 18, 2021 @ 04:51
    AddWeb Solution Pvt. Ltd
    0

    Hello,

    see example for custom workflow to submit form data https://our.umbraco.com/forum/umbraco-forms/78420-handling-workflow-failure

  • Ulf Möllerström 70 posts 247 karma points
    Mar 19, 2021 @ 11:14
    Ulf Möllerström
    0

    This is really not of any help.

  • Ulf Möllerström 70 posts 247 karma points
    Mar 19, 2021 @ 11:29
    Ulf Möllerström
    0

    For reference: We ended up with this work-around with a "FormsResponsePage".

    @inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.FormsResponsePage>
    @using Umbraco.Forms.Core.Enums
    @using ContentModels = Umbraco.Web.PublishedModels;
    @functions
    {
        private void WorkflowExecutionStatusCheck()
        {
            Enum.TryParse<WorkflowExecutionStatus>(
                (string)Session[nameof(WorkflowExecutionStatus)], 
                out var status);
    
            switch (status)
            {
                case WorkflowExecutionStatus.Completed:
                    break;
                case WorkflowExecutionStatus.Failed:
                    throw new Exception(
                        $"{nameof(WorkflowExecutionStatus)}: {Enum.GetName(typeof(WorkflowExecutionStatus), status)}");
                case WorkflowExecutionStatus.NotConfigured:
                    break;
                case WorkflowExecutionStatus.Cancelled:
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }
        }
    }
    @{
        WorkflowExecutionStatusCheck();
    }
    

    Though the customer already have a license, Umbraco Forms are simply not suited for anything more advanced when using it like once a year, and building custom controls just isn't viable in such a scenario.

    NB! The code is a stub.

Please Sign in or register to post replies

Write your reply to:

Draft