Re: Query to retreive a list of enable request types and their associated workflows
There is no direct linkage between Request type and workflow. These are formed only when some request is created and from there you can query workflow on kcrt_requests_v. But what if no request exists?
However in Workflow we can mention the Request types in Request types tab. But that will not help you. Another way I have drilled around and found a way out for the purpose. Look, Workflows can be mentioned in the Rules and from there we can query the workflow of a request type.
"SELECT RT.REQUEST_TYPE_NAME, RL.WORKFLOW_NAME FROM KNTA_PARAM_RULES_V RL,KCRT_REQUEST_TYPES_V RT WHERE WORKFLOW_NAME IS NOT NULL AND RT.PARAMETER_SET_CONTEXT_ID = RL.PARAMETER_SET_CONTEXT_ID AND RT.ENABLED_FLAG = 'Y'"