Hi friends:
Please Help me !!! -_-||
I use WWF beta2, StateMachine Workflow
When run WWF beta2, I use 2 databases, the name was WorkflowStore and WorkflowTracking, the string below is the connection strings to the 2 databases in web.config
<add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService,System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" connectionString="Data Source=ServerName;Initial Catalog=WorkflowStore;User ID=sa;Password=MyPass;" LoadIntervalSeconds="2" UnloadOnIdle="true" />
<add type="System.Workflow.Runtime.Tracking.SqlTrackingService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionString="Data Source=ServerName;Initial Catalog=WorkflowTracking;User ID=sa;Password=MyPass;" />
In the "Data Source=ServerName" field, when I write a Local SQLServer IP address, like this:
Data Source=127.0.0.1
the WWF will work very well
BUT:
when I write a Remote SQLServer IP address(also in the same Intranet), like this:
Data Source=192.0.0.100
then I get the currentstate of the workflow instance:
StateMachineWorkflowInstance stateinstance = new StateMachineWorkflowInstance(_workflowruntime, _instanceid);
return stateinstance.CurrentStateName;
the WWF will warn me this:
Workflow with id "xxxxxxxx" not found in state persistence store
WHY !!!
Please Help me
thanks a lot
^o^

Workflow with id "xxxxxxxx" not found in state persistence store ???!!!
Rob Wheeler
Thanks for your reply
BUT
The problem occurs when I create a new statemachine workflow instance with the romote SQLServer database
Joseph Geretz
Hi,
The problem is, the Instance ID of the workflow instance created in the client is different from the one it is looking for in the persistance store.
Fix :-
1. Create a parameterized constructor for the workflowdataeventargs class(inherited from the externaldataeventargs) with the parameter as a GUID to take the WorkflowID created in the client.
2.The constructor created in step1 should inherit from the base(Guid InstanceID) constructor.
3. Pass the workflowinstance.InstanceId to the local service and create the workflowdataeventargs object with the parametrized constructor created in step 1.
This should fix the problem.
Regards,
Thirumeni Nathan .C
Sample Code
public class RamsService : IRamsService{
IRamsService Members public event EventHandler<RamsEventArgs> RequestSubmittedEvent; public void SubmitRequest(string item, Guid workflowID){
RamsEventArgs eventArgs = new RamsEventArgs(workflowID);eventArgs.Item = item;
if (RequestSubmittedEvent != null){
RequestSubmittedEvent(
null, eventArgs);}
}
[
Serializable] public class RamsEventArgs : ExternalDataEventArgs{
private string item; public string Item{
get { return item; } set { item = value; }}
public RamsEventArgs(Guid instanceID) : base(instanceID){
}
}
Vinod403103
set a sql profiler trace on your remote server to analyse the queries ; which queries are sent what are the parameters & values does the system check the table every xx seconds have you used the correct scripts delete and rebuild the persistence db.
You should upgrade to RC4, many problems persistence & tracking problems have been fixed in recent builds
Serge
Donaghy
Thanks
when I create a new statemachine workflow instance with the remote SQLServer, there is no record in the instanceState DataTable
Jon M.
moveit
Who can help me
Oscarfh