Ejemplo n.º 1
0
        public async Task ExecuteAsyncjson()
        {
            Organe organe = new Organe {
                nomOrgane = "Tête", typeMaux = "MauxContinue", localisation = "frontale"
            };
            Medicament medicament   = new Medicament();
            Context    insertObject = new Context(medicament, organe);

            var executer = new KieExecuter
            {
                HostUrl      = "http://127.0.0.1:8090",
                AuthUserName = "******",
                AuthPassword = "******",
                LookUp       = "defaultKieSession" /*StatelessKieSession,defaultKieSession*/
            };

            //Insert object to KieServer session
            executer.Insert(insertObject, "medic.Context");

            //objects est l'out-identifier ("get-objects":"out-identifier" : "objects")
            executer.GetObjects("obj");

            executer.FireAllRules();

            //executer.ExecuteAsync(nom container)
            var response = await executer.ExecuteAsync <Context>("medi2");

            var bodyResponse = response.ResponseBody;


            var res = response.ResponseType.Equals(TypeEnum.Success);
        }
Ejemplo n.º 2
0
 public Context(Medicament medicament, Organe organe)
 {
     this.medicament = medicament;
     this.organe     = organe;
 }
Ejemplo n.º 3
0
 public void setOrgane(Organe organe)
 {
     this.organe = organe;
 }