Exemple #1
0
        private static void Main()
        {
            var workFlow = new WorkFlow();

            workFlow.AddActivity(new UploadVideo());
            workFlow.AddActivity(new CallWebService());
            workFlow.AddActivity(new SendEmail());
            workFlow.AddActivity(new ChangeVideoStatus());
            WorkFlowEngine.Run(workFlow);
        }
        static void Main(string[] args)
        {
            Workflow workFlow = new Workflow();

            workFlow.AddTask(new VideoUploader());
            workFlow.AddTask(new ChangeStatus());

            WorkFlowEngine engine = new WorkFlowEngine();

            engine.Run(workFlow);
        }
Exemple #3
0
        static void Main(string[] args)
        {
            var workFlow = new WorkFlow();

            workFlow.AddWorkflow(new SendMessage());
            workFlow.AddWorkflow(new GenerateSchema());

            var workFlowEngine = new WorkFlowEngine();

            workFlowEngine.Run(workFlow);
        }
        public static void Run()
        {
            var workflow = new WorkFlow();

            workflow.Add(new VideoUploader());
            workflow.Add(new VideoEncoder());
            workflow.Add(new MailSender());
            workflow.Add(new StatusChanger());
            var engine = new WorkFlowEngine();

            engine.Run(workflow);
        }
Exemple #5
0
        static void Main(string[] args)
        {
            var workflow = new Workflow();

            workflow.Add(new UploadVideo());
            workflow.Add(new NotifyWebService());
            workflow.Add(new NotifyVideoOwner());
            workflow.Add(new UpdateDatabase());

            var workflowEngine = new WorkFlowEngine();

            workflowEngine.Run(workflow);
        }
        private static void Main(string[] args)
        {
            var workFlow = new Workflow();

            workFlow.Add(new VideoUploader());
            workFlow.Add(new CallWebService());
            workFlow.Add(new SendEmail());

            var engine = new WorkFlowEngine();

            engine.Run(workFlow);

            Console.ReadLine();
        }
Exemple #7
0
        public void Exercise()
        {
            var workFlowEngine = new WorkFlowEngine();
            var activitiesList = new List <IActivity>
            {
                new Upload(),
                new CallService(),
                new SendEmail(),
                new Status()
            };
            var workFlow = new WorkFlow(activitiesList);

            workFlowEngine.Run(workFlow);
        }
Exemple #8
0
        static void UseWorkFlow()
        {
            var workFlow = new WorkFlow();

            workFlow.Add(new VideoUploador());
            workFlow.Add(new SendEmail());
            workFlow.Add(new CallWebService());
            workFlow.Remove(new CallWebService());

            var engine = new WorkFlowEngine();

            engine.Run(workFlow);

            Console.ReadLine();
        }