cancel
Showing results for 
Search instead for 
Did you mean: 

Asynchronous External Service for Enrichment Architecture

former_member343107
Participant
0 Kudos

Hi All,

The enrichment adapter's method "getEnrichmentService" can be used to call synchronous external service. But how about asynchronous ones? For example, a service provider accepts file input and will write the response back to another file after a couple of hours. Should the enrichmet adapter keeps probing whether the result file already shows up before finishes the execution of "getEnrichmentService"?

Thanks, Jerome

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You have to write an Adapter for Enrichment Framework.

This Adapter can be simple EJB implementing the EnrichmentAdpater and Session Bean Interface.

In this Adapter EJB, you have to call a <b>Message Driven Bean.</b>

Message Driven Beans are useful for <b>Asynchronous Processing</b>.

In the code, after calling the Message driven bean,

EnrichmentAdapterResponse response = new EnrichmentAdapterResponse();

response.setEnrichmentContent(request.getEnrichmentContent());

return response;

<b>In the above example input = output. The only thing is you have called the Message Driven Bean.</b>

But you have to code the message driven bean to process the returned results. In this case you have to move the parsed XML for the import Server to pick up from the ready folder.

Hope this helps.

former_member343107
Participant
0 Kudos

Thanks a lot for the explanation. I think that's the right way.

Best Regards

Jerome

Answers (0)