mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
simpleapp rename
This commit is contained in:
Binary file not shown.
@@ -520,7 +520,7 @@ exports.ACTIVITI7_APPS = {
|
|||||||
},
|
},
|
||||||
SIMPLE_APP: {
|
SIMPLE_APP: {
|
||||||
name: "simpleapp",
|
name: "simpleapp",
|
||||||
file_location: "/resources/activiti7/simpleApp.zip",
|
file_location: "/resources/activiti7/simpleapp.zip",
|
||||||
processes: {
|
processes: {
|
||||||
processwithvariables: "processwithvariables",
|
processwithvariables: "processwithvariables",
|
||||||
simpleProcess: "simpleProcess"
|
simpleProcess: "simpleProcess"
|
||||||
|
@@ -69,17 +69,20 @@ async function checkIfAppIsReleased(apiService, absentApps) {
|
|||||||
|
|
||||||
for (let i = 0; i < absentApps.length; i++) {
|
for (let i = 0; i < absentApps.length; i++) {
|
||||||
let currentAbsentApp = absentApps[i];
|
let currentAbsentApp = absentApps[i];
|
||||||
let isPresent = listAppsInModeler.find((currentApp) => {
|
let app = listAppsInModeler.find((currentApp) => {
|
||||||
return currentAbsentApp.name === currentApp.entry.name;
|
return currentAbsentApp.name === currentApp.entry.name;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!isPresent) {
|
|
||||||
console.log(`uplodare ` + currentAbsentApp.name);
|
if (!app) {
|
||||||
let uploadedApp = await importApp(apiService, currentAbsentApp);
|
let uploadedApp = await importApp(apiService, currentAbsentApp);
|
||||||
if (uploadedApp) {
|
if (uploadedApp) {
|
||||||
await releaseApp(apiService, uploadedApp);
|
await releaseApp(apiService, uploadedApp);
|
||||||
await deployApp(apiService, uploadedApp);
|
await deployApp(apiService, uploadedApp);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
await releaseApp(apiService, app);
|
||||||
|
await deployApp(apiService, app);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,15 +127,16 @@ async function importApp(apiService, app) {
|
|||||||
return await apiService.oauth2Auth.callCustomApi(url, 'POST', pathParams, queryParams, headerParams, formParams, bodyParam,
|
return await apiService.oauth2Auth.callCustomApi(url, 'POST', pathParams, queryParams, headerParams, formParams, bodyParam,
|
||||||
contentTypes, accepts);
|
contentTypes, accepts);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(`Not possible to upload the project ${app.name} ` + error);
|
if (error.status !== 409) {
|
||||||
process.exit(1);
|
console.log(`Not possible to upload the project ${app.name} ` + error.status);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function releaseApp(apiService, app) {
|
async function releaseApp(apiService, app) {
|
||||||
const url = `${config.hostBpm}alfresco-modeling-service/v1/projects/${app.entry.id}/releases`;
|
const url = `${config.hostBpm}alfresco-modeling-service/v1/projects/${app.entry.id}/releases`;
|
||||||
console.log(url);
|
|
||||||
|
|
||||||
const pathParams = {}, queryParams = {},
|
const pathParams = {}, queryParams = {},
|
||||||
headerParams = {}, formParams = {}, bodyParam = {},
|
headerParams = {}, formParams = {}, bodyParam = {},
|
||||||
@@ -142,7 +146,7 @@ async function releaseApp(apiService, app) {
|
|||||||
return await apiService.oauth2Auth.callCustomApi(url, 'POST', pathParams, queryParams, headerParams, formParams, bodyParam,
|
return await apiService.oauth2Auth.callCustomApi(url, 'POST', pathParams, queryParams, headerParams, formParams, bodyParam,
|
||||||
contentTypes, accepts);
|
contentTypes, accepts);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(`Not possible to release the project ${app.entry.name} ` + error);
|
console.log(`Not possible to release the project ${app.entry.name} ` + JSON.stringify(error));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,6 +163,7 @@ async function getDeployedApplicationsByStatus(apiService, status) {
|
|||||||
try {
|
try {
|
||||||
data = await apiService.oauth2Auth.callCustomApi(url, 'GET', pathParams, queryParams, headerParams, formParams, bodyParam,
|
data = await apiService.oauth2Auth.callCustomApi(url, 'GET', pathParams, queryParams, headerParams, formParams, bodyParam,
|
||||||
contentTypes, accepts);
|
contentTypes, accepts);
|
||||||
|
|
||||||
return data.list.entries;
|
return data.list.entries;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(`Not possible get the application from alfresco-deployment-service` + error);
|
console.log(`Not possible get the application from alfresco-deployment-service` + error);
|
||||||
|
Reference in New Issue
Block a user