Custom Service Broker MethodType

  • 26 February 2020
  • 3 replies
  • 6 views

Hi All,

 

Can someone help me out with what different MethodType mean and do when we use them in decorating the methods you want to expose with the [Attributes.Method] Attribute in the custom service broker?

 

MethodType.List makes sense doesn't need explanation but I have no idea the difference between using Execute, Create, Read or Update and when to use them.

 

For example, I have used MethodType.Execute in one my methods and may be becoz of that when I use this SmartObject method in Workflow, I cannot create reference in the output mapping. I can create individual variable mapping to the output of the method. Should I decorate this method with MethodType.Create instead to be able to create reference?

 

Thanks,

Praveen


3 replies

Hi  @Praveen123,


 


I can't say that I understand your question completely however, I do hope that this information can be of some use to you, all the best in solving your question.


 


Regarding your situation it could possibly be because of this:



  1. Where stored procedures return data (e.g. SELECT), the resulting Service object Methods will be of type List

  2. Where stored procedures do not return data (e.g. INSERT INTO, DELETE and UPDATE), the resulting Service object Methods will be of type Execute


Additionally, you can read here for the differences between Execute, Create, Read or Update.


 


Hope this helps!


 

Thanks @Esmari for your reply and the screenshot which explains different methodtype. So basically those methodtype are related to CRUD operations performed on database.

 

My service broker is not interacting with DB but with third-party software via it's API. Hence I don't think it would matter if I used any of these Create, Update or Execute method type on my methods. Right?

Hi  @Praveen123 ,


 


Your logic seems sound to me.


I'll keep an eye out for more information regarding what you have described, the extra bit of information helps with my search, thank you!

Reply