Пример #1
0
        /// <summary>
        /// Resolve <see cref="PersistenceParameterName" /> to their database-specific parameter name.
        /// </summary>
        /// <param name="commandName">
        /// A <see cref="PersistenceCommandName" /> indicating which command the parameter
        /// name needs to be resolved for.
        /// </param>
        /// <param name="parameterName">
        /// A <see cref="PersistenceParameterName" /> indicating which parameter needs to be resolved.
        /// </param>
        public string ResolveParameterName(PersistenceCommandName commandName, PersistenceParameterName parameterName)
        {
            switch (parameterName)
            {
            case PersistenceParameterName.InstanceId:
                if (commandName == PersistenceCommandName.InsertCompletedScope)
                {
                    return("InstanceID");
                }
                else
                {
                    return("uidInstanceID");
                }

            case PersistenceParameterName.ScopeId:
                return("completedScopeID");

            case PersistenceParameterName.State:
                return("state");

            case PersistenceParameterName.Status:
                return("status");

            case PersistenceParameterName.Unlock:
                return("unlocked");

            case PersistenceParameterName.IsBlocked:
                return("blocked");

            case PersistenceParameterName.Info:
                return("info");

            case PersistenceParameterName.CurrentOwnerId:
                return("currentOwnerID");

            case PersistenceParameterName.OwnerId:
                return("ownerID");

            case PersistenceParameterName.OwnedUntil:
                return("ownedUntil");

            case PersistenceParameterName.NextTimer:
                return("nextTimer");

            case PersistenceParameterName.Result:
                return("result");

            case PersistenceParameterName.Now:
                return("now");

            case PersistenceParameterName.WorkflowIds:
                return("workflowIds");
            }

            throw new NotSupportedException(RM.Get_Error_CommandNameParameterNameNotSupported());
        }
Пример #2
0
        /// <summary>
        /// Resolve <see cref="PersistenceParameterName" /> to their database-specific parameter name.
        /// </summary>
        /// <param name="commandName">
        /// A <see cref="PersistenceCommandName" /> indicating which command the parameter
        /// name needs to be resolved for.
        /// </param>
        /// <param name="parameterName">
        /// A <see cref="PersistenceParameterName" /> indicating which parameter needs to be resolved.
        /// </param>
        /// <returns>
        /// </returns>
        public string ResolveParameterName(PersistenceCommandName commandName, PersistenceParameterName parameterName)
        {
            switch (parameterName)
            {
            case PersistenceParameterName.InstanceId:
                return("p_INSTANCE_ID");

            case PersistenceParameterName.ScopeId:
                return("p_COMPLETED_SCOPE_ID");

            case PersistenceParameterName.State:
                return("p_STATE");

            case PersistenceParameterName.Status:
                return("p_STATUS");

            case PersistenceParameterName.Unlock:
                return("p_UNLOCKED");

            case PersistenceParameterName.IsBlocked:
                return("p_BLOCKED");

            case PersistenceParameterName.Info:
                return("p_INFO");

            case PersistenceParameterName.CurrentOwnerId:
                return("p_CURRENT_OWNER_ID");

            case PersistenceParameterName.OwnerId:
                return("p_OWNER_ID");

            case PersistenceParameterName.OwnedUntil:
                return("p_OWNED_UNTIL");

            case PersistenceParameterName.NextTimer:
                return("p_NEXT_TIMER");

            case PersistenceParameterName.Result:
                return("p_RESULT");

            case PersistenceParameterName.Now:
                return("p_NOW");

            case PersistenceParameterName.WorkflowIds:
                return("p_WORKFLOW_IDS");
            }

            throw new NotSupportedException(RM.Get_Error_CommandNameParameterNameNotSupported());
        }
