Example #1
0
        private void AddDoor(DoorService service, DoorControl door)
        {
            Guid id = Guid.NewGuid();

            service.AddDoor(id, door);

            // Now add in a workflow for the door
            WorkflowInstance instance = _runtime.CreateWorkflow(typeof(DoorsWorkflow.DoorFlow), null, id);

            door.WorkflowID = id;
            door.Runtime    = _runtime;

            instance.Start();
        }
Example #2
0
        public MainForm()
        {
            InitializeComponent();

            _runtime = new WorkflowRuntime();

            ExternalDataExchangeService edes = new ExternalDataExchangeService();

            _runtime.AddService(edes);

            _service = new DoorService();

            edes.AddService(_service);

            _runtime.WorkflowCompleted += new EventHandler <WorkflowCompletedEventArgs>(OnWorkflowCompleted);
            _runtime.StartRuntime();

            AddDoor(_service, frontDoor);
            AddDoor(_service, backDoor);
        }