const getAllProcesses = async (workflow,query = {}) => { const processes = await bpmsDB.bpms_process.findAll({ where: { workflowId: workflow.id, subFlowId: null, ...query // type:{ // [Op.in]:[0,1] // } }, order: [ ['id', 'ASC'] ], attributes: [ "id", "pid", "link", "type", "name", "conditions", "subFlowPid", "subFlowId" ], raw: true }); return processes; } module.exports = { getAllProcesses, }