This project is read-only.

Define Workflows Dynamically

Mar 29, 2011 at 9:02 PM

I suppose this may be similar to the Import / Export question, but do you think it is possible to dynamically create a workflow. So, a user can define a workflow, the metadata gets saved to a database, and that workflow can be applied to specific types. I am trying to think if we can setup some sort of basic instruction language that can be built around the object flow library. I know it kind of goes against the idea of the library, but I like how simple the approach is to state full workflows and transisitions.

Mar 29, 2011 at 10:24 PM

Can you elaborate on what exactly you are trying to do? Please describe your problem. The solution you are trying to create might be too complicated, but if I can understand the problem I might be able to come up with a reasonable solution without much change to the existing code.

Mar 30, 2011 at 12:55 AM

I have been tasked to come up with a workflow solution that can have elements defined by a non-technical group. I am trying to leverage existing libraries and not having to “reinvent the wheel”. For example, we want to allow our users to define a workflow, with some sort of web designer, for a specific type. There may be certain states the workflow has to go through be for it can be considered completed. The states will be defined by the users, as well. I have been looking at WF4, but it seems to be too heavy for most users. I saw this and thought we could come up with a solution using this library. I just wanted to get your thoughts on it. Does this make sense?

Mar 30, 2011 at 5:29 AM

Thank you, this makes a lot more sense. Stateful objectflow will get you 80% the way there. You can define workflows programatically, implement a security layer, and let the UI communicate with the workflow. However, objectflow doesn't support modifying workflows post-compile time. The best you can do with OF is break a workflow into more statements:

var wf = new StatefulWorkflow<Ticket>();

if (UserWantsFeatureA)
    wf.Do(x => x.FeatureA())
        .Yield("Feature A Complete");

if (UserWantsFeatureB)
    // etc.

This kind of breaks the "fluent" feel of objectflow, but it makes your workflow a little more dynamic. I understand what you mean by WF being too heavy, but if you want workflows that are fully configurable by the user, WF lets you do this without relatively too much headache. However, objectflow makes defining light workflows in code very natural. They each have their own uses.

Mar 30, 2011 at 11:40 AM

That's kind of how I imagined it later last night. Thanks so much for your thoughts! I will be wokring on the the next few weeks. If I can work it out, I will post up my code.

Mar 30, 2011 at 3:13 PM

One last thing, stateful workflows haven't been officially released yet. Go to https://github.com/tkellogg/objectflow to grab the latest. I submitted some patches to djnz_gae but he hasn't had the time yet to merge them into SVN.

Apr 5, 2011 at 4:59 PM
Edited Apr 5, 2011 at 4:59 PM

I was considering moving the project to a different version control system.  I may have to do this sooner rather than later as subversion does not make patching easy.  So I think these won't be applied until that happens.

Apr 6, 2011 at 2:00 AM
Yeah, I saw that. It would be great if you moved to HG or git. I'm brainstorming some hacks to do the patching. If you go Git, I can just merge my code with you. If you go with mecurial, I can do the patching/merging locally and send a pull request when I got it.

Tim Kellogg


On Tue, Apr 5, 2011 at 9:59 AM, djnz_gea <notifications@codeplex.com> wrote:

From: djnz_gea

I was considering moving the project to a different version control system. I may have to do this sooner rather than later as subversion does not make patching easy.

Read the full discussion online.

To add a post to this discussion, reply to this email (objectflow@discussions.codeplex.com)

To start a new discussion for this project, email objectflow@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Apr 6, 2011 at 4:03 PM

The patches have also been deleted in the move to mercurial.

Could you upload your changes.  Hopefully, mercurial will make this easier.  

Apr 6, 2011 at 4:07 PM
Garfield

I'll fork the repository and apply the patches myself. When I'm done I'll send you a pull request. I'm not sure when I'll have the time, perhaps this weekend. There shouldn't be a need for uploading patch files anymore.

Tim Kellogg


On Wed, Apr 6, 2011 at 9:03 AM, djnz_gea <notifications@codeplex.com> wrote:

From: djnz_gea

The patches have also been deleted in the move to mercurial.

Could you upload your changes. Hopefully, mercurial will make this easier.

Read the full discussion online.

To add a post to this discussion, reply to this email (objectflow@discussions.codeplex.com)

To start a new discussion for this project, email objectflow@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com