07-04-2017 11:55 AM
Dear community.
For my application on ADF I use Alfres Cocommunity (latest) as the Content Services and Activiti BPMN 2.0 Platform v. 6 as Process Services. Activiti deployed to Tomcat 9 on 8080 port, Alfres contains own Tomcat and started on port 9080.
In my Alfresco ADF app I configure the relevant ports and address.
In the configuration Activate file
"/opt/tomcat/tomcat-latest/webapps/activiti-app/WEB-INF/classes/META-INF/activiti-app/activiti-app.proportis"
added
"cors.enabled = true
security.csrf.disabled = true"
When I try to log in Alfresco ADF app I get an error message
"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."
How I can fix this ERROR?
07-07-2017 02:51 AM
Login attempt at "Process Services" only
Login attempt at "Content Services" only
Login attempt at "Content Services" and "Process Services"
I found that there is no authentication data in the request to the "process service".
When a request is sent to "Content Services", it contains a header "Request Payload": "
{userId: "admin", password: "admin"}" .
To the "process service" such data is not transmitted in one header.
07-07-2017 05:15 AM
Can you please give the exact versions of APS and ACS? For content, you should be running 5.2 or later, for process I think it is 1.6.1. Can you please confirm the versions?
07-07-2017 08:51 AM
As I wrote above, as process service engine is used Activiti v.6.0.
I plan to do the project entirely on the community version (ADF+Alfresco Community + Activiti).
07-07-2017 09:01 AM
07-07-2017 09:02 AM
07-07-2017 09:07 AM
Yes, I followed this instruction, but in the end I make a mistake. This was the reason why I created the question))
07-07-2017 10:13 AM
Maybe I did not clearly describe my intentions.
I deployed Alfresco (port 9080) and Activiti (port 8080) on the computer on the network with IP 192.168.122.79.
The application on Alfresco ADF I develop on another computer in a network with IP 192.168.122.1
The application was created by generating it as proposed in the instruction with the address of the services.
When connecting from the application to Alfresco (ACS) to the address 192.168.122.79:9080 there are no problems.
When I connect from the application to the Activation address 192.168.122.79:8080 I receive an error message "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."
There is an error message in the browser console:
"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."
07-07-2017 11:13 AM
You need to configure CORS separately for ACS and APS. It is very likely you do not have it configured for Activiti.
07-07-2017 11:17 AM
You can try following this article: alfresco-ng2-components/ALFRESCOCORS.md at master · Alfresco/alfresco-ng2-components · GitHub For instance having an nginx running at 192.168.122.79
07-07-2017 11:59 AM
Above I pointed out that I followed the instructions "Enabling CORS on Activiti BPM "and made the appropriate configurations.
In the configuration Activate file
"/opt/tomcat/tomcat-latest/webapps/activiti-app/WEB-INF/classes/META-INF/activiti-app/activiti-app.properties"
added
"cors.enabled = true
security.csrf.disabled = true"
And it does not work....
Explore our Alfresco products with the links below. Use labels to filter content by product module.