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-04-2017 11:59 AM
There was a section in 1.6.0 release note on the "app.config.json" file. The client looks for the config file in the root of the web app. The config should point to your custom host/port.
07-04-2017 01:26 PM
I have config in my app.component.ts file.
ecmHost: string = 'http://192.168.122.79:9080';
bpmHost: string = 'http://192.168.122.79:8080';
And I created "app.config.json":
{
"ecmHost": "http://192.168.122.79:9080",
"bpmHost": "http://192.168.122.79:8080",
"application": {
"name": "Alfresco"
}
}
But the error remains...
07-04-2017 01:46 PM
Could you provide more details on the application? Is it generated? what versions are used, etc? Are you sure you don't have typo in the "activiti-app.proportis" file? seems like "properties" is misspelled.
07-04-2017 02:38 PM
Yes, the application was generated via YO as in the instruction. At the time of generation, the version was 1.6.1. And yes, in my question in file name I have misspelled) The file name is "activiti-app.properties".
07-04-2017 02:43 PM
The file "config/webpack.common.js" should contain something like the following:
devServer: {
contentBase: helpers.root('dist'),
compress: true,
port: 3000,
historyApiFallback: true,
host: '0.0.0.0',
inline: true,
proxy: {
'/ecm': {
target: {
host: "0.0.0.0",
protocol: 'http:',
port: 8080
},
pathRewrite: {
'^/ecm': ''
}
},
'/bpm': {
target: {
host: "0.0.0.0",
protocol: 'http:',
port: 9999
},
pathRewrite: {
'^/bpm': ''
}
}
}
},
Can you try updating host/port values to point to your custom urls and see if that helps? Thanks.
07-06-2017 03:20 AM
After the demo version of the application, there were no proxy configurations in the vail.
But even after I added them nothing has changed.
proxy: {
'/ecm': {
target: {
host: "192.168.122.79",
protocol: 'http:',
port: 9080
},
pathRewrite: {
'^/ecm': ''
}
},
'/bpm': {
target: {
host: "192.168.122.79",
protocol: 'http:',
port: 8080
},
pathRewrite: {
'^/bpm': ''
}
}
}
The error still has a place.
07-06-2017 03:23 AM
Based on your screenshot you are trying to login in both ECM and BPM at the same time? Are you sure you have same credentials in both systems? Try the top-left checkboxes and login just to ECM or just BPM.
07-06-2017 04:00 AM
Yes, I have the same password and login (admin/admin). And I tried to leave the Process Service button and tried logging in.
The result is the same error.
When I do login in the Activiti to the direct via the web interface (192.168.122.79:8080 /activiti-app) login/password "admin"/"admin" works.
The login in the Content Service from ADF app will be logged correctly.
07-06-2017 04:34 AM
Can you share the screenshot of the network calls? (Chrome devtools)
Explore our Alfresco products with the links below. Use labels to filter content by product module.