Ejemplo n.º 1
0
        public Mainform()
        {
            InitializeComponent();
            
            this.runtime = new WorkflowRuntime();

            runtime.WorkflowCompleted += new EventHandler<WorkflowCompletedEventArgs>(runtime_WorkflowCompleted);

            // Set up runtime to unload workflow instance from memory to file using FilePersistenceService
            FilePersistenceService filePersistence = new FilePersistenceService(true);
            runtime.AddService(filePersistence);

            // Add document approval service
            ExternalDataExchangeService dataService = new ExternalDataExchangeService();
            runtime.AddService(dataService);
            documentService = new DocumentApprovalService(this);
            dataService.AddService(documentService);

            // Search for workflows that have previously been persisted to file, and load into the listview control.
            // These workflows will be reloaded by the runtime when events are raised against them.
            LoadWorkflowData();

            // Start the runtime
            runtime.StartRuntime();
        }
Ejemplo n.º 2
0
        public Mainform()
        {
            InitializeComponent();

            this.runtime = new WorkflowRuntime();

            runtime.WorkflowCompleted += new EventHandler <WorkflowCompletedEventArgs>(runtime_WorkflowCompleted);

            // Set up runtime to unload workflow instance from memory to file using FilePersistenceService
            FilePersistenceService filePersistence = new FilePersistenceService(true);

            runtime.AddService(filePersistence);

            // Add document approval service
            ExternalDataExchangeService dataService = new ExternalDataExchangeService();

            runtime.AddService(dataService);
            documentService = new DocumentApprovalService(this);
            dataService.AddService(documentService);

            // Search for workflows that have previously been persisted to file, and load into the listview control.
            // These workflows will be reloaded by the runtime when events are raised against them.
            LoadWorkflowData();

            // Start the runtime
            runtime.StartRuntime();
        }