JBoss Community

how to set timer event

created by jinhe zou in jBPM - View the full discussion

Untitled.png is my process.

 

Timer Event Properties:

Timer Delay: 0ms

Timer Period: 10s

 

Java Code:

        KnowledgeBase kbase = readKnowledgeBase();

        StatefulKnowledgeSession ksession = createSession(kbase);

    

        FileLister fileLister = new FileLister();

        ksession.getWorkItemManager().registerWorkItemHandler("GetFileNames", fileLister);

        

        Map<String, Object> params = new HashMap<String, Object>();

        params.put("txtFilePath", "d:/");

 

 

        ksession.startProcess("com.pa.mainProcess", params);

 

 


In my process, it will print something in console, I want my process print it each 10second repeately.

 

unfutuately, it just print once.

 

is any problem here?

Reply to this message by going to Community

Start a new discussion in jBPM at Community