예제 #1
0
        //
        public static Process Create(Brain brain)
        {
            Process process = new Process(brain);

            brain.ProcessCreated(process);
            process.Schedule(brain.Scheduler);
            return(process);
        }
예제 #2
0
        //
        protected Process Create(Proposal proposal)
        {
            Process process = new Process(this, proposal);

            process.Context.Clauses.AddRange(Context.Clauses);
            if (proposal.Context != null)
            {
                process.ImportContext(proposal.Context);
            }
            //context.Post(proposal.Message);
            proposal.Callback(process, proposal.Expert, proposal.Message);
            Processes.Add(process);
            Brain.ProcessCreated(process);
            process.Schedule(Process);
            return(process);
        }