cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Know which event called a service

jdurand
1-Newbie

Know which event called a service

Hi,

I have a service which I call through a "SelectedRowChange" or a "ServiceInvokeCompleted" event and I want to do differents things on my service regarding the event which called it.

So is it possible inside a service to get the caller event ?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
AnnaAn
13-Aquamarine
(To:jdurand)

Hi Jean-Noel Durand,

As far as I know there is no way to recognize which event call a service in a mashup,

but as an alternative you could set a value for a property or a textbox value when ou triggered a "SelectedRowChange" or a "ServiceInvokeCompleted" event, for example, you give value to 1 if SelectedRowChange, and 2 if ServiceInvokeCompleted(here you need create another service to set the value at the time either of the two events is triggered), and then the value could be as an input of the service you will call you could  set a different logic or do different thing based on the different value passed in.

Hope this helps,

Br,

Anna

View solution in original post

3 REPLIES 3
ankigupta
5-Regular Member
(To:jdurand)

Hi Jean-Noel DURAND​,

As per my understanding; the event details are available in case of subscription but not in a mashup.

So, you might have to create separate services for "SelectedRowChange" and "ServiceInvokeCompleted" event.

AnnaAn
13-Aquamarine
(To:jdurand)

Hi Jean-Noel Durand,

As far as I know there is no way to recognize which event call a service in a mashup,

but as an alternative you could set a value for a property or a textbox value when ou triggered a "SelectedRowChange" or a "ServiceInvokeCompleted" event, for example, you give value to 1 if SelectedRowChange, and 2 if ServiceInvokeCompleted(here you need create another service to set the value at the time either of the two events is triggered), and then the value could be as an input of the service you will call you could  set a different logic or do different thing based on the different value passed in.

Hope this helps,

Br,

Anna

jdurand
1-Newbie
(To:AnnaAn)

In my case it is the best alternative.

Thanks

Top Tags