select count(*) from wf_transitions where workflow_key = :workflow_key and transition_name = :transition_name select transition_key from wf_transitions where workflow_key = :workflow_key insert into wf_transitions (transition_key, transition_name, workflow_key, trigger_type) values (:transition_key, :transition_name, :workflow_key, :trigger_type) insert into wf_context_transition_info (context_key, workflow_key, transition_key, estimated_minutes) values (:context_key, :workflow_key, :transition_key, :estimated_minutes)