StartAppChain() public method

Starts app-chain
public StartAppChain ( string appCode, string>.Dictionary pars ) : StartAppRs
appCode string code of app-chain
pars string>.Dictionary app-chain parameters
return StartAppRs
コード例 #1
0
        public ActionResult StartJob(string selectedId)
        {
            var _srv = new SqApiServiceFacade(Options.ApiUrl);
            var _appIdMelanoma = _srv.StartAppChain(SqApiServiceFacade.MELANOMA_APP_CHAIN_ID, new Dictionary<string, string> { { "dataSourceId", selectedId } });
            var _appIdVitD = _srv.StartAppChain(SqApiServiceFacade.VITD_APP_CHAIN_ID, new Dictionary<string, string> { { "dataSourceId", selectedId } });

            return RedirectToAction("CheckApp", new { _appIdMelanoma.jobId, jobId2 = _appIdVitD.jobId });
        }
コード例 #2
0
        private Tuple<long, long> GetJobId(SendInfo info)
        {
            var _srv = new SqApiServiceFacade(Options.ApiUrl, info.UserName);
            var _rs = _srv.StartAppChain(SqApiServiceFacade.MELANOMA_APP_CHAIN_ID, new Dictionary<string, string> { { "dataSourceId", info.DataFileId } });
            var _rs2 = _srv.StartAppChain(SqApiServiceFacade.VITD_APP_CHAIN_ID, new Dictionary<string, string> { { "dataSourceId", info.DataFileId } });

            while (true)
            {
                var _appStatus = _srv.CheckAppChainStatus(Convert.ToInt64(_rs.jobId));
                var _appStatus2 = _srv.CheckAppChainStatus(Convert.ToInt64(_rs2.jobId));
                if (_appStatus == "Completed" && _appStatus2 == "Completed")
                    break;
                Thread.Sleep(5000);
            }

            return Tuple.Create(_rs.jobId, _rs2.jobId);
        }