Skip to main content
Version: 2.0.0

Configuration Guide

Minimal Required Configuration (via Config Server)

# Database
spring.datasource.url=jdbc:sap://<host>:443?encrypt=true&validateCertificate=false
spring.datasource.username=<user>
spring.datasource.password=<password>
spring.datasource.driver-class-name=com.sap.db.jdbc.Driver

# Platform
app.platform=SAP

# Service URLs
itm-core-url=https://<itm-app-url>
workaccess-api-url=https://<workaccess-url>
workaccess-api2-url=https://<workaccess-url>
notification-api-url=https://<notification-url>
flowableCustomURL=https://<flowable-url>

# Auth
sap.token.clientid=<client_id>
sap.token.clientsecret=<client_secret>
sap.token.url=https://<tenant>.authentication.<region>.hana.ondemand.com

# Admin
itm.admin.userID=admin@company.com
itm.admin.mailId=admin@company.com

# Database type
db.type=hana

Configuration by Profile

Profile: configDB (Config Server - Standard)

Database and service URLs are loaded from Spring Cloud Config Server.

Profile: vcapDB (SAP BTP Cloud Foundry)

Database is auto-configured from VCAP_SERVICES bound HANA service instance.

Profile: readUrlFromConfig

Service URLs (ITM, WorkAccess, etc.) are read from config properties instead of SAP Destination Service.

Profile: readYamlFromConfig

YAML configs (DB structure, action configs, custom attributes) are loaded from config server instead of local resources.

Profile: enableCache

Enables ITM cache eviction after task actions and sync operations.

Auth Server Configuration

PlatformProperty Values
SAP XSUAAapp.platform=SAP
Keycloakapp.platform=WORK_ACCESS, configure WorkAccess API URL

Database Auto-Schema

On first startup, JPA/Hibernate creates all custom tables (CW_ITM_WN_*) automatically via spring.jpa.hibernate.ddl-auto=update.

Important: Ensure the DB user has DDL privileges on first deployment.

YAML Configuration Files (Detailed)

WorkNet is entirely configuration-driven - YAML files define how tasks are pulled from source systems, how JSON responses are mapped to database columns, how actions are routed, and how system-specific behaviors are handled.

Configuration Folder Structure

resources/
|- application.properties
|- applicationConfig/
| |- actionConfig.yaml
| |- attachmentConfig.yaml
| |- customattribute.yaml
| |- orderByConfig.yaml
| |- systemJobConfig.yaml
| |- systemStatusConfig.yaml
| '- tableDuplicateColums.yaml
|- composite/
| '- SapBtpWorkflowTaskApi.yaml
|- dbStructureConfig/
| '- incture_sap_db_redesign.yaml
|- dbYaml/
| '- dbYamlFile.yaml
|- runtimeConfig/
| |- runtimeTaskDetailConfig.yaml
| '- specialAttributes.yaml
|- custom/
| '- <customer>_config.yaml
|- DocusignConfig.yaml
'- SalesforceConfig.yaml

Configuration File Reference

applicationConfig/actionConfig.yaml - Action Routing

SCP_APPROVE:
compositeApiName: SapBtpWorkflowTaskApi
keyConfigName: sapKeys
dbStructureFileName: incture_sap_db_redesign
origin: SCP
compositeRequest:
- referenceId: sap_btp_workflow_action
isCallMandatory: true

applicationConfig/systemJobConfig.yaml - Scheduler Job Definitions

SCP:
compositeApiName: SapBtpWorkflowTaskApi
keyConfigName: sapKeys
dbStructureFileName: incture_sap_db_redesign
origin: SCP
compositeRequest:
- referenceId: getTasks
isCallMandatory: true

applicationConfig/systemStatusConfig.yaml - Status Mapping

DocuSign:
"sent": READY
"completed": COMPLETED
"delivered": READY
"voided": COMPLETED
"created": DRAFTED
"declined": COMPLETED

applicationConfig/customattribute.yaml - Custom Attribute Extraction

sapKeys:
"[getTasks./attributes/id]": getTasks./attributes/value

