Calling web page from script task
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2014 11:40 AM
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
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
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2014 03:32 AM
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.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2014 04:13 PM
Hi, I am using Activiti on it's own.
Thanks, I will try your advice.
Thanks, I will try your advice.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2014 05:19 AM
Even in a script task you can do a call to a URL. See https://github.com/jbarrez/activiti-advanced-scripting/blob/master/src/test/resources/org/activiti/t... for example
