cancel
Showing results for 
Search instead for 
Did you mean: 

how to delay the exection of an interface

Former Member
0 Kudos

Hi Experts,

I have a file to file scenario. There are two such interfaces.

I want to introduce a delay in the execution of one interface.

I have tried using sleep function in the mapping, but its not to mch effect.

Is there ne way we can do it??? how abt OS command after/before execution??

what should the script be?

pls share your thughts

Regards,

Teja

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use communication channel availability and set the channels when they should start functioning. this way you can put delay in execution of two interfaces.

Cheers

Veera

Former Member
0 Kudos

Ther eis no point in schedulign the channels as the files would be at random intervals.

There is a script that we write in the OS command line execution.. can ne ne pls help me with that..

the only other way is a wait step in bpm, but I do not currently have a bpm so I do not ant to include a ccBM just for the sake of making th einterface wait.

former_member854360
Active Contributor
0 Kudos

Hi,

One trick

Use advance selection for source file in sender file adapter.

Put your directory name in Addtional folder list.

In this settings PI will poll only one file per polling interval.

make the polling interval as per the requirement.

If you put it as 60 S then in every 60 s one file will be processed.

Answers (4)

Answers (4)

Former Member
0 Kudos

try

{

Thread.sleep(milisecs)

catch (Exception e)

{

}

}

Former Member
0 Kudos

Try EOIO service.

Regards

Raj

Former Member
0 Kudos

With OS Script, in the second interface before message processing option in adapter, you can use choice command in batch script.

Find some links on Choice command in batch.

---Div

Former Member
0 Kudos

With OS Script, in the second interface before message processing option in adapter, you can use choice command in batch script.

>

> Find some links on Choice command in batch.

>

>

>

> ---Div

Managed to find the anatomy of choice command in batch file to introduce delay:

Choice command in DOS is used to select menu items.

Here you can use with below syntax in OS command before processing in second interface, sender file adapter

choice /C:a /D:a /T:2>nul

Where 2 is the delay in seconds and keep rest as them.

I tested on windows XP on dos command.

--Div

Former Member
0 Kudos

Thanks Divyesh and Debashish..

I will try the polling interval trick

I am a novice in the scripts..

can u pls explain the choice command choice c:/a and D:/a ....

thanks

Former Member
0 Kudos

I also came across this thread...

but the script doesnt seem to be working.. ne idea?

Former Member
0 Kudos

ok here you go:

I hope your XI server is on windows.

choice /C:a /D:a /T:2 > nul

As shared earlier, choice menu is actually selecting menu choice command in DOS.

/C: specify menu choices, here it will create single menu item with "a". By default it creates two menu items - 'y' and 'n'.

/D: Default menu choice

/T: number of seconds to pause. -- your parameter, I have given 2 seconds in my earlier command.

You can also try this command., it will also work.

In your file you can write only below one line command to produce delay of 2 secods:

choice /D:y /T:2 > nul

--Div

former_member854360
Active Contributor
0 Kudos

Hi,

You can use Availability time planing in Communication Channl monitoring in RWB