Esempio n. 1
0
        public IActionResult Run2(String id)
        {
            var m = new Run2Model()
            {
                Id        = id,
                Parameter = "{}"
            };

            return(View(m));
        }
Esempio n. 2
0
        public async Task <IActionResult> HttpPost(Run2Model model)
        {
            var prms = JsonConvert.DeserializeObject <ExpandoObject>(model.Parameter);

            if (prms != null && (prms as IDictionary <String, Object>).Count == 0)
            {
                prms = null;
            }
            var inst = await _engine.CreateAsync(new Identity()
            {
                Id = model.Id
            });

            await _engine.RunAsync(inst.Id, prms);

            return(LocalRedirect("/"));
        }