cancel
Showing results for 
Search instead for 
Did you mean: 

Calling web page from script task

ojaro
Champ in-the-making
Champ in-the-making
Hi all,

Is there a way to call an external web page/service from a script task using JavaScript?

I did a test trying to use XMLHttpRequest, but as expected got the folllowing error:

Exception:"XMLHttpRequest" is not defined

Then I came across this article:

http://www.unorganizedmachines.com/site/software-and-technology/34-software-development/97-calling-w...

Anyone know how to convert this for Activiti? For example, it does not seem like baseJavaScriptExtension exists in Activiti.

Big thanks for your help in advance.

Regards,

Olli
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
Are you using Activiti in an Alfresco-environment? If not, you should add additional beans (see userguide, configuration section). These beans are just java-objects. You can use these beans in your scripts by calling it's methods, passing in any data you want. In the java-implementation, you can use any HTTP-framework you want to do the heavy lifting.

ojaro
Champ in-the-making
Champ in-the-making
Hi, I am using Activiti on it's own.

Thanks, I will try your advice.

jbarrez
Star Contributor
Star Contributor
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.