select count(*) from wf_arcs where workflow_key = :workflow_key and transition_key = :transition_key and place_key = :place_key and direction = :direction insert into wf_arcs (workflow_key, transition_key, place_key, direction) values (:workflow_key, :transition_key, :place_key, :direction)