Solved

WF: State Machine Persistence WorkFlow

Posted on 2010-11-29
1
885 Views
Last Modified: 2012-05-10
HI!

I need some design help.

I have a state machine that I need to restart when the workflow is done. I do not need to save the current states (pause the state machine) just rerun it from the start.

why I need this is becase the load of a new instance takes to long so I need to build the sate machine and when a user press start I need it to execute the state machine  directly without any delay of creating a new instanceand and when the user press start again I want to rerun it, and so on.

How do I do this?

Must I use the SqlWorkflowPersistenceService even if  I just want to restart it from the beginning? Or is there a easyer way to do it then?
0
Comment
Question by:AWestEng
1 Comment
 
LVL 14

Accepted Solution

by:
existenz2 earned 500 total points
ID: 34246219
Workflows are not designed to do this and it will give you all kinds of problems. You could however build a form of cache pool with a limited amount of new workflows waiting to be used. Everytime a new workflow is taken from the cache pool, you can asynchronisally put a new workflow into the pool to ensure that the pool does not end up without any prepared workflows.

It's a bit like a queueing mechanism or a car plant. Workflows are never fast and will always have a delay. There is no way to fix this, as this is by nature in any kind of workflow in any system. It's just the users perception which is the problem.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Article by: Ivo
Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now