Пример #3
0
        public string ResolveParameterName(TrackingCommandName commandName, TrackingParameterName parameterName)
        {
            switch (parameterName)
            {
            case TrackingParameterName.ActivityXml:
                return("p_ACTIVITY_XML");

            case TrackingParameterName.ActivityXoml:

                if (commandName == TrackingCommandName.InsertActivityAddedActions)
                {
                    return("p_ADDED_ACTIVITY_ACTION");
                }
                else if (commandName == TrackingCommandName.InsertActivityRemovedActions)
                {
                    return("p_REMOVED_ACTIVITY_ACTION");
                }

                break;

            case TrackingParameterName.ActivityInstanceId:
                return("p_ACTIVITY_INSTANCE_ID");

            case TrackingParameterName.ActivityStatusId:
                return("p_ACTIVITY_STATUS_ID");

            case TrackingParameterName.ActivityStatusEventId:
                return("p_ACTIVITY_STATUS_EVENT_ID");

            case TrackingParameterName.Annotation:
                return("p_ANNOTATION");

            case TrackingParameterName.AssemblyFullName:
                return("p_ASSEMBLY_FULL_NAME");

            case TrackingParameterName.CallerContextGuid:
                return("p_CALLER_CONTEXT_GUID");

            case TrackingParameterName.CallerInstanceId:
                return("p_CALLER_INSTANCE_ID");

            case TrackingParameterName.CallerParentContextGuid:
                return("p_CALLER_PARENT_CONTEXT_GUID");

            case TrackingParameterName.CallPath:
                return("p_CALL_PATH");

            case TrackingParameterName.ContextGuid:
                return("p_CONTEXT_GUID");

            case TrackingParameterName.CreateDefault:
                return("p_CREATE_DEFAULT");

            case TrackingParameterName.DataBlob:
                return("p_DATA_BLOB");

            case TrackingParameterName.DataString:
                return("p_DATA_STR");

            case TrackingParameterName.DataNonSerialisable:
                return("p_DATA_NON_SERIALISABLE");

            case TrackingParameterName.EventArgs:
                return("p_EVENT_ARG");

            case TrackingParameterName.EventArgsAssemblyFullName:
                return("p_EVENT_ARG_ASSEMBLY_NAME");

            case TrackingParameterName.EventArgsTypeFullName:
                return("p_EVENT_ARG_TYPE_NAME");

            case TrackingParameterName.EventDateTime:
                return("p_EVENT_DATE_TIME");

            case TrackingParameterName.EventId:
                return("p_EVENT_ID");

            case TrackingParameterName.EventOrder:
                return("p_EVENT_ORDER");

            case TrackingParameterName.EventType:
                return("p_EVENT_TYPE");

            case TrackingParameterName.Exists:
                return("p_EXISTS");

            case TrackingParameterName.FieldName:
                return("p_FIELD_NAME");

            case TrackingParameterName.InitialisedDateTime:
                return("p_INITIALISED_DATE_TIME");

            case TrackingParameterName.InstanceId:
                return("p_INSTANCE_ID");

            case TrackingParameterName.IsInstanceType:
                return("p_IS_INSTANCE_TYPE");

            case TrackingParameterName.LastCheck:
                return("p_LAST_CHECK");

            case TrackingParameterName.NextCheck:
                return("p_NEXT_CHECK");

            case TrackingParameterName.Order:
                return("p_ORDER");

            case TrackingParameterName.ParentContextGuid:
                return("p_PARENT_CONTEXT_GUID");

            case TrackingParameterName.ParentQualifiedName:
                return("p_PARENT_QUALIFIED_NAME");

            case TrackingParameterName.QualifiedName:
                return("p_QUALIFIED_NAME");

            case TrackingParameterName.TrackingDataItemId:
                return("p_TRACKING_DATA_ITEM_ID");

            case TrackingParameterName.TrackingProfile:
                return("p_TRACKING_PROFILE_XML");

            case TrackingParameterName.TypeFullName:
                return("p_TYPE_FULL_NAME");

            case TrackingParameterName.Version:
                return("p_VERSION");

            case TrackingParameterName.UserDataAssemblyFullName:
                return("p_USER_DATA_ASSEMBLY_NAME");

            case TrackingParameterName.UserDataBlob:
                return("p_USER_DATA_BLOB");

            case TrackingParameterName.UserDataKey:
                return("p_USER_DATA_KEY");

            case TrackingParameterName.UserDataNonSerialisable:
                return("p_USER_DATA_NON_SERIALISABLE");

            case TrackingParameterName.UserDataString:
                return("p_USER_DATA_STR");

            case TrackingParameterName.UserDataTypeFullName:
                return("p_USER_DATA_TYPE_NAME");

            case TrackingParameterName.UserEventId:
                return("p_USER_EVENT_ID");

            case TrackingParameterName.WorkflowDefinition:
                return("p_WORKFLOW_DEFINITION");

            case TrackingParameterName.WorkflowTypeId:
                return("p_WORKFLOW_TYPE_ID");

            case TrackingParameterName.WorkflowInstanceEventId:
                return("p_WORKFLOW_INSTANCE_EVENT_ID");

            case TrackingParameterName.WorkflowInstanceId:
                return("p_WORKFLOW_INSTANCE_ID");

            case TrackingParameterName.WorkflowInstanceStatusId:
                return("p_WORKFLOW_INSTANCE_STATUS");
            }

            throw new NotSupportedException(RM.Get_Error_CommandNameParameterNameNotSupported());
        }
