wmaop / wm-aop

Mocking framework for webMethods Integration Server
https://github.com/wmaop/wm-aop/wiki
MIT License
8 stars 6 forks source link

Added new interceptor that invokes a flow (or any kind of IS) service #3

Open DiegoAlfonso2 opened 6 years ago

DiegoAlfonso2 commented 6 years ago

This new interceptor can invoke an IS service instead of the one being intercepted. This allows to use a more complex business logic when compared to scenarios, while simplifying developers's workflow (since they don't need to learn how to define an scenario; they just need to know how to develop a plain old flow service).

Geraden07 commented 6 years ago

Hi @DiegoAlfonso2,

I don't quite understand. There already exists the ability to invoke any kind of IS service instead of the one being intercepted. See the wiki section "Intercept point - Invoke" here https://github.com/wmaop/wm-aop/wiki/Understanding-how-the-mocking-works#intercept-point---invoke

Is there something I am missing?

DiegoAlfonso2 commented 6 years ago

Hi @Geraden07

Clearly, I am the one who's missing something. I've been looking through the API for an endpoint that let me invoke an alternative IS service, but couldn't find it. The closest functionality I've found is an interceptor that can make REST calls, and it seems to be undocumented. That's why I've defined a new interceptor and it's corresponding REST resource in OrgWmAOP and wanted to share it.

Maybe you can give me a piece of advice? As far as I understand, the interceptPoint parameter can be one of BEFORE, AFTER or INVOKE, but I couldn't find the way to specify the service that should be called instead of the one being mocked. How can I accomplish that?

Thank you for your support and best regards

Geraden07 commented 6 years ago

@DiegoAlfonso2,

Hmm, interesting. You're right. Now that I take a closer look, despite how that linked section of the wiki explains things, I don't see any way currently to actually specify another service to call instead of the intercepted service. I only see examples of specifying a response or set of responses directly.

@sysgen, Richard, maybe you can speak to this?

sysgen commented 6 years ago

Will look to implement this fully within restful and scenario situations.