Click here to Skip to main content
15,885,914 members

Comments by Prasyee (Top 8 by date)

Prasyee 5-Nov-14 9:07am View    
found solution for this ? can you post your code?
Prasyee 4-Oct-13 3:18am View    
public InstanceHandle CreateInstanceStoreOwnerHandle(InstanceStore store, XName WFHostTypeName)
{
InstanceHandle ownerHandle = store.CreateInstanceHandle();
CreateWorkflowOwnerCommand ownerCommand = new CreateWorkflowOwnerCommand()
{
InstanceOwnerMetadata =
{
{
WorkflowHostTypePropertyName, new InstanceValue(WFHostTypeName)
}
}
};
store.DefaultInstanceOwner = store.Execute(ownerHandle, ownerCommand, TimeSpan.FromSeconds(30)).InstanceOwner;
return ownerHandle;
}
Prasyee 4-Oct-13 3:18am View    
public void GenerateInstanceStore(WorkflowApplication WorkApp, Guid id)
{
WFInstStore = new SqlWorkflowInstanceStore(WFInstanceConnStr);
WFInstStore.InstanceCompletionAction = InstanceCompletionAction.DeleteNothing;
try
{
WorkApp.InstanceStore = WFInstStore;
id = WorkApp.Id;
WFHostTypeName = XName.Get("Version" + id.ToString(), typeof(Activity).FullName);
WFInstHandle = CreateInstanceStoreOwnerHandle(WFInstStore, WFHostTypeName);
Dictionary<xname, object=""> wfScope = new Dictionary<xname, object="">
{
{
WorkflowHostTypePropertyName, WFHostTypeName
}
};

WorkApp.AddInitialInstanceValues(wfScope);
WorkApp.Completed = (e) => { completed = true; };
WorkApp.PersistableIdle = (e) => { return PersistableIdleAction.Persist; };
WFapphandle.Set();
WorkApp.Persist();
}
catch (Exception ex)
{
Obj_LogException.MyLogFile(ex.ToString());
}
finally
{
ReleaseObject(Obj_LogException);
ReleaseObject(Obj_LogFile);
ReleaseObject(WFInstStore);
//ReleaseObject(WFHostTypeName);
}
}


for unloading


public void LoadWinAppInstance(WorkflowApplication WinWFApp, Guid Gid)
{
//SqlWorkflowInstanceStore WFLoadInstStore = new SqlWorkflowInstanceStore(ConfigurationManager.AppSettings["PersistenceWorkflow"].ToString());
WFInstStore = new SqlWorkflowInstanceStore(WFInstanceConnStr);
WFInstStore.InstanceCompletionAction = InstanceCompletionAction.DeleteNothing;
try
{
WFHostTypeName = XName.Get("Version" + Gid.ToString(), typeof(Activity).FullName);
WFInstHandle = CreateInstanceStoreOwnerHandle(WFInstStore, WFHostTypeName);
WinWFApp.Completed = (WorkflowCompletedEventArgs) =>
{
completed = true;
};
WinWFApp.Unload();
}
catch (Exception ex)
{
Obj_LogException.MyLogFile(ex.ToString());
}
finally
{
//ReleaseObject(WFHostTypeName);
ReleaseObject(WFInstStore);
//ReleaseObject(WinWFApp);
ReleaseObject(Obj_LogFile);
ReleaseObject(Obj_LogException);
//ReleaseObject(Gid);
}
}
Prasyee 12-Dec-12 5:28am View    
help needed
Prasyee 30-Nov-12 0:43am View    
Can you Please try for any further modification with the query to give the ouput what i need??..Me too will try and trying to do the same..
Thanks Once Again..Need more pointers