getCurrentStep($res_id, $coll_id, 'VISA_CIRCUIT'); $stepDetails = $circuit_visa->getStepDetails($res_id, $coll_id, 'VISA_CIRCUIT', $sequence); // Person who ends the workflow $db->query('UPDATE listinstance SET process_date = CURRENT_TIMESTAMP, process_comment = ? WHERE listinstance_id = ? AND item_id = ? AND res_id = ? AND difflist_type = ?', ["A terminé le circuit avec l'action {$label_action}", $stepDetails['listinstance_id'], $stepDetails['item_id'], $res_id, 'VISA_CIRCUIT']); // People remaining in the workflow $db->query('UPDATE listinstance SET process_date = CURRENT_TIMESTAMP, process_comment = ? WHERE res_id = ? AND difflist_type = ? AND process_date IS NULL', ['Circuit Interrompu', $res_id, 'VISA_CIRCUIT']); return array('result' => $res_id.'#', 'history_msg' => $label_action); } ?>