public HShelfFramework(string architectural_code)
        {
            this.architectural_code = architectural_code;

            core_services             = new WorkflowCoreServices();
            platform_services         = new SAFePlatformServices();
            platform_services.Address = "http://127.0.0.1/PlatformServices.asmx";
            baseFramework             = (WorkerObject)((ManagerObject)platform_services.Session).WorkerFramework;

            workflow_handle = core_services.openWorkflowSession(architectural_code, platform_services);

            this.app_name = core_services.getAppName(workflow_handle);

            core_services.instantiate(workflow_handle, "workflow");
        }
예제 #2
0
            private void init(string architectural_code, ProvideContracts provide_contracts)
            {
                this.architectural_code = architectural_code;

                core_services             = new WorkflowCoreServices();
                platform_services         = new SAFePlatformServices();
                platform_services.Address = "http://127.0.0.1/PlatformServices.asmx";

                workflow_handle = core_services.openWorkflowSession(architectural_code, platform_services);
                this.app_name   = core_services.getAppName(workflow_handle);

                core_services.registerContract(workflow_handle, "application", "");
                core_services.registerContract(workflow_handle, "workflow", "");
                provide_contracts();

                core_services.deploy(workflow_handle, "platform_SAFe");

                core_services.instantiate(workflow_handle, "platform_SAFe");
                core_services.instantiate(workflow_handle, "swl_port");
                core_services.instantiate(workflow_handle, "application");
                core_services.instantiate(workflow_handle, "workflow");

                baseFramework = (WorkerObject)((ManagerObject)platform_services.Session.Framework).WorkerFramework;
                Console.WriteLine(this.app_name + "-workflow");
                foreach (string k in baseFramework.UnitOf.Keys)
                {
                    Console.WriteLine("UnitOf[{0}] !", k);
                }
                ((IWorkflowKind)(baseFramework.UnitOf[this.app_name + "-workflow"])).CoreServices = core_services;

                Thread run = new Thread(new ThreadStart(delegate
                {
                    core_services.run(workflow_handle, "application");
                    core_services.run(workflow_handle, "workflow");
                }));

                run.Start();
            }