def METHOD_NAME(uuid, wps_status, message=None, status_percentage=None):
    """Writes response to database
    """
    session = get_session()
    requests = session.query(ProcessInstance).filter_by(uuid=str(uuid))
    if requests.count():
        request = requests.one()
        request.time_end = datetime.datetime.now()
        request.message = str(message)
        request.percent_done = status_percentage
        request.status = wps_status
        session.commit()
    session.close()