select case_id, state from wf_cases where object_id = :ticket_id