document.getElementById('runWorkflow').addEventListener('click', runWorkflow) async function runWorkflow() { let param = { 'workflow': 'idf', 'application': '', 'building': [] } try { document.getElementById('links').innerHTML = '' document.getElementById('building').style.backgroundColor = '#FFFFFF' param['application'] = document.getElementById('application').value let building = document.getElementById('building').value if (building == '') { document.getElementById('links').innerHTML = '' document.getElementById('building').style.backgroundColor = '#FFAAAA' return } param['building'] = building console.log(building) await window.functions.run(param) } catch(ex) { alert(ex) } } window.functions.onTaskCompleted((value) => { document.getElementById('links').innerHTML = value })