Пример #1
0
        /// <summary>
        /// Stops the workflow runtime.
        /// </summary>
        public static void Stop()
        {
            if (current == null)
            {
                throw new ApplicationException("Runtime not created.");
            }

            lock (currentLock)
            {
                current.StopWorkflowRuntime();
                current = null;
            }
        }
Пример #2
0
        /// <summary>
        /// Starts the workflow runtime.
        /// </summary>
        public static void Start(DatabaseSettings databaseSettings)
        {
            if (current != null)
            {
                throw new ApplicationException("Runtime already created.");
            }

            lock (currentLock)
            {
                current = new SampleWorkflowRuntime(databaseSettings);
                current.InitialiseAndStartWorkflowRuntime();
            }
        }