TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Miguel Merayo
NA
6
0
Restar after crash
Dec 21 2009 11:36 AM
Hello all,
My question is as follows, I have one Workflow that uses an explicitly created thread, it is sleeping since it was created until the time it should execute its payload. My question is: How can I restore that thread after a process crash/failure when the process restarts its execution? Its running under aspnet. Is there any way to acomplish this task without saving the unfinished threads in the database and restore them when the system restarts?
Here is one example of the code
private
void
WFStateActivationTrigger()
{
DateTime
inicio =
DateTime
.Now.ToUniversalTime().AddSeconds(20);
TimeSpan
tiempoEspera = inicio.Subtract(
DateTime
.Now.ToUniversalTime());
Thread
.Sleep(tiempoEspera);
WorkflowEvents
.Default.RaiseEvent(
this
.WorkflowInstanceId.ToString(), (
int
)
Event
.PcActivationDone);
}
called at...
Thread
hilo =
new
Thread
(
new
ThreadStart
(WFStateActivationTrigger));
hilo.Start();
..
Thank you
Reply
Answers (
0
)
State machine WF, persistence problem
Workflow foundation