GWM
This commit is contained in:
parent
d59c8e7a9f
commit
df866b985c
@ -69,21 +69,29 @@ exports.MenuList = (req, res) => {
|
||||
.then(EntitiesData => {
|
||||
let data = [];
|
||||
EntitiesData.forEach((value, key)=>{
|
||||
// instancesid = value.dataValues.process_instance_id;
|
||||
// taskid = camundaHelper.financialsListOfProcessInstances(instancesid); console.log(taskid)
|
||||
// camunda_status = camundaHelper.financialsFormVariables(taskid);
|
||||
var camunda_status;
|
||||
instancesid = value.dataValues.process_instance_id;
|
||||
// taskid = camundaHelper.financialsListOfProcessInstances(instancesid);
|
||||
// taskid.then(function(result){
|
||||
// formVariable = camundaHelper.financialsFormVariables(result);
|
||||
// formVariable.then(function(form_result){
|
||||
// camunda_status = JSON.parse(form_result);
|
||||
// obj_data = { ...value.dataValues ,status:camunda_status , statementsmasterrData:MasterData }
|
||||
// data.push(obj_data);
|
||||
// });
|
||||
// });
|
||||
obj_data = { ...value.dataValues , statementsmasterrData:MasterData }
|
||||
|
||||
data.push(obj_data);
|
||||
|
||||
}); // end of EntitiesData foreach
|
||||
|
||||
setTimeout(()=>{
|
||||
// below code for overall sum object push process
|
||||
sum_data = { ...{'losid':losid,'bizname':"Consolidated Financials Summary",'is_consolidated_api_call':1} , statementsmasterrData:MasterData };
|
||||
data.push(sum_data);
|
||||
|
||||
// send respose to FE
|
||||
res.send({'status':200,'message':"success",'data':data});
|
||||
|
||||
},5000)
|
||||
}); // end of findall EntitiesData
|
||||
}); // end of findall masters datas
|
||||
} // end of starter function if condition
|
||||
@ -714,9 +722,8 @@ exports.camunda = async (req, res) => {
|
||||
instancesid = "33f6a13d-272f-11ec-a4f4-42010a800002";
|
||||
const taskid = camundaHelper.financialsListOfProcessInstances(instancesid);
|
||||
taskid.then(function(result){
|
||||
|
||||
const formVariable = camundaHelper.financialsFormVariables(result);
|
||||
formVariable.then(function(form_result){ camunda_status = form_result });
|
||||
const formVariable = camundaHelper.financialsFormVariables(result);
|
||||
formVariable.then(function(form_result){ camunda_status = form_result });
|
||||
});
|
||||
setTimeout(function(){
|
||||
console.log(camunda_status);
|
||||
|
||||
@ -50,7 +50,12 @@ const URL = process.env.CAMUNDA_URL
|
||||
}, function (error, response, body){
|
||||
let data = body;
|
||||
task_id = data[0].id;
|
||||
resolve(task_id);
|
||||
if(task_id)
|
||||
{
|
||||
resolve(task_id);
|
||||
}
|
||||
else{ resolve(false); }
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user