Use community version Activity when creating Alfresco ADP application

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

Use community version Activity when creating Alfresco ADP application

Dear Community
Make a substitute. How can I use the community version of the Activity when creating the Alfresco ADP application?

I added the following configuration settings to the activiti-app.properties file(/opt/tomcat/tomcat-latest/webapps/activiti-app/WEB-INF/classes/META-INF/activiti-app/activiti-app.properties).

cors.enabled=true
security.csrf.disabled=true


When I start the Alfresco ADP application and use Activation as the process service, an error occurs

"Request has been terminated Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc."

In the browser console error

"XMLHttpRequest cannot load http://192.168.122.79:8080/activiti-app/app/authentication. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access."

3 Replies
ryandawson
Alfresco Employee

Re: Use community version Activity when creating Alfresco ADP application

I take it you mean ADF rather than ADP? If so it might be best to post under the ADF forum Application Development Framework . My impression is that those flags are not supported in community (they are in enterprise) and for community it would instead be necessary to implement a filter - java - POST request to Activiti REST API causes CORS issue when using Content-Type:application/json ... 

varlok
Active Member II

Re: Use community version Activity when creating Alfresco ADP application

Yes, really a misprint) I mean ADF. 

I understood correctly - in order to realize the opportunity to work with POST requests (including using Alfresco ADP), it is necessary to implement filter and make it part of Activiti through Spring Bean?

ryandawson
Alfresco Employee

Re: Use community version Activity when creating Alfresco ADP application

I think there is more than one way to do it but you could consider adding an appropriate filter of type FilterRegistration.Dynamic to the ServletContext in the WebConfigurer (Activiti/WebConfigurer.java at 6.0-release · Activiti/Activiti · GitHub ).