Variable to get current endpoint name

Not applicable

I am looking for the variable to get the current endpoint name. For instance, when I am parsing through some policies in the flow, I would like to get the name of current endpoint,which could be name of the proxy endpoint or target endpoint. If there a variable to get that name? Thanks in advance.

Solved Solved
0 6 557
1 ACCEPTED SOLUTION

Not applicable

Hi @Prithpal Bhogill, thanks for the response. I am not sure how if that will be helpful for what I am looking for. I need to get the scope or name of the endpoint at runtime where the current Javascript policy is attached -- for instance, context.flow gets the name of current flow in action -- similarly, I need to get the name of current endpoint (higher level entity) -- please note that I wouldn't know whether the current policy is in proxy or target to use proxy or target endpoint specific variables. I am looking for a variable to the parent of the current flow, which is end endpoint name regardless of proxy or target. Thanks in advance,

View solution in original post

6 REPLIES 6

Not applicable

Like in Javascript, I need to get the name of endpoint at runtime -- looking for the right runtime variable name to get the endpoint name in the context where the Javascript policy is attached.

Not applicable

Hi @Prithpal Bhogill, thanks for the response. I am not sure how if that will be helpful for what I am looking for. I need to get the scope or name of the endpoint at runtime where the current Javascript policy is attached -- for instance, context.flow gets the name of current flow in action -- similarly, I need to get the name of current endpoint (higher level entity) -- please note that I wouldn't know whether the current policy is in proxy or target to use proxy or target endpoint specific variables. I am looking for a variable to the parent of the current flow, which is end endpoint name regardless of proxy or target. Thanks in advance,

Former Community Member
Not applicable

Hi @Vijay Govind have you looked at this? Let me know.

Former Community Member
Not applicable

In order to do what you are looking for you will need to leverage the context.flow variable to first determine what flow you are in. If you are in the proxy (context.flow = PROXY_REQ_FLOW or PROXY_RESP_FLOW), if you are in the target (context.flow = TARGET_REQ_FLOW or TARGET_RESP_FLOW). Once you have made the determination you can access the other variables (as discussed above. context.getVariable()) to get the appropriate values. Does this help?

Understood. I was wondering if there is a variable similar to context.flow to directly get the name in the current context. Thanks for the details.

Not applicable

Understood. I was wondering if there is a variable similar to context.flow to directly get the name in the current context. Thanks for the details.