All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lib.xp.examples.task.submit.js Maven / Gradle / Ivy

var taskLib = require('/lib/xp/task.js');
var assert = require('/lib/xp/testing');

// BEGIN
// Execute task and keep taskId for polling status
var taskId = taskLib.submit({
    description: 'Background task',
    task() {
        longRunningTask();
    }
});
// END
assert.assertEquals('7ca603c1-3b88-4009-8f30-46ddbcc4bb19', taskId);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy