REST Call Task Error

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member II

REST Call Task Error

I'm trying to call a REST API using Activiti Process Services, and I get an error while testing that says "Response message: error while creating http client: null". I'm using 'www.google.com' as the link just for testing, so I know that's valid. I don't have any headers or body included, and the REST call is the only task in the process. Any ideas? 

9 Replies
Highlighted
Intermediate

Re: REST Call Task Error

I have attached a simple example app of how to use the REST call in Activiti Enterprise.

Also attached the Endpoint configuration screen (I dont believe the endpoint is imported).

Greg

Highlighted
Active Member II

Re: REST Call Task Error

Thanks for the response, Greg! I tried the steps you outlined, and it still doesn't work. The process gets stuck on the REST Call, and the logs show: 

3:35:26,784 [pool-1-thread-1] ERROR org.activiti.engine.impl.interceptor.CommandContext - Error while closing command context
org.activiti.engine.ActivitiException: error while executing http request: https://jsonplaceholder.typicode.com/posts/1

...

Caused by: org.apache.http.conn.HttpHostConnectException: Connect to jsonplaceholder.typicode.com:443 [jsonplaceholder.typicode.com/104.31.87.157, jsonplaceholder.typicode.com/104.31.86.157] failed: Connection timed out (Connection timed out)

...

Caused by: java.net.ConnectException: Connection timed out (Connection timed out)

Is this a server-side issue that I need to fix - some kind of CORS configuration? 

Thanks!

Highlighted
Intermediate

Re: REST Call Task Error

For some reason your server is not able to make an outbound connection:

Connection timed out (Connection timed out)

Likely tat was the problem with google as well.

Greg

Highlighted
Intermediate

Re: REST Call Task Error

Jay,

This is certainly a server side issue, apologies I did no make this clear in my first update.

Your server is not able to access the URL and the connection is timing out.

This has nothing to do with CORS.

Greg

Highlighted
Active Member II

Re: REST Call Task Error

Thanks Greg! We've connected Activiti to an Alfresco installation that runs on a different server, and the strange thing is that the API calls work using the built in Alfresco endpoints. I know that we installed the Alfresco server's certificates on the Activiti machine, so maybe it's something to do with that. I'll try and figure out what's going on. 

Highlighted
Customer

Re: REST Call Task Error

I have got a similar issue. The REST API works from REST Task, but not from the server (called from java class library). jvaidya how did you manage to fix yours

Highlighted
Community Manager
Community Manager

Re: REST Call Task Error

Hi @sargurohshoeb 

Have you considered submitting a support request?

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
Highlighted
Customer

Re: REST Call Task Error

Hi @EddieMay 

Managed to locate the custom task running java code to create a folder in ACS which already exist and hence 409.

Worked fine now with a new folder name.

SS

 

Highlighted
Community Manager
Community Manager

Re: REST Call Task Error

Hi @sargurohshoeb 

Great news that you found a fix - thanks too for the update.

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!