cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Workflow (execute script) Making HTTP Call

peterstb
Champ in-the-making
Champ in-the-making
Hi All,

I would like to have a workflow action, where upon content landing or being created in a space, a simple workflow is executed, where the action is "execute a script", and in that javascript file and HTTPRequest is invoked.  Essentially, I would like to simply invoke a URL when content lands in an Alfresco space.

Is this doable?  Does anyone have any sample code that can help me accomplish this?

I'm a newbie to Alfresco, and am by no means an expert in Javascript.  I am aware of the XMLHTTPRequest approach, but don't understand if that is something that can be made available through the Alfresco environment/workflow.

Any assistance would be greatly appreciated!

Thanks,
Toddd
1 REPLY 1

zaizi
Champ in-the-making
Champ in-the-making
You can create a Custom Action that can be configured to be executed using content rules. The wiki http://wiki.alfresco.com/wiki/Custom_Actions and Alfresco SDK have examples on how do write a custom action.

In Java you'll be able to call external URL using a library like HTTPClient: http://hc.apache.org/httpclient-3.x/