Copied to clipboard

Flag this post as spam?

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


  • Nicolás Cova 48 posts 120 karma points
    Nov 23, 2012 @ 17:08
    Nicolás Cova
    0

    E-mails not being sent in a custom e-mail task.

    Greetings everyone,

    I am currently testing this package in trial mode for a client that is considering purchasing a license. My current setup is Umbraco 4.9, Win7, SQL Server CE, .Net 4 and IIS 7.5 on my local machine.

    I have been following this thread in order to gather some thoughts about how to create my own e-mail task (due to the lack of documentation about developing e-mail tasks, I also downloaded this example). The default e-mail tasks that come with the workflow package work perfectly. Unfortunately, I'm having trouble sending e-mails in my own custom task. My two main problems are the following:

    • When I use the SendMail() method, it appears as if my task hangs or exits abruptly. When I take a look at my fm.workflow.log file I see the following messages:
    INFO 7 FergusonMoriyam.Workflow.Application.Runtime.WorkflowRuntime - 23/11/2012 11:10:59 - Transition 'contains_docs' - 'Filter Docs Task' -> 'Node Approval Decision' 
    23/11/2012 11:11:34 - Transition 'rechazado' - 'Node Approval Decision' -> 'Documents Denied' 
    23/11/2012 11:11:34 - Transition 'finished' - 'Documents Denied' -> 'Save Node' 
    23/11/2012 11:11:34 - Transition 'saved' - 'Save Node' -> 'Send Document Denied Email' 
    INFO 16 FergusonMoriyam.Workflow.Application.Runtime.WorkflowRuntime - Runtime is processing workflows

    And the log ends there. According to my test workflow, after my 'Send Document Denied Email' task comes a default 'End Task'. It seems as if the workflow hangs or dies or something that prevents it from getting there (besides not sending the e-mail as it should).

    • On the other hand, when using the SendEmail() method, I find the following exception in my log file: 
    ERROR 13 FergusonMoriyam.Workflow.Application.Runtime.WorkflowRuntime - An error occured during a runnable task (workflow will terminate) - SendEmailToNodeCreator.SendEmailToNodeCreatorTask
    System.ArgumentNullException: Value cannot be null.
    Parameter name: values
       at System.String.Join(String separator, IEnumerable`1 values)
       at FergusonMoriyam.Workflow.Umbraco.Domain.Task.BaseEmailWorkflowTask.ReplaceTokens(String text)
       at FergusonMoriyam.Workflow.Umbraco.Domain.Task.BaseEmailWorkflowTask.SendEmail(String from, String person, String subject, String body, Boolean html)
       at SendEmailToNodeCreator.SendEmailToNodeCreatorTask.Run(IWorkflowInstance workflowInstance, IWorkflowRuntime runtime)
       at FergusonMoriyam.Workflow.Application.Runtime.WorkflowRuntime.Run()
    ERROR 13 FergusonMoriyam.Workflow.Application.Runtime.WorkflowRuntime -    at System.String.Join(String separator, IEnumerable`1 values)
       at FergusonMoriyam.Workflow.Umbraco.Domain.Task.BaseEmailWorkflowTask.ReplaceTokens(String text)
       at FergusonMoriyam.Workflow.Umbraco.Domain.Task.BaseEmailWorkflowTask.SendEmail(String from, String person, String subject, String body, Boolean html)
       at SendEmailToNodeCreator.SendEmailToNodeCreatorTask.Run(IWorkflowInstance workflowInstance, IWorkflowRuntime runtime)
       at FergusonMoriyam.Workflow.Application.Runtime.WorkflowRuntime.Run()
    INFO 13 FergusonMoriyam.Workflow.Application.Runtime.WorkflowRuntime - The workflow runtime is ending workflow '34' - 'New Workflow - 14/11/2012 14:25:59'
    INFO 13 FergusonMoriyam.Workflow.Application.Runtime.WorkflowRuntime - 23/11/2012 11:30:28 - Transition 'contains_docs' - 'Filter Docs Task' -> 'Node Approval Decision' 
    23/11/2012 11:31:01 - Transition 'rechazado' - 'Node Approval Decision' -> 'Documents Denied' 
    23/11/2012 11:31:01 - Transition 'finished' - 'Documents Denied' -> 'Save Node' 
    23/11/2012 11:31:01 - Transition 'saved' - 'Save Node' -> 'Send Document Denied Email' 
    INFO 13 FergusonMoriyam.Workflow.Application.Runtime.WorkflowRuntime - Runtime is processing workflows
    Upon finding such an exception in my log file, I made sure I wasn't passing any null values to the SendEmail() method and I'm still getting that error. It strikes me as odd that he considers a value as null. Obviously, as you can see, the workflow does not reach the "End Task" at the end of the workflow.
    Is there any way you guys can help me? I have been able to develop runnable tasks, decisions tasks and delayed tasks and it kind of frustrates me not being able to develop a simple e-mail task (and seeing that the default e-mail tasks work well).

     

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Nov 24, 2012 @ 11:27
    Darren Ferguson
    0

    Hi Nicolas,

    If you email the source for your custom task to info @ moriya.ma then we will be happy to put it into one of environments and help you to debug it.

    Many Thanks

  • Nicolás Cova 48 posts 120 karma points
    Nov 26, 2012 @ 15:20
    Nicolás Cova
    0

    Hi Darren,

    I'll get send you the source code as soon as possible.

    Thank you.

Please Sign in or register to post replies

Write your reply to:

Draft