문제

I need to run a VFS Transport at a specific time of the day, so to me the obvious solution seems to be calling it from a CRON-style Scheduled Task.

According to my internet searches this seems to be possible but as I'm quite new to WSO2 ESB haven't found a way to get this done yet.

Is this really possible?
If so, can you please point me in the right direction?

도움이 되었습니까?

해결책

A solution would be to write your own task / class / javascript / mediatior

You should have a look at https://docs.wso2.org/display/ESB481/Writing+Tasks+Sample : This custom task sample cover something similar to your needs

An other sample based on a javascript that look if a file exist :

    <script language="js">
    importPackage(Packages.org.apache.commons.vfs2);
    if(VFS.getManager().resolveFile("smb://DOMAIN\\user:password@hostname/dir/myfile.xml").exists()){
      mc.setProperty("THIS_FILE_EXIST","true")
    } else {
      mc.setProperty("THIS_FILE_EXIST","false")          
    }
    </script>

다른 팁

VFS transport does not support cron expressions..You can define polling interval in seconds

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top