Skip to main content
1-Visitor
October 5, 2020
Solved

Is there a way that the 'service invoke complete' trigger can used in a subscription?

  • October 5, 2020
  • 1 reply
  • 4003 views

Hi,

 

I had query whether there is a way that I can call a service, only if another particular service is invoked, i.e. lets say I have a service 'A' and a service 'B'. I want my service 'B' to run or be called or invoked only in the case that the service 'A' is invoked.

Within a mashup there is the service invoke trigger that can be used for this purpose but i need a trigger similar or the same to be used within a subscription to call a service. I do not want to use within the mashup I want to use this trigger at the back end or outside the mashup.

 

Please let me know if there is any way for the same. 

 

Thanks in advance

Srijith

Best answer by smainente

To my knowledge there is not out of the box  Service invoke Completed event (or other hook).

The Service A is not overridable correct ?

 

1 reply

16-Pearl
October 5, 2020

You can emit an custom Event from Service A and trigger Service B from a subscription on that event.

Regards.

 

PS : Creating and Triggering Custom Events in ThingWorx 

1-Visitor
October 5, 2020

Thank you @smainente 

 

Actually the issue is that the service 'A' is part of an extension imported. Therefore I cannot edit in the service 'A'.

So is there a way in this case?

I am not able to edit the service 'A'. This is the main reason why I need a trigger that can be used so I can or my service 'B' will know that service 'A' have invoked and it is time for 'B' to run.

smainente16-PearlAnswer
16-Pearl
October 5, 2020

To my knowledge there is not out of the box  Service invoke Completed event (or other hook).

The Service A is not overridable correct ?