Your use of this download is governed by Stonebranch’s Terms of Use, which are available at https://www.stonebranch.com/integration-hub/Terms-and-Privacy/Terms-of-Use/
This Universal Task provides the capability to schedule SAP HANA extended application services Jobs (SAP HANA XSA Jobs) from the Universal Automation Center.
This allows HANA XSA Jobs to start in various ways, including:
Also, HANA XSA Jobs could be part of a Workflow containing multiple HANA XSA Jobs and other Job types like SAP Tasks, Linux Tasks, Database Tasks, etc.
Goal is to schedule SAP HANA extended application services Jobs using Universal Controller instead of using the "Recurring - Cron" Schedule defined in the SAP HANA Web IDE.
The "Recurring - Cron" Schedule defined in the SAP HANA Web IDE should not be used anymore for scheduling.
To achieve this, the following steps need to be performed:
Template Name | Version |
---|---|
SAP HANA XSA | 1.0.2 |
Refer to Changelog for version history information.
This integration requires a Universal Agent and a Python runtime to execute the Universal Task.
Requires Python 3.7. Tested with the Universal Agent bundled Python distribution.
Both Windows and Linux agents are supported:
Universal Agent for Windows x64 Version 7.2.0.0 and later with python options installed.
Universal Agent for Linux Version 7.2.0.0 and later with python options installed.
Universal Controller Version 7.2.0.0 and later.
Universal Agent host should be able to establish a connection with:
This Universal Task provides the following main features:
Actions
Authentication
Logging
To use the Universal Template, you first must perform the following steps.
This Universal Task requires the Resolvable Credentials feature. Check that the Resolvable Credentials Permitted system property has been set to true.
To import the Universal Template into your Controller, follow the instructions here.
When the files have been imported successfully, refresh the Universal Templates list. The Universal Template will appear on the list.
Modifications of this integration, applied by users or customers, before or after import, might affect the support of this integration. For more information, refer to Integration Modifications.
For a new Universal Task, create a new task, and enter the required input fields.
The input fields for this Universal Extension are described in the following table.
Field | Input type | Default value | Type | Description | |
---|---|---|---|---|---|
Name | Required | Task Name | Text | Name of the Task | |
Agent | Optional | Agent Name | Choice | Linux or Windows Universal Agent to execute the SAP Job Scheduler REST API commands | |
Agent Cluster | Optional | Agent Cluster Name | Choice | Optional Agent Cluster for load balancing. | |
Base URL for Job Scheduler REST API | Required | Base URL of the SAP Job Scheduler REST API https://<Domain>:<Rest API Port> | Text | The scheduler Base URL has the format: https://<Domain>:<Rest API Port>; e.g., https://hxehost:51029. The Domain and Rest API Port can be looked up under Routes in the SAP HANA XS Advanced Cockpit. | |
Set RecurringJob Schedules to Inactive | Optional | True | False | Boolean | If this flag is set, all Job Schedules of this Job of Type recurring are set to inactive. | |
Hana XSA Job Name | Required | Name of the HANA XSA Job | Text | The Name of the HANA XSA Job, which should be scheduled. The Job name can be looked up in the HANA Job Scheduler Dashboard | |
Data | Required | True | False | Boolean | If this flag is set, a Parameter file can be selected in the Data (JSON) field. | |
Copy Data Parameter | Optional | True | False | Boolean | If this flag is set, the Job Parameters are dynamically retrieved from the last Job schedule, which has not been scheduled from Universal Controller. | |
Data (JSON) | Optional | Parameter File in JSON format
| Script | Visible in case the Field "Copy Data Parameter" is not checked. data to be passed to the job action endpoint in JSON format when invoked, e.g. {"dataParam": "somevalue"} | |
Poll Interval | Required | 60s | Choice | [60s, 180s, 360s] The Universal Task will provide the functionality to poll in a configurable interval the HANA Job Scheduling REST API to retrieve the current Status of the Job and the Job Log file. The Job Log file will be available as task output for further processing. | |
JobScheduler Credentials | Required | Credentials of the JobScheduler Service Instance | Credential | Credentials of the JobScheduler Service Instance used to connect to the HANA Job Scheduling REST API. The JobScheduler Credentials can be looked up under Service Instances in the SAP HANA XS Advanced Cockpit. | |
Universal Controller REST API Credentials | Required | Universal Controller Rest API Credentials | Credential | Universal Controller Rest API Credentials. | |
Universal Controller URL | Required | Universal Controller URL | Text | Universal Controller URL; for example, https://192.168.88.40/uc | |
Loglevel | Required | INFO | Choice | Universal Task logging settings [DEBUG | INFO| WARNING | ERROR | CRITICAL]. |
The following Task will set all existing recurring schedules (also called cron type schedules) of the given XSA Job "hxehost_51043_myJob.xsjob" to in-active and adds a one-time schedule to the XSA Job. The one-time schedule is executed immediately.
By setting all existing recurring schedules of the Job to in-active, it is ensured that this Job is only scheduled by Universal Controller.
The scheduler Base URL has the format: https://<Domain>:<Rest API Port>
The Domain and Rest API Port can be looked up under Routes in the SAP HANA XS Advanced Cockpit.
Example:
The JobScheduler Credentials can be looked up under Service Instances in the SAP HANA XS Advanced Cockpit.
Example:
Universal Tasks Credential Details:
The following provides an example of an existing HANA XSA Job in the HANA WebIDE Console.
In this example the "xscron" Parameter has been set to a date in the past ( 2015 ). As a result this Job schedule will never be reached, meaning the Job will not be started anymore via the xscron definition.
Once the Universal Task is started in Universal Controller, all existing recurring schedules are set to Inactive and a one-time schedule is added.
In the screenshot below you can see that the Schedule with the Pattern "Recurring - Cron" has been set to Inactive. This is to avoid the Job starting via a "Recurring - Cron" Schedule.
The one-time schedule starts the Job immediately.
Once the execution of the One-Time Schedule is finished the One-Time Schedule goes to Inactive.
Log-file generated in the HANA job-scheduler-service-dashboard:
Universal Task Output
The Universal Task Output contains similar information as in the HANA job-scheduler-service-dashboard.
The exit codes and related Task Output for this Universal Task are described in the following table.
Task Exit Code | Task Status | Status Classification Description | Task Output |
---|---|---|---|
0 | Success | Successful Execution | The endpoint has successfully executed the job. |
1 | Failed | Wrong Jobname: | Exit Code: 404, Job Not Found |
1 | Failed | Wrong JobScheduler Credentials: 401, Unauthorized | Exit Code: 401, Unauthorized |
1 | Failed | Wrong Base URL for Job Scheduler REST API | Exit Code: 404 |
1 | Failed | Run State ERROR | Task Output contains the Error description. |
STDOUT and STDERR provide additional information to User. The populated content can be changed in future versions of this Universal Task without notice. Backward compatibility is not guaranteed.
Modifications applied by users or customers, before or after import, might affect the supportability of this integration. The following modifications are discouraged to retain the support level as applied for this integration.
Users and customers are encouraged to report defects, or feature requests at Stonebranch Support Desk.
This document references the following documents:
Document Link | Description |
---|---|
Universal Templates | User documentation for creating, working with and understanding Universal Templates and Integrations. |
Universal Tasks | User documentation for creating Universal Tasks in the Universal Controller user interface. |
Job Scheduler REST API for XS Advanced | SAP Job Scheduler REST API for XS Advanced to the HANA XSA Application. |
Support for copying Input Parameters from an existing Job Schedule definition
Support for Input Parameters
Initial Version