private void SetScene(SetLockResult lockResult)
        {
            bool isReadOnly = true;

            MCS.Library.SOA.DataObjects.OperationType logOpType = MCS.Library.SOA.DataObjects.OperationType.OpenForm;

            if (lockResult != null && lockResult.Succeed && WfClientContext.Current.InMoveToMode && IsRelativeForm == false)
            {
                isReadOnly = false;
                logOpType  = MCS.Library.SOA.DataObjects.OperationType.OpenFormForMove;
            }

            //如果流程已经办结,那么检查结束点的场景来决定是否只读
            if (WfClientContext.Current.CurrentActivity != null && WfClientContext.Current.CurrentActivity.Process.Status == WfProcessStatus.Completed)
            {
                isReadOnly = WfClientContext.Current.CurrentActivity.Descriptor.Scene.IsNullOrEmpty();
            }

            if (isReadOnly)
            {
                SetReadOnlyScene(WfClientContext.Current.OriginalActivity);
            }
            else
            {
                SetSceneByActivity(WfClientContext.Current.CurrentActivity);
            }

            WriteOpenFormLog(WfClientContext.Current.CurrentActivity, logOpType);
        }
        /// <summary>
        /// 写打开表单的日志
        /// </summary>
        /// <param name="currentActivity"></param>
        /// <param name="logOpType"></param>
        private static void WriteOpenFormLog(IWfActivity currentActivity, MCS.Library.SOA.DataObjects.OperationType logOpType)
        {
            if (currentActivity != null)
            {
                UserOperationLog log = UserOperationLog.FromActivity(currentActivity);

                log.OperationType = logOpType;
                log.OperationName = EnumItemDescriptionAttribute.GetDescription(logOpType);

                UserOperationLogAdapter.Instance.Update(log);
            }
        }