Call a back end web script from another one

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

Call a back end web script from another one

Is it possible to call a back end web script from another back end web script? If so, are there some best practices? Alfresco Platform version 6.1.2-ga. Thanks in advance.

1 Reply
abhinavmishra14
Advanced

Re: Call a back end web script from another one

If both webscripts (assuming both webscripts are java backed) are defined within same repository layer, it does't make sense to call one from another. If there is any specific functionality you want to re-use, you should create a common method which can be used for two or more webscripts so you get the result in one call instead of multiple calls.

In general, you can call a backend webscript from another (no hard and fast rule) if you have something very special use case, one case would be a mix of java backed and js based webscript.  

I would suggest to create a utility and re-use the functonality in both webscripts if possible. 

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)