The Inbound File Adapter – Use trigger file

Jurgen Kemmelings 2
0 0
Read Time:1 Minute, 42 Second

The Inbound File Adapter can be used for polling and processing new files in a specified directory. With the Adapter Configuration Wizard you can create this File Adapter Service quite easily. Especially if you follow an example! In step 7 of the wizard I decided to deviate from my example and checked the ‘Use trigger file’ checkbox.

 

Then an extra field with ‘Trigger File Details’ appears in the wizard window where you can enter the directory and the trigger file name.

After deploying the application it seemed to work as expected. I could write more files to the directory and they were not yet processed. Only after I wrote the start.txt file in the specified directory the process started working. But this behavior is only executed once! From now on new files are processed at once again.

If you want this behavior for each polling cycle it appears that there is an extra parameter that you have to add manually to the JCA file:

<property name="TriggerFileStrategy" value="EveryTime"/>

Despite of the note in the documentation: “You must not manually change the value of polling parameters in JCA files. You must use the Adapter Configuration Wizard to modify this parameter.”

With the TriggerFileStrategy property you can control the strategy that is used for the triggering mechanism. The value can be one of the following:

EndpointActivation: The adapter looks for the trigger file every time the composite is activated. Note: The composite gets activated every time you start the container or redeploy the application, or retire or activate the composite application from Oracle Enterprise Manager. Every time you restart the container, the composite application is not triggered until it sees the trigger file in the specified directory.

OnceOnly: The adapter looks for the trigger file only once in its lifetime. Once it finds the trigger file, it remember that across restarts and redeployments.

EveryTime: The adapter looks for the trigger file on each polling cycle.

The default value for TriggerFileStrategy is EndpointActivation.

About Post Author

Jurgen Kemmelings

Oracle consultant at AMIS
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

2 thoughts on “The Inbound File Adapter – Use trigger file

  1. Hi Jurgen,

    That is quite useful information – and new to me. Thanks for taking the time to explain this, I had assumed a default of EveryTime (well, I had not even considered other options). Great to see so much activity around SOA Suite @ AMIS.

    kind regards,

    Lucas

Comments are closed.

Next Post

Creating an XMLType based on Object Types

Sometimes it is necessary to create a Stored Procedure which returns an XMLType, like when you want to expose the Stored Procedure to the “outside world”, like via a Mediator. There are several options to create an XMLType. In this blogpost I will show you two ways of doing this. […]
%d bloggers like this: