Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 1.02 KB

api_batchevent.md

File metadata and controls

32 lines (26 loc) · 1.02 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 the same as the event file name. In the sample, it is "myBatchEvent".

Params Format

Same as Web Event.

Check Style

Same as Web Event.

Fire Method

Event Return

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