Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1094977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:03:07+00:00 2026-05-17T00:03:07+00:00

Long version: What would be the essential elements/components of a workflow to be implemented

  • 0

Long version: What would be the essential elements/components of a workflow to be implemented in C# (without using any part of WF 3.5 or WF 4)?

Note I: I want to implement a master-slave communication where server-side is always passive(slave) and my workflow mainly performs tasks related to such communication scheme.

Note II: Since in my project it is decided that we will not use WF 4 (IMHO a right decision), I need some design guide-lines in implementing a (simple) workflow toolbox.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:03:08+00:00Added an answer on May 17, 2026 at 12:03 am

    If you don’t want to use Workflow foundation you can create your workflow as implementation of GOF State pattern.

    Simple implementation:

    public class Workflow
    {
      internal IState Current { get; set; }
    
      public void Start()
      {
         Current = new StartState();
         Current.Start(this);
      }
    
      public void DoSomething()
      {
         Current.DoSomething(this);
      }
    
      public void DoSomethingElse()
      {
         Current.DoSomethingElse(this);
      }
    }
    
    public interface IState
    {
      Start(Workflow context);
      DoSomething(Workflow context);
      DoSeomethingElse(Workflow context);
    }
    
    public abstract BaseState : IState
    {
      public virtual void Start(Workflow context)
      {
        throw new InvalidStateOperationException(); 
      }
    
      public virtual void DoSomething(Workflow context)
      {
        throw new InvalidStateOperationException(); 
      }
    
      public virtual void DoSomethingElse(Workflow context)
      {
        throw new InvalidStateOperationException(); 
      }
    }
    
    public class StartState : BaseState
    {
      public override void Start(Worklfow context)
      {
        // Do something
        context.Current = new OtherState();
      }
    }
    

    This is juse very basic implementation. You can futher extend it. You can add other set of methods like CanDoSomething, you can maintain collection of created State instances because State instance is stateless so you don’t need to create new instnace each time you move to the state etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Short version: I want to trigger the Form_Load() event without making the form visible.
Long version: Those familiar to the standardization nightmare of the RSS-family, may know that
Short version: Can I grant access to external databases to a role? Long version:
short version: Is there a good time based sampling profiler for Linux? long version:
Long time ago I made a socket based server application using the principle of
Short version of question: see title Long version of question: I've used jquery's show()
Short Version Calls to CommandManager.InvalidateRequerySuggested() take far longer to take effect than I would
Long version... A co-worker asserted today after seeing my use of while (1) in
I divided my problem into a short and a long version for the people
Short Version I want to extend SoapClient so it does this internally when accessing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.