WFTools persistence and delay activities.

Sep 23, 2008 at 8:59 PM
Edited Sep 23, 2008 at 9:00 PM
Hi,
I have implemented a state machine workflow with external events & timers (Delay activities).
IIS is host of this workflow and they will be consumed via WCF Service which in turn called by asp.net pages.
It's manual scheduler service & active timers are set to true.
I am using WFTools for persistence and tracking.
And also using adoworkbatch service.
Good news is that timers (Delay Activities) & events are getting fired.

My issue is that delayactivity is getting fired even after the state machine workflow is completed i.e reached it's final state.
I thought once workflow moves away from the state, all the  events &delay activities associated with them will get unregistered.  But it doesn't seem to work that way.

Here is my workflow.

Initial state
1.state init -creates an instance.
2.ExternalEvent that moves to submitted state.

Submitted state:
1.OnApprove - external event
2.OnReject- external event
3.OnCancel - external event
4.Delayactivity for escalation (For testing purpose i set this to 9 minutes & my loading interval is only 2 minutes).
At the end of escalation event, i set the state back to the same state i.e submitted state.

Any approve/reject/cancel comples the workflow and moves the state to final state i.e. completed state.

Here is what I did:
1.I created the workflow & moved to submitted state.
2.Now I approved it and now the workflow moved to completed state. (within 3 minutes of creating the workflow)

But to my surprise, the timer event got fired after 9 minutes even though my workflow is closed.
The timer (Delayactivity for escalation) event should only be fired when it's in submitted state.

What is that I am missing?

Why are delayactivities not getting unregistered when I move to a different state?Even if they dont get unregisterd why are they getting fired and successfully executes the code with in that activity? I am totally lost.
Any help is greatly appreciated.
Coordinator
Sep 24, 2008 at 11:57 AM
Hi vasu,

There was a bug in the 0.3.0.0 release that meant completed workflows weren't always removed from the INSTANCE_STATE table. Grab the latest source and use that and you should find this problem disappears. If not, give me a shout and I'll look into it!

Cheers,

Dean
Nov 26, 2008 at 1:02 AM
Edited Nov 26, 2008 at 1:05 AM
Cheers dean
Nov 27, 2008 at 1:40 AM
I've tried this with a sequential workflow on the 15876 build but it still looks like the workflow isn't getting removed from the INSTANCE_STATE table. It leaves it in there and throws 

An unexpected exception occurred while performing a workflow persistence operation. WFTools.Services.Persistence.PersistenceException: Instance with identifier 639cda61-107c-4240-84ee-216ffdb8b7d1 could not be loaded.\r\n   at WFTools.Services.Persistence.Ado.AdoPersistenceResourceAccessor.CheckResult(DbCommand dbCommand, String resultParameter, String instanceParameter)
Coordinator
Nov 27, 2008 at 12:07 PM
Hi rupurt,

What database are you targetting?

Thanks,

Dean

2008/11/27 rupurt <notifications@codeplex.com>

From: rupurt

I've tried this with a sequential workflow on the 15876 build but it still looks like the workflow isn't getting removed from the INSTANCE_STATE table. It leaves it in there and throws

An unexpected exception occurred while performing a workflow persistence operation. WFTools.Services.Persistence.PersistenceException: Instance with identifier 639cda61-107c-4240-84ee-216ffdb8b7d1 could not be loaded.\r\n at WFTools.Services.Persistence.Ado.AdoPersistenceResourceAccessor.CheckResult(DbCommand dbCommand, String resultParameter, String instanceParameter)

Read the full discussion online.

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

To start a new discussion for this project, email WFTools@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




--
Dean Ward
E-mail: dean@iprinciples.com
Web: http://www.iprinciples.com/
Mobile: +44 (0)7776 144435
Nov 27, 2008 at 11:27 PM
MySQL 5.1