Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 1.08 KB

api_batchevent.md

File metadata and controls

32 lines (27 loc) · 1.08 KB

Batch Event

////////////////////////////////////////
//web/WEB-INF/efw/event/myBatchEvent.js
////////////////////////////////////////
var myBatchEvent={};
myBatchEvent.paramsFormat = { 
                                "sysDate" : "format:yyyy/MM/dd;display-name:sysDate;"
                            };
myBatchEvent.fire         = function ( params ) {
                                //return;
                                //return { "param" : params.sysDate };
                                return (new Batch())
                                .echo("hello world!")
                                .exit(1);
                            };

Event Variable

The event variable must be same to the event file name. In the sample, it is "myBatchEvent".

Params Format

Same to Web Event.

Check Style

Same to Web Event.

Fire Method

Event Return

The event return must be void or an instance of Batch or anything can be changed to JSON.