code: def update_workflow_status(db_session, workflow_uuid, status,
                                 new_logs='', message=None):
          
          try:
              workflow = \
                  db_session.query(Workflow).filter_by(id_=workflow_uuid).first()
  
              if not workflow:
                  raise Exception('Workflow {0} doesn\'t exist in database.'.
                                  format(workflow_uuid))
              if status:
                  workflow.status = status
              if new_logs:
                  workflow.logs = (workflow.logs or '') + new_logs + '\n'
              db_session.commit()
          except Exception as e:
              raise e
docs: Update database workflow status.
  
          :param workflow_uuid: UUID which represents the workflow.
          :param status: String that represents the workflow status.
          :param new_logs: New logs from workflow execution.
          :param message: Unused.