cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
446
Views
0
Helpful
2
Replies

Setting target for the handler in CPO

Anish Somadevan
Level 1
Level 1

 

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 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.

 

View solution in original post

2 Replies 2

"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.

 

 

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. :)

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: