Hello,
I would like to make a Rest call to automaticly Claim the task to the user who click on it.
That my way:
camForm.on(‘form-loaded’, function() {
$scope.assignTask();
}
inject(['Uri', '$http', function (Uri, $http) {
$scope.assignTask = function () {
return $http.post(Uri.appUri('engine://engine/:engine/task/' + camForm.taskId + '/claim'), {
headers: {
"Content-Type": "application/json;charset=utf-8"
},
body: {
"userId": "demo"
}
});
}
}]);
I dont have Error but it’s not work…
I try the UnClaim and it’s works fine
inject(['Uri', '$http', function (Uri, $http) {
$scope.unAssignTask = function () {
console.log("task id = "+camForm.taskId );
return $http.post(Uri.appUri('engine://engine/:engine/task/' + camForm.taskId + '/unclaim'), {});
}
}]);
So what i do wrong ? Can i have any Help ??
Cordially,