Questions tagged [alfresco-webscripts]

Web scripts provide a way to write small extensions to Alfresco using JavaScript and FreeMarker.

Alfresco web scripts provide a unique way to programmatically interact with the Alfresco content application server. Unlike other interfaces exposed by Alfresco, web scripts offer a RESTful API for the content residing in the content repository. The REST (Representational State Transfer) web architecture is based on HTTP requests and responses, URIs (Uniform Resource Identifiers), and document types. Web scripts let you implement your own RESTful API without tooling or Java knowledge, requiring only a text editor. This approach to developing an Alfresco API means that web scripts offer many advantages over existing technologies, including ease and speed of development, and flexibility in API design. By focusing on the RESTful architectural style, web scripts let you build custom URI-identified and HTTP accessible content management web services backed by the Alfresco content application server.

Web scripts provide RESTful access to content held within your Alfresco content repository. You can place controls on your content to manage it and provide uniform access for a wide variety of client applications and services, such as a browser, portal, search engine, or custom application. Because of the inherent distributed nature of this interface, all Alfresco content repositories within the enterprise can resemble one logical collection of inter-related documents (like the web), letting you apply web technologies such as caching, authentication, proxies, and negotiation to your repository resources.

You can build your own RESTful interface using lightweight scripting technologies (such as JavaScript and FreeMarker), allowing you to arbitrarily map any content in the repository to resources on the web, or you can use out-of-the-box web scripts that already encapsulate many of the mappings. The Alfresco CMIS (Content Management Interoperability Services) AtomPub binding is implemented as a series of web scripts.

You can use web scripts for various solutions, such as:

  • Integrating Alfresco with third party systems Providing feeds
  • Developing data services Developing UI services such as portlets
  • Customizing search Acting as a back-end to client tools, such as
  • Orbeon Forms Integrating with Microsoft Office
  • Developing Facebook applications
  • Building UI components in Alfresco Surf

Source: http://docs.alfresco.com/5.1/concepts/ws-overview.html

352 questions
0
votes
1 answer

Web Script error 500 template ignored

I wrote an Alfresco Web Script that renders CSV, it works well. In a particular case, I want the Web Script to return an error 500 as JSON, so I wrote a .json.500.ftl template for it. PROBLEM: The error 500 always shows up as HTML (the default Web…
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
0
votes
2 answers

How to display all the properties of the selected reviewers?

Consider the business process "Review and Approve (one or more reviewers) - Assign a review task to multiple reviewers". When I choose reviewers I see only their properties cm:userName. How to display all the properties of the type cm:person? For…
user1134181
0
votes
1 answer

How to override some of ajax based picker logic?

Alfresco Community v5.2 (other versions too) includes some of preconfigured workflows that available on the page /share/page/start-workflow I'm interested in "Review and Approve (one or more reviewers) - Assign a review task to multiple…
user1134181
0
votes
1 answer

Not able to get organization form node in alfresco

Using Alfresco Community 5.0.d and not able to get organization from node. File: pickerresults.lib.js Method: createPersonResult(node) function createPersonResult(node) { var personObject = { typeShort: node.typeShort, …
nikhil84
  • 3,235
  • 4
  • 22
  • 43
0
votes
1 answer

Alfresco selective content synchronization to another instance

In continuation with my previous question, I would like to selectively choose documents from my repository and then sync them to a target repository. If possible lets say choose the documents in a folder, click on Selected Items menu dropdown & have…
Venkat
  • 1,264
  • 1
  • 12
  • 21
0
votes
1 answer

Make Alfresco Web Script show error 500 as JSON rather than HTML

I am writing an Alfresco Web Script that will be consumed by external computers. When I throw a WebScriptException, I would like the error 500 to come with an error page in JSON, rather than HTML, so that the external computers can parse it. Right…
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
0
votes
1 answer

open "view details" page in new tab at alfresco workflow form

open "view details" page in new tab at alfresco workflow accept/reject page but ** also to retain focus on the current page (approval/rejection) page** with target=_blank focus on current page is getting lost ****overriding object-finder.js…
k10ml
  • 116
  • 9
0
votes
2 answers

How to add company name field in admin console (new user) alfresco community?

I'm using Alfresco Community 5.0.d and it does not show the fields for company info. If I search for user then it shows all details but don't let me add company info while creating a user. So far I came across user.js file at…
nikhil84
  • 3,235
  • 4
  • 22
  • 43
0
votes
1 answer

Download pdf report not working in alfresco community

I'm using alfresco community 5.0.d and when I try to download a pdf report then I get "Failed to load PDF Document". Also in console, there is no error. Below is screenshot of download report option. How could I fix this issue of pdf loading? Also…
nikhil84
  • 3,235
  • 4
  • 22
  • 43
0
votes
2 answers

Workflow assignee search result in alfresco community 5.0.d

I'm using Alfresco Community 5.0.d and I trying to change the search picker result of workflow assignee. Let me know how to achieve this. Refer to below screenshot. I want to change the search result coming in this picker. Please let me know the…
nikhil84
  • 3,235
  • 4
  • 22
  • 43
0
votes
2 answers

Alfresco workflow get triggered multiple times

I am facing problem in triggering workflow. I have applied rule on a Folder Definition of rule : i) When Item are created on enter this folder ii) Name End With .xml iii)Execute Script Script is function startWorkflow() { var workflow =…
Varun Chawla
  • 303
  • 1
  • 6
  • 19
0
votes
1 answer

Form in dashlet query

I have been trying to get a form in an Aukai dashlet to work for over a week now. It was realativly easy to get it to appear on the dashboard but nothing I have done has resulted in any this being sent to the server! Has anyone or know of anyone…
Ian
  • 412
  • 1
  • 4
  • 18
0
votes
1 answer

How to enable server-side JavaScript debugger?

I have Alfresco Community v5.2.0 and Alfresco Share v5.2.c that running on Apache Tomcat 7.0 Servlet/JSP Container, installed on CentOS 7.3. As far as I know, I can use two approach to enable the JavaScript debugging: Enable the debugger for every…
user1134181
0
votes
1 answer

Site thumbnail not coming in alfresco community

I'm using Alfresco Community 5.0.d and when I search for a site in a live search, I don't get the site thumbnail. Not Found error: http://127.0.0.1:8080/share/res/components/images/filetypes/generic-site-48.png Below is screenshot of a live search…
nikhil84
  • 3,235
  • 4
  • 22
  • 43
0
votes
2 answers

no result coming in search in alfresco community

Using Alfreco community 5.0.d and getting below error which is not letting me find ay result on search. ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [http-bio-8080-exec-4] Exception from executeScript - redirecting to status…
nikhil84
  • 3,235
  • 4
  • 22
  • 43