1 app.controller('droolsViewController', function ($scope,modalService,droolsService){
4 $scope.resultsString = "";
6 droolsService.getDroolDetails(droolsService.getSelectedFile()).then(function(data){
9 $scope.postDroolsBean = JSON.parse(j.data);
10 //execute($scope.postDroolsBean);
13 console.log("failed");
19 $scope.execute = function(postDroolsBean) {
20 console.log(postDroolsBean);
21 var uuu = "post_drools/execute";
22 var postData={postDroolsBean:postDroolsBean};
27 contentType: 'application/json',
28 data: JSON.stringify(postData),
29 success : function(data){
30 $scope.$apply(function(){
31 $scope.resultsString=data.resultsString;
32 console.log($scope.resultsString);
35 error : function(data){
37 modalService.showFailure("Fail","Error while executing: "+ data.responseText);