Workflow Soluiton

 View Only
  • 1.  Exception Component not passing details

    Posted Feb 15, 2016 04:37 AM

    In one of my workflows I need to manually trigger an exception when something happens. I've renamed the exception component to match the source of the exception and also configured a custom error message.

    But when I catch this exception, the message is not passed to the exception trigger. I get the following values:

    • The [ExceptionComponentName] = "Model [Populate Dropdown Menus]" but
    • the [ExceptionTriggerMessage] = "exception component created:"

    I expected the ExceptionTriggerMessage variable to receive value "This is just a custom message" from the exception component.

    Am I missing something here?

     

     Image1_0.png

     



  • 2.  RE: Exception Component not passing details

    Posted Feb 15, 2016 08:12 AM

    Hi MHope,

    Another way is to use the Exception Trigger and customize the message using the Create Log.

    Option 1: Exception Trigger to all Model.

    Option 2: Exception Trigger just one component.

    ExecptionTrigger.PNG

     

    If you use 'Create Log' you don't need check 'Put Error In Error Log' in Excpetion Trigger because the component Create Log do that.

    Exists 'Excpetion Trigger By Components' and allow you specify components .

    Regars,



  • 3.  RE: Exception Component not passing details

    Posted Feb 15, 2016 09:39 AM

    Thanks for the tip, I tried to keep my example short and simple, but maybe it did not demonstrate my actual issue:

    in my case there is no authentic exception triggered - I want to create one dynamically like this:
    (fyi - I'm not actually listing all domain users, this is just an example I made to demonstrate the problem)

    demo.png

    When I build something like this, using Workflow Solution 7.5.3001, the message I write inside the Exception component is not passed to the exception trigger. It would be cool to know, if this can be fixed somehow or it is just the way the component works.

    I know there are other ways to do this, for example like this:

    demo2.png



  • 4.  RE: Exception Component not passing details

    Posted Feb 16, 2016 09:51 AM

    More details for whom ever is interested:

    when i build the workflow as demonstrated in the image below in Designer 7.5.3001, these are the values that the exception trigger component catches:

    • ExceptionComponentName:
      • Create an Exception
    • ExceptionTriggerMessage:
      • exception component created:
    • ExceptionTriggerStackTrace:
      • System.Exception: exception component created: ---> LogicBase.Framework.BusinessRuleException: Something is wrong. AD not returning any users!--- End of inner exception stack trace --- at LogicBase.Core.ExecutionEngine.ExceptionComponentDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context) at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp)

     

    This value - bolded in the stack trace-  is actually the value that should be in the exception trigger component's ExceptionTriggerMessage variable!

    demo3.png



  • 5.  RE: Exception Component not passing details

    Posted Feb 16, 2016 07:51 PM

    I have tried this on 7.1 SP2, 7.5 SP1 and 7.6. The component doesn't seem to do anything useful.

    You could use the 'Display Content' component, I think that is the intent of the 'Exception Component', if it worked.



  • 6.  RE: Exception Component not passing details

    Posted Feb 19, 2016 07:09 AM

    While this may not be the cleanest way to handle this, I wanted to use the Exception Component and thus built a small addition to my error handling so, that if the Exception Trigger Component's value [ExceptionTriggerStackTrace] contains the string "system.exception: exception component created", I then extract the actual error message from the stack trace variable. If the stacktrace does not containt that string, we can assume that the exception did not come from an Exception Component and we just read the [ExceptionTriggerMessage].

    symantec4.png