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
1
vote
1 answer

Alfresco Workflow - multiple assignee and java code

I'm trying to create a workflow that have multiple assignees (done) and launch to them, a task. When I start the workflow, I want to run a java code that makes modifications on file that the task has been assigned. How can I run this java code on…
PRVS
  • 1,612
  • 4
  • 38
  • 75
1
vote
1 answer

How to update Aspect metadata in alfresco using c# do net code?

In alfresco I have created a custom aspect (ex. studentAspect). In my asp.net site, I wanna apply this aspect on a specific document and update the metadata values (ex. studentName, studentGrdae...etc) using any type of integration (ex. dotCMIS,…
1
vote
2 answers

Force Alfresco thumbnail creation via REST

I am trying to force the creation of a custom Alfresco content, which contains a image/jpeg. I create the content with a custom WebScript. However, when I try to retrieve the preview, I get an error, as the Thumbnail was not found. The url I use to…
Manu
  • 4,019
  • 8
  • 50
  • 94
1
vote
1 answer

HTTP Status 404 - /alfresco/testCMISfromJS.html

I'm trying to run HTML file on Alfresco on folder (alfrescodir)/tomcat/webapps. I try to run http://localhost:8080/alfresco/testCMISfromJS.html, but I got the error: HTTP Status 404 - /alfresco/testCMISfromJS.html type Status report message…
PRVS
  • 1,612
  • 4
  • 38
  • 75
1
vote
1 answer

Alfresco: Web scripts url mapping behaves differently when written in Java vs. Javascript

I had come across a problem with web scripts and their URL patterns and behavior in Alfresco, depending whether the web script is written in Java or JavaScript. Since it took me some time to figure it out, I want to share it here. Original post in…
Mathias Conradt
  • 28,420
  • 21
  • 138
  • 192
1
vote
1 answer

Alfresco connected user in Alfresco webscript

In a Alfresco webscript I want to get connected user. In share webscript I know there is a root object called "user" which allows us to get connected user properties. But in Alfresco webscript this root object is undefined. Actualy I have to…
soung
  • 1,411
  • 16
  • 33
1
vote
1 answer

Is there any way to leave the log regarding which file was compressed at alfresco?

Is there any way to leave the log regarding which file was compressed at alfresco? This is the route I know that can compress the file. when using CIFS When clicking the downloads as zip button
user3395249
  • 69
  • 1
  • 7
1
vote
1 answer

Register webscript in alfresco 5

I'd like to register a custom webscript in a alfresco 5 installation. To get a grip on the matter i started with this turorial: http://docs.alfresco.com/5.0/tasks/ws-config.html It basically says: Login as admin, go to Data Dictionary > Web Scripts…
Nico O
  • 13,762
  • 9
  • 54
  • 69
0
votes
0 answers

Alfresco Community Edition 6.2 - Login Issue

I have login issue with Alfresco Community Edition 6.2 where the logging of users is taking more than 3minutes to login to Alfresco. When I tried to upgrade from Alfresco 5.1 to Alfresco 6.2 in Windows Server, this login issue is shown in log file…
0
votes
1 answer

How to send data from ajax call to Webscript in Alfresco?

I am working with Alfresco Share 5.2 and currently developing new feature. Must say that I am new in Alfresco. I need to get window location by clicking on button in js, to trigger ajax call and to get window.location.href. After that I need to send…
Mike1988B
  • 57
  • 5
0
votes
1 answer

Context initialization failed Alfresco

I have Alfresco Community Edition 5.2. The project has been cloned from GitHub repository, and after that I cannot run it. I am getting the following error at catalina.out file: 2023-02-02 13:16:49,623 ERROR [web.context.ContextLoader]…
Mike1988B
  • 57
  • 5
0
votes
0 answers

how to implement pop up custom error message using throw new error inside workflow other than start event in alfresco version 7.0 and up

The problem here is that when using alfresco version 6 the use of throw new error is able to be used as a validation method inside of a workflow, the use of throw new error here is enabling us to pop up an error message for the user stating what is…
0
votes
0 answers

Freemarker TemplateModelException src parameter missing in template

Running the Alfresco AIO archetype default project, SDK version 4.0.0-beta-1 Testing the share modifications I bump into following error on the sample-page: 2022-12-01 09:58:45,588 ERROR [freemarker.runtime] [http-nio-8080-exec-3] Error executing…
0
votes
1 answer

How to extract the text from (bs4.element.Tag)

How can I extract the "Data Engineer" text from Data Engineer Sample Code should be fine.
0
votes
0 answers

Alfresco - ADF - modify list value of adf-content-metadata-card

I want to modify one of the properties in adf-content-metadata-card , for example in order to modify a property of type "text" adf suggests for me a textbox, for my case if the user would like to modify a property I want adf to suggest for me a…