applicationConfig/orderByConfig.yaml - Task List Sorting

AssignedToMe: ' order by "updatedOn" asc'
CreatedTask: ' order by "createdOn" asc'
CompletedTasks: ' order by "completedAt" asc'
SubstitutedByMe: ' order by "updatedOn" asc'

applicationConfig/tableDuplicateColums.yaml - Upsert Update Columns

CW_ITM_WN_TASKS:
- STATUS
- UPDATED_BY
- UPDATED_ON
- COMPLETED_AT
- COMPLETED_BY
- CREATED_BY

composite/{CompositeApiName}.yaml - Composite API Chain Definition

compositeApiName: SapBtpWorkflowTaskApi
compositeRequest:
- method: POST
path: https://<auth-server>/oauth/token
referenceId: getAccessToken
multiValues:
grant_type: client_credentials
client_id: <client_id>
client_secret: <client_secret>
headers:
Content-Type: application/x-www-form-urlencoded
isCallMandatory: true
isAction: false

- method: GET
path: https://<api-gateway>/workflow/rest/v1/task-instances
referenceId: getTasks
params:
status: READY&status=RESERVED
"$expand": attributes
headers:
Authorization: Bearer @(getAccessToken./access_token)
isCallMandatory: false
isAction: false

dbStructureConfig/{fileName}.yaml - JSON-to-Database Column Mapping

CW_ITM_WN_TASKS:
TASK_ID: getTasks./id
SYSTEM_ID: "@(SCP)"
TASK_TYPE: getTasks./activityId
PROCESS_NAME: getTasks./workflowDefinitionId
PROCESS_ID: getTasks./workflowInstanceId
STATUS: getTasks./status
PRIORITY: "@(0)"
COMP_DEADLINE: "@((getTasks./createdAt)+10)"
CREATED_ON: getTasks./createdAt

dbYaml/dbYamlFile.yaml - System-to-Config Index

SCP:
processes:
- processName: discount.approval
dbYaml: incture_sap_db_redesign
- processName: price.list.approvals
dbYaml: incture_sap_db_redesign
DocuSign:
processes:
- processName: envelope_signing
dbYaml: docusign_db_structure

runtimeConfig/specialAttributes.yaml - Runtime Attribute Extraction

SCPa:
"[fetchTaskDetail./customFields/fieldName]": fetchTaskDetail./customFields/fieldValue

DocusignConfig.yaml and SalesforceConfig.yaml

Stored on Config Server for JWT assertion details (keys, audience, token endpoints, account/integration IDs).

How Configuration Files Work Together

SCHEDULER TRIGGER
1. systemJobConfig.yaml -> select compositeApiName
2. composite/*.yaml -> execute API chain
3. customattribute.yaml -> extract custom attributes
4. dbYaml/dbYamlFile.yaml -> resolve db structure file
5. dbStructureConfig/*.yaml -> map JSON to DB columns
6. tableDuplicateColums.yaml -> decide update columns on duplicate
7. systemStatusConfig.yaml -> map source statuses
8. Batch upsert into DB
USER ACTION
1. actionConfig.yaml -> resolve {SYSTEM}_{ACTION}
2. composite/*.yaml -> execute action chain
3. Validate response via actionSuccessCode
4. Update DB status or parse errorMsg path

Adding a New Source System (Configuration Only)

StepFileWhat to Define
1composite/{NewSystem}.yamlAPI chain: auth -> fetch tasks -> action steps
2dbStructureConfig/{new_system_db}.yamlJSON path -> DB column mapping for all tables
3applicationConfig/systemJobConfig.yamlAdd entry: {SystemId} -> composite + DB config
4applicationConfig/actionConfig.yamlAdd entries: {SystemId}_APPROVE, {SystemId}_REJECT, etc.
5applicationConfig/systemStatusConfig.yamlAdd status mapping for the new system
6dbYaml/dbYamlFile.yamlAdd system -> process list mapping
7applicationConfig/customattribute.yamlAdd custom attribute extraction rules (if needed)