Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Setting target for the handler in CPO

 

Hi,

I would like to know how to set the target while invoking a handler at CPO end from CPSC. For testing at CPO end, i usually set the target at start time or as a default target. But i need to select the target based on the user who invokes the process. So how can i set the target for this scenario? My process is a webservice triggered and user trigerred one. There is an option of setting the target of Webservice triggering event's target. But am not able to configure that properly. Could anyone please help how to resolve this?

 

Anish

1 ACCEPTED SOLUTION

Accepted Solutions

"Web Service Trigger" will

"Web Service Trigger" will always have the same target (Automation Service), so that will not be particularly helpful to what you are trying to achieve.

I think you may want to approach this a little different.

 

Suppose process A is the process for which you want to dynamically choose a target, based on how it is invoked (via a Northbound Web Service with some parameters or by a end-user or perhaps on a schedule).

  1. Move most of the functionality of the process A into process B.
  2. Modify process A to call process B.
  3. Add "steps" to process A, before the call to B, to find the target that you want. You can use "Find Target" activity and utilize properties of the trigger to determine the right target. For example, if the name of the target is passed as a parameter to the process or if there by looking up the target in a table variable "username to target".
  4. Call process B and use the target found in "Find Target" activity, instead of the one that process A is running on.

I hope that makes sense.

 

2 REPLIES

"Web Service Trigger" will

"Web Service Trigger" will always have the same target (Automation Service), so that will not be particularly helpful to what you are trying to achieve.

I think you may want to approach this a little different.

 

Suppose process A is the process for which you want to dynamically choose a target, based on how it is invoked (via a Northbound Web Service with some parameters or by a end-user or perhaps on a schedule).

  1. Move most of the functionality of the process A into process B.
  2. Modify process A to call process B.
  3. Add "steps" to process A, before the call to B, to find the target that you want. You can use "Find Target" activity and utilize properties of the trigger to determine the right target. For example, if the name of the target is passed as a parameter to the process or if there by looking up the target in a table variable "username to target".
  4. Call process B and use the target found in "Find Target" activity, instead of the one that process A is running on.

I hope that makes sense.

 

New Member

 I have modified it by

 

I have modified it by changing the target of my handler as an Automation Service. Then i run a find target process to get the target and use it to set the target of my HTTP requests. Its working.

Thanks a lot for your suggestion. :)

62
Views
0
Helpful
2
Replies