12-19-2016 10:13 AM
Hello,
I want to override the alfresco ExporterActionExecuter java class.
In general I see that it is some kind of webscript, however not sure how to call that method using java.
How to register this specific 'webscript' ?
Whats the difference between Webscript and ActionExecuter?
I will be happy if someone provide some documentation and refer me what I have to read or answer to me.
Thank you in advance,
Mariya
12-19-2016 05:25 PM
The ExporterActionExecuter class is not a web script, it is an action executer. You can tell that by the package name and by the class that it extends, which is ActionExecuterAbstractBase.
An Action is a self-contained unit of operations that can be executed against zero or more nodes in the repository. Actions are executed by the action service. The code that triggers the action service to execute an action might come from something in the UI or a folder rule or any other place where Java code might be running.
For more help with actions, you might take a look at my tutorial on the subject.
A web script is a collection of files which is used to implement a RESTful endpoint. A web script follows the Model View Controller pattern. The controller can be implemented as JavaScript or Java. Some people in the community have done some work to support additional languages as well, but those two are, by far, the most common you will encounter.
Web scripts are meant to be invoked by clients making HTTP calls. So if you had some logic you wanted to run, and you wanted to invoke that logic from some process remote to the Alfresco process, you could put it in a web script controller. Without a web script controller, there is really no convenient way to make that invocation.
If you want to know more about web scripts, I have also written a tutorial that will give you a brief intro.
Finally, web scripts and actions can work together. For example, you might have an action called "ApproveDocument". Maybe it needs to set a flag on a document as well as a handful of other properties. You might call that action from a UI action in Share to start out. Later, someone says, "I'd like to be able to approve documents from the XYZ System." So you'd write a web script that would simply read some arguments from the request and then invoke the ApproveDocument action.
I hope this helps you understand the difference between Web Scripts and Actions and when you'd use them.
12-19-2016 05:25 PM
The ExporterActionExecuter class is not a web script, it is an action executer. You can tell that by the package name and by the class that it extends, which is ActionExecuterAbstractBase.
An Action is a self-contained unit of operations that can be executed against zero or more nodes in the repository. Actions are executed by the action service. The code that triggers the action service to execute an action might come from something in the UI or a folder rule or any other place where Java code might be running.
For more help with actions, you might take a look at my tutorial on the subject.
A web script is a collection of files which is used to implement a RESTful endpoint. A web script follows the Model View Controller pattern. The controller can be implemented as JavaScript or Java. Some people in the community have done some work to support additional languages as well, but those two are, by far, the most common you will encounter.
Web scripts are meant to be invoked by clients making HTTP calls. So if you had some logic you wanted to run, and you wanted to invoke that logic from some process remote to the Alfresco process, you could put it in a web script controller. Without a web script controller, there is really no convenient way to make that invocation.
If you want to know more about web scripts, I have also written a tutorial that will give you a brief intro.
Finally, web scripts and actions can work together. For example, you might have an action called "ApproveDocument". Maybe it needs to set a flag on a document as well as a handful of other properties. You might call that action from a UI action in Share to start out. Later, someone says, "I'd like to be able to approve documents from the XYZ System." So you'd write a web script that would simply read some arguments from the request and then invoke the ApproveDocument action.
I hope this helps you understand the difference between Web Scripts and Actions and when you'd use them.
12-30-2016 12:34 AM
Very nicely explained Jeff. Really helpful.
12-20-2016 05:35 AM
Thank you, Jeff.
It was very helpful.
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.