cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti-rest invoke issue

narranil2
Champ in-the-making
Champ in-the-making
Acitivi enterprise edition rest.
3 REPLIES 3

hari
Star Contributor
Star Contributor
What's the REST endpoint you are trying to use ? What's the issue ?

narranil2
Champ in-the-making
Champ in-the-making
I've implemented the activiti-rest end point under com.activiti.extension.rest package in enterprise version of Activiti(1.4.1).Please find the snippet of the code below.

Once I try to configure this end point for rest service call on the dropdown list I'm getting 401-Unauthorized error.

I've defined the end point and provided the Authenticated header for the same.Still I'm not able to invoke this rest point under the drop down list.

but once I login and invoke the following end point in the browser I'm getting the results.

http://localhost:8080/activiti-app/app/account/currencies

Copied the same class under com.activiti.extension.api package too with the below request mapping

@RestController("TimeOffController")
@EnableAutoConfiguration
@RequestMapping({"/enterprise/account"})
public class DealOnboardingRestEndPoint {


@RestController("TimeOffController")
@EnableAutoConfiguration
@RequestMapping({"/account"})
public class TimeTrackRestController {

@RequestMapping({"/test"})
@ResponseBody
public String home() {
  return "Hello Anil Welcome to Deal onbording App!";
}

@RequestMapping(value={"/currencies"}, method=RequestMethod.GET, produces = "application/json")
public Set<Currency> getAllCurrencies() {
  Set<Currency> aCurrencySet = Currency.getAvailableCurrencies();

  System.out.println("Available currencies:::"+aCurrencySet.size());

  for (Currency currency : aCurrencySet) {

   System.out.println("Currency Code::::"+ currency.getCurrencyCode());
  }
  return aCurrencySet;

}

abbask
Champ on-the-rise
Champ on-the-rise
I believe i've replied this on your previous post - https://forums.activiti.org/content/activiti-rest-end-point