Пример #4
0
        public String ResolveParameterName(TrackingCommandName commandName, TrackingParameterName parameterName)
        {
            switch (parameterName)
            {
            case TrackingParameterName.ActivityInstanceId:
                return("ActivityInstanceId");

            case TrackingParameterName.ActivityStatusEventId:
                return("ActivityExecutionStatusEventId");

            case TrackingParameterName.ActivityStatusId:
                return("ExecutionStatusId");

            case TrackingParameterName.ActivityXml:
                return("Activities");

            case TrackingParameterName.ActivityXoml:

                if (commandName == TrackingCommandName.InsertActivityAddedActions)
                {
                    return("AddedActivityAction");
                }

                if (commandName == TrackingCommandName.InsertActivityRemovedActions)
                {
                    return("RemovedActivityAction");
                }

                break;

            case TrackingParameterName.Annotation:
                return("Annotation");

            case TrackingParameterName.AssemblyFullName:
                return("AssemblyFullName");

            case TrackingParameterName.CallerContextGuid:
                return("CallerContextGuid");

            case TrackingParameterName.CallerInstanceId:
                return("CallerInstanceId");

            case TrackingParameterName.CallerParentContextGuid:
                return("CallerParentContextGuid");

            case TrackingParameterName.CallPath:
                return("CallPath");

            case TrackingParameterName.ContextGuid:
                return("ContextGuid");

            case TrackingParameterName.CreateDefault:
                return("CreateDefault");

            case TrackingParameterName.DataBlob:
                return("Data_Blob");

            case TrackingParameterName.DataNonSerialisable:
                return("DataNonSerializable");

            case TrackingParameterName.DataString:
                return("Data_Str");

            case TrackingParameterName.EventArgs:
                return("EventArg");

            case TrackingParameterName.EventArgsAssemblyFullName:
                return("EventArgAssemblyFullName");

            case TrackingParameterName.EventArgsTypeFullName:
                return("EventArgTypeFullName");

            case TrackingParameterName.EventDateTime:
                return("EventDateTime");

            case TrackingParameterName.EventId:
                return("EventId");

            case TrackingParameterName.EventOrder:
                return("EventOrder");

            case TrackingParameterName.EventType:
                return("EventTypeId");

            case TrackingParameterName.Exists:
                return("Exists");

            case TrackingParameterName.FieldName:
                return("FieldName");

            case TrackingParameterName.InitialisedDateTime:
                return("EventDateTime");

            case TrackingParameterName.InstanceId:
                switch (commandName)
                {
                case TrackingCommandName.DeleteInstanceTrackingProfile:
                case TrackingCommandName.GetInstanceTrackingProfile:
                case TrackingCommandName.UpdateInstanceTrackingProfile:
                    return("InstanceId");

                case TrackingCommandName.InsertWorkflowInstance:
                    return("WorkflowInstanceId");
                }
                break;

            case TrackingParameterName.IsInstanceType:
                return("IsInstanceType");

            case TrackingParameterName.LastCheck:
                return("LastCheckDateTime");

            case TrackingParameterName.NextCheck:
                return("MaxCheckDateTime");

            case TrackingParameterName.Order:
                return("Order");

            case TrackingParameterName.ParentContextGuid:
                return("ParentContextGuid");

            case TrackingParameterName.ParentQualifiedName:
                return("ParentQualifiedName");

            case TrackingParameterName.QualifiedName:
                return("QualifiedName");

            case TrackingParameterName.TrackingDataItemId:
                return("TrackingDataItemId");

            case TrackingParameterName.TrackingProfile:
                return("TrackingProfileXml");

            case TrackingParameterName.TypeFullName:
                return("TypeFullName");

            case TrackingParameterName.Version:
                return("Version");

            case TrackingParameterName.UserDataAssemblyFullName:
                return("UserDataAssemblyFullName");

            case TrackingParameterName.UserDataBlob:
                return("UserData_Blob");

            case TrackingParameterName.UserDataKey:
                return("UserDataKey");

            case TrackingParameterName.UserDataNonSerialisable:
                return("UserDataNonSerializable");

            case TrackingParameterName.UserDataString:
                return("UserData_Str");

            case TrackingParameterName.UserDataTypeFullName:
                return("UserDataTypeFullName");

            case TrackingParameterName.UserEventId:
                return("UserEventId");

            case TrackingParameterName.WorkflowDefinition:
                return("WorkflowDefinition");

            case TrackingParameterName.WorkflowInstanceEventId:
                return("WorkflowInstanceEventId");

            case TrackingParameterName.WorkflowInstanceId:
                return("WorkflowInstanceInternalId");

            case TrackingParameterName.WorkflowInstanceStatusId:
                return("TrackingWorkflowEventId");

            case TrackingParameterName.WorkflowTypeId:
                switch (commandName)
                {
                case TrackingCommandName.InsertActivities:
                    return("WorkflowTypeId");

                case TrackingCommandName.InsertWorkflow:
                    return("WorkflowId");
                }
                break;
            }

            throw new NotSupportedException(RM.Get_Error_CommandNameParameterNameNotSupported());
        }