SAP BTP: Application Jobs
Disclaimer
Your use of this download is governed by Stonebranch’s Terms of Use.
Version Information
Template Name | Extension Name | Version | Status |
---|---|---|---|
SAP BTP Application Jobs | ue-sap-btp-appjobs | 1 (Current 1.0.0) | Fixes and new Features are introduced |
Overview
SAP Business Technology Platform (SAP BTP) is a comprehensive, cloud‑based environment that enables organizations to build, deploy, and manage modern applications with agility and scalability.
This integration enables users to schedule, trigger, and monitor their SAP BTP Application Jobs directly from UAC.
Key Features
Feature | Description |
---|---|
Job Scheduling and Triggering | Trigger and Schedule an SAP BTP Application Job with the capability to provide optional configuration settings. |
Real‑Time Job Monitoring | Provides continuous feedback displaying detailed Job and Step status updates throughout the execution lifecycle. |
Requirements
This integration requires a Universal Agent and a Python runtime to execute the Universal Task.
Area | Details |
---|---|
Python Version | Requires Python 3.11, Tested with Agent bundled python distribution. |
Universal Agent Compatibility | Compatible with Universal Agent for Windows x64 and version >= 7.6.0.0. Compatible with Universal Agent for Linux and version >= 7.6.0.0. |
Universal Controller Compatibility | Universal Controller Version >= 7.6.0.0. |
SAP BTP Compatibility | This integration depends on Communication Arrangement: External Scheduler - Application Job Scheduling Integration via BC_EXT_APPJOB_MANAGEMENT API, version 2. |
Supported Actions
Action: Run Taskflow
The “Run Job” Action allows a Job to be triggered or scheduled. To execute the Action, the necessary Credentials, Service URL, and Job Template must be provided.
Optionally, the Job’s title can be specified using the Job Name. If omitted, the title defined in the Job Template is used.
The user on whose behalf the Job will run can also be specified. If not provided, the communication user is used by default.
You can also configure whether the task should only initiate the Job or wait until a final success or failure state is reached. The latest Job and Step status retrieved can be included in the Extension Output.
During task instance execution, the Job Name (ID), Job Run Count, Status, and Last Updated On are displayed as output fields.
Configuration examples
Example: Trigger Job
The configuration example below shows a task configuration for a Job Run with minimal configuration. The Job simply gets triggered, and upon successful triggering, the UAC Task Instance completes with success. The Task Instance will not wait for Job completion or failure.
Example: Run and monitor a Job
The configuration example below shows a task configuration for a Job Run, using a custom Job name and executed by a different user. Once the Job is successfully triggered, the task instance enters a wait state and monitors the Job until it either completes or fails. Upon completion, the info from the Job monitor, the status from the Job, and its individual Steps are displayed according to the selected output options.
Action Output
Output Type | Description | Examples |
---|---|---|
EXTENSION | The extension output provides the following information:
| |
STDOUT | Depending on the configuration of field Output Options and type of workload running, STDOUT can provide the Job Monitor, Job Status and/or Step Status. | |
STDERR | Shows the logs from the Task Instance execution. The verbosity is controlled by the Task configuration Log Level. |
Importable Configuration Examples
This integration provides importable configuration examples along with their dependencies, grouped as Use Cases to better describe end to end capabilities.
These examples aid in allowing task authors to get more familiar with the configuration of tasks and related Use Cases. Such tasks should be imported in a Test system and should not be used directly in production.
Initial Preparation Steps
- STEP 1: Go to Stonebranch Integration Hub download integration with name "SAP BTP: Application Jobs" and extract the archive in a local directory.
- STEP 2: Locate and import the "SAP BTP Application Jobs" integration to the target Universal Controller. For more information refer to the How To section in this document.
- STEP 3: Inside directory named "configuration_examples" you will find a list of definition zip files. Upload them one by one respecting the order presented below, by using the "Upload" functionality of Universal Controller:
- variables.zip
- credentials.zip
- tasks.zip
- workflows.zip
- The order indicated above ensures that the dependencies of the imported entities need to be uploaded first.
- All imported entities are prefixed with UC1.
- STEP 4: Update the uploaded UAC Credential entity, with the proper SAP Communication User and Password.
- STEP 5: Update the UAC global variables introduced with the "variables.zip" definition file. Their name is prefixed with "ue_sap_btp_appjobs". Review the description of the variables as they include information on how should be populated.
How "Upload" Definition Files to a Universal Controller
The "Upload" functionality of Universal Controller allows Users to import definitions exported with the "Download" functionality.
Login to Universal Controller and:
- STEP 1: Click on "Tasks" → "All Tasks"
- STEP 2: Right click on the top of the column named "Name"
- STEP 3: Click "Upload..."
In the pop-up "Upload..." dialogue:
- STEP 1: Click "Choose File".
- STEP 2: Select the appropriate zip definition file and click "Upload".
- STEP 3: Observe the Console for possible errors.
Use Case 1: Trigger Job, wait to complete, and print results
Description
This workflow is designed to execute a Job on SAP Business Technology Platform (BTP) and present the results in a clear, human-readable format using a Linux-based task. It simplifies the process of interpreting job executions by automatically collecting the jobs output. The tasks configured demonstrate the following capabilities among others:
- Integration with SAP BTP: Seamless execution of jobs on SAP Business Technology Platform from within the workflow.
- Result Processing: Presentation of the SAP Task Instance Output in a more human readable format using:
- Retrieval of EXTENSION Output (JSON) from SAP BTP task
- Definition of variables as Task Instance actions. Variables are set at the scope of the Workflow. UAC functions are used as well.
- Usage of the above variables for follow-up task instances to print information around the executed SAP Job.
The components of this Use Case are described below:
- "UC1: Run SAP BTP Job" - This is the starting task of the workflow. It triggers the execution of the defined job on the target product from SAP BTP. A list of variables are set on this task that are later evaluated on (4).
- "Successful Job Execution" - When the exit code of "UC1: Run SAP BTP Job" is 0.
- "Failed Job Execution" - When the exit code of "UC1: Run SAP BTP Job" is 1.
- "UC1: Print SAP BTP Job Result" - These tasks handle the formatting and printing of the results retrieved from the SAP BTP job.
How to Run
Execution Steps:
- STEP 1: Launch Workflow "UC1: Run SAP BTP Job and Print Results".
- STEP 2 (OPTIONAL): To simulate a failed task scenario, you may cancel the running "UC1: Run SAP BTP Job" Task Instance, which will in turn cancel the associated job. After cancellation, "Force Finish" the task instance to allow the workflow to move forward.
- STEP 3: Review the outputs of the task instances for "UC1: Print SAP BTP Job Result" task.
Expected Results:
- Job has been scheduled and executed successfully (or cancelled if STEP 2 (OPTIONAL) is followed).
- The output of "UC1: Print SAP BTP Job Result" task instance successfully reflects information related to the executed Job.
Input Fields
Name | Type | Description | Version Information |
---|---|---|---|
Action | Choice | The action performed upon the task execution.
| Introduced in 1.0.0 |
SAP Credentials | Credential | The communication user Credentials for the specific target product (e.g., S/4HANA or IBP) in the BTP system. The Credentials definition should be as follows:
| Introduced in 1.0.0 |
URL Service | Large Text | The service URL for the specific target product (e.g., S/4HANA or IBP). Example URL: | Introduced in 1.0.0 |
Job Template | Dynamic Choice | The Job Template that is used for executing the task in the target product. This is a Dynamic Choice field populated with the names of all available Job Templates from the selected target product. | Introduced in 1.0.0 |
Job Name | Text | The Job Title that appears in the SAP Application Jobs UI. When used, it allows the Job to have a specific title. Otherwise, the default behavior of SAP is to set the title to the Job Template used for executing this Job. | Introduced in 1.0.0 |
Job User | Text | The User related to Job execution. If not provided, then the communications user provided in the SAP Credentials field will be used for the Job execution. | Introduced in 1.0.0 |
Extension Output Options | Choice | The content of the Extension Output can be controlled with the following options:
Multiple options can be selected. | Introduced in 1.0.0 |
STDOUT Options | Choice | The content of the STDOUT can be controlled with the following options:
Multiple options can be selected. | Introduced in 1.0.0 |
Wait For Success Or Failure | Boolean | If selected, the task will continue running until the Job reaches Success or Failure:
| Introduced in 1.0.0 |
Polling Interval (sec) | Integer | The polling interval in seconds for the activity/status check. Defaults to 60 seconds. Required when Wait for Success or Failure is checked. | Introduced in 1.0.0 |
Max Number Of Polls | Integer | Maximum number of polls. Can be used to control the approximate expected duration of the Task Instance (along with Polling Interval (sec)). If this field is left empty, the Task Instance will poll indefinitely, checking whether the SAP BTP Job is completed (either with success or with a failure). If the Maximum Number of Polls is reached while the Job is still running, the exit code of the task instance will be 40, completing with failure. Available if Wait for Success or Failure is checked. | Introduced in 1.0.0 |
Output Fields
The following output-only fields provide better visibility during the execution of Universal Task Instances.
Field | Type | Description | Version Information |
---|---|---|---|
Job Name (ID) | Text | The unique identifier assigned to the SAP BTP Job. | Introduced in 1.0.0 |
Job Run Count | Text | A unique identifier associated with the specific execution instance of the Job. | Introduced in 1.0.0 |
Job Status | Text | The latest retrieved status of the Job. | Introduced in 1.0.0 |
Last Update On | Text | Date and time when the last update occurred (Agent Local Time). | Introduced in 1.0.0 |
Environment Variables
Environment Variables can be set from the Environment Variables task definition table. The following environment variables can affect the behavior of the extension.
Environment Variable Name | Description | Version Information |
---|---|---|
UE_HTTP_TIMEOUT | Specifies the timeout (in seconds) for HTTP requests made by the Task Instance. A higher value allows for slower responses, while a lower value enforces stricter time constraints. If not set, a default of 60 seconds is used. When a timeout happens, the Task Instance ends in failure. | Introduced in 1.0.0 |
Cancellation and Rerun
If the Task Instance is cancelled, the Job is also cancelled on the specific target product in the SAP BTP system.
If the Task Instance is rerun, a new Job will be scheduled from the same Job Template. The Job Name (ID) and Job Run Count will be updated.
Dynamic Commands
Dynamic Command “Abort Job” is available in the “Running” state of the task instance. It is used to forcefully terminate and fail the scheduled Job.
Exit Codes
Exit Code | Status | Status Description | Meaning |
---|---|---|---|
0 | Success | “Task executed successfully.“ | Successful Execution |
1 | Failure | “Execution Failed: <<Error Description>>” | Generic Error. Raised when not falling into the other Error Codes. |
40 | Failure | “Polling Timeout: maximum poling timeout reached.“ | The Job is executed out of the normal duration boundaries. |
STDOUT and STDERR
STDOUT is used for displaying Job information. It is controlled by STDOUT Options field.
STDERR provides additional information to the user. The level of detail is tuned by the Log Level Task Definition field.
Backward compatibility is not guaranteed for the content of STDOUT/STDERR and can be changed in future versions without notice
How To
Import Universal Template
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 these instructions.
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 supportability of this integration. For more information refer to Integration Modifications.
Configure Universal Task
For a new Universal Task, create a new task, and enter the required input fields.
Integration Modifications
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.
Python code modifications should not be done.
Template Modifications
General Section
"Name", "Extension", "Variable Prefix", and "Icon" should not be changed.
Universal Template Details Section
"Template Type", "Agent Type", "Send Extension Variables", and "Always Cancel on Force Finish" should not be changed.
Result Processing Defaults Section
Success and Failure Exit codes should not be changed.
Success and Failure Output processing should not be changed.
Fields Restriction Section
The setup of the template does not impose any restrictions. However, concerning the "Exit Code Processing Fields" section.Success/Failure exit codes need to be respected.
In principle, as STDERR and STDOUT outputs can change in follow-up releases of this integration, they should not be considered as a reliable source for determining the success or failure of a task.
Users and customers are encouraged to report defects, or feature requests at Stonebranch Support Desk.
Document References
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. |
Changelog
ue-sap-btp-appjobs-1.0.0 (2025-05-14)
Initial Version