I've been going through the new version of Contour for Umbraco 5 and am now looking at implementing some custom workflows and I have some code that should work but I think I'm missing something as it is not available in the workflow type drop down. Once compiled I'm just dropping the .dll in the bin directory.
Here is my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Umbraco.Forms.Core;
using Umbraco.Forms.Core.Attributes;
using Umbraco.Forms.Core.Enums;
using Umbraco.Forms.Data.Storage;
using Umbraco.Forms.Data;
namespace Site.Extensions
{
class CustomWorkflow : WorkflowType
{
public CustomWorkflow()
{
this.Id = new Guid("A099EABD-EC80-4497-A9CD-1E1ECA75E467");
this.Name = "test workflow";
this.Description = "quick test";
}
public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e)
{
//do something
return WorkflowExecutionStatus.Completed;
}
public override List<Exception> ValidateSettings()
{
return null;
}
}
}
I've cleared my temporary asp.net files but it's made no difference.. I've also tried doing doing my workflow in another solution but that has not worked either..
Hi Tim, I thought I'd try and do another solution again and this time it has worked. Not sure what is different this time, but it seems to be working ok now...! Thanks for your help
Custom Workflows in Contour 2.0 beta
I've been going through the new version of Contour for Umbraco 5 and am now looking at implementing some custom workflows and I have some code that should work but I think I'm missing something as it is not available in the workflow type drop down. Once compiled I'm just dropping the .dll in the bin directory.
Here is my code:
Comment author was deleted
Hey,
There is an attribute you must use to decorate your assembly if it contains contour addons
So in the AssemblyInfo.cs file of you project just add
Found in the Umbraco.Forms.Core.Attributes namespace
Let me know if that does the trick
Hi Tim,
Thanks for you reply. I've added that to the AssemblyInfo but unfortuntately that hasn't worked, is there anything else I need to do?
Thanks,
Braydie
Comment author was deleted
Incrementing your assembly version might help to avoid it being cached
Hi Tim,
I've tried this, but again no joy..
Comment author was deleted
Hmm try clearing temp asp.net files, I'll also take a look with a test solution but all the providers are also in a extra assembly so should work...
I've cleared my temporary asp.net files but it's made no difference.. I've also tried doing doing my workflow in another solution but that has not worked either..
Hi Tim, I thought I'd try and do another solution again and this time it has worked. Not sure what is different this time, but it seems to be working ok now...! Thanks for your help
is working on a reply...