/// <summary> /// ж������ /// </summary> /// <param name="flInstance">����</param> /// <param name="isFirstUnload">�Ƿ��һ��ж��</param> private void UnloadFLInstance(FLInstance flInstance, bool isFirstUnload) { Guid flInstanceId = flInstance.FLInstanceId; object[] clientInfo = flInstance.GetClientInfo(); if (clientInfo == null) { throw new Exception("FLRuntime.UnloadFLInstance"); } object o = GetService(typeof(FLPersistenceService)); if (o != null) { FLPersistenceService flPersistenceService = (FLPersistenceService)o; if (isFirstUnload) { Guid flDefiniationId = flInstance.FLDefinitionId; flPersistenceService.PersistenceFLDefinition(flDefiniationId, flInstance.FLDefinition.Name, flInstance.GetFLDefinitionXml().InnerXml, clientInfo); } flPersistenceService.PersistenceFL(flInstance, clientInfo); } flInstance = null; }
/// <summary> /// ȡ������ /// </summary> /// <param name="flInstance">����</param> private void RejectFLInstance(FLInstance flInstance) { Guid flInstanceId = flInstance.FLInstanceId; object[] clientInfo = flInstance.GetClientInfo(); if (clientInfo == null) { throw new Exception("FLRuntime.UnloadFLInstance"); } object o = GetService(typeof(FLPersistenceService)); if (o != null) { FLPersistenceService flPersistenceService = (FLPersistenceService)o; flPersistenceService.DeleteFL(flInstance.FLInstanceId, clientInfo); } flInstance = null; }