
javascript.simple-batchlet.js Maven / Gradle / Ivy
The newest version!
/*
* Copyright (c) 2014 Red Hat, Inc. and/or its affiliates.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
function stop() {
print('In stop function\n');
}
//access built-in variables: jobContext, stepContext and batchProperties,
//set job exit status to the value of testName property, and
//return the value of testName property as step exit status,
//
function process() {
print('jobName: ' + jobContext.getJobName() + '\n');
print('stepName: ' + stepContext.getStepName() + '\n');
var testName = batchProperties.get('testName');
jobContext.setExitStatus(testName);
return testName;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy