Workday to SAP Worker (Employee) Migration

(0 reviews)

home

Moves a large set of workers from Workday to employees in SAP. You can trigger this manually or programmatically with an HTTP call.

Records are upserted so that the migration can be run multiple times without worrying about creating duplicates. This template uses batch to efficiently process many records at a time.

94d510f0-666b-49d4-848e-9daaaa571b3b-image.png

License Agreement

This template is subject to the conditions of the MuleSoft License Agreement. Review the terms of the license before downloading and using this template. You can use this template for free with the Mule Enterprise Edition, CloudHub, or as a trial in Anypoint Studio.

Use Case

As a Workday admin I want to migrate Workers from Workday to SAP as Employees.

This template leverages the Mule batch module. The batch job is divided into Process and On Complete stages.

  1. The integration is triggered by an HTTP request. The template in the batch input stage queries Workday for active workers that were created or modified within the configured time frame.
  2. In the batch Process stage the matching employee data (if it exists) is fetched from SAP (based on the email) and mapped to the SAP input data structure.
  3. Afterwards, each employee data is sent to the destination instance, SAP, where the existing employee is updated or new one is created.
  4. Finally, within the On Complete stage, the template will provide batch statistics to both the preconfigured email recipient and to the console.

Considerations

There are certain prerequisites that must be considered to run this template. All of them deal with the preparations in both source and destination systems, that must be made for the template to run smoothly. Failing to do so can lead to unexpected behavior of the template.

Workday email uniqueness: The email can be repeated for two or more workers (or missing). Therefore Workday workers with duplicate emails are removed from processing in the Process stage.

Disclaimer

This template uses a few private Maven dependencies from MuleSoft to work. If you intend to run this template with Maven support, you need to add three extra dependencies for SAP to the pom.xml. See SAP XML and Maven Support.

SAP Considerations

Here's what you need to know to get this template to work with SAP.

As a Data Destination

This template uses custom BAPI functions, which you can create with the function module ZHCMFM_NUMBER_GET_NEXT in transaction SE37 as per source file ZHCMFM_NUMBER_GET_NEXT.abap. These files are in src/main/resources in the source directory.

Workday Considerations

As a Data Source

There are no considerations with using Workday as a data origin.

Run it!

Simple steps to get this template running.

Running On Premises

In this section we help you run this template on your computer.

Where to Download Anypoint Studio and the Mule Runtime

If you are new to Mule, download this software:

Note: Anypoint Studio requires JDK 8.

Importing a Template into Studio

In Studio, click the Exchange X icon in the upper left of the taskbar, log in with your Anypoint Platform credentials, search for the template, and click Open.

Running on Studio

After you import your template into Anypoint Studio, follow these steps to run it:

  1. Locate the properties file mule.dev.properties, in src/main/resources.
  2. Complete all the properties required per the examples in the "Properties to Configure" section.
  3. Right click the template project folder.
  4. Hover your mouse over Run as.
  5. Click Mule Application (configure).
  6. Inside the dialog, select Environment and set the variable mule.env to the value dev.
  7. Click Run.

Running on Mule Standalone

Update the properties in one of the property files, for example in mule.prod.properties, and run your app with a corresponding environment variable. In this example, use mule.env=prod.

Running on CloudHub

When creating your application in CloudHub, go to Runtime Manager > Manage Application > Properties to set the environment variables listed in "Properties to Configure" as well as the mule.env value.

Deploying a Template in CloudHub

In Studio, right click your project name in Package Explorer and select Anypoint Platform > Deploy on CloudHub.

Properties to Configure

To use this template, configure properties such as credentials, configurations, etc.) in the properties file or in CloudHub from Runtime Manager > Manage Application > Properties. The sections that follow list example values.

Application Configuration

Application Configuration

  • http.port 9090
  • page.size 100
  • migration.startDate 2019-09-18T12:00:00.000Z
Workday Connector Configuration
  • wday.username bob.dylan@orga
  • wday.tenant org457
  • wday.password DylanPassword123
  • wday.host servise425546.workday.com

SAP Connector Configuration

  • sap.jco.ashost your.sap.address.com
  • sap.jco.user SAP_USER
  • sap.jco.passwd SAP_PASS
  • sap.jco.sysnr 14
  • sap.jco.client 800
  • sap.jco.lang EN

SAP HR Configuration

  • sap.hire.org.COMP_CODE 3000
  • sap.hire.org.PERS_AREA 300
  • sap.hire.org.EMPLOYEE_GROUP 1
  • sap.hire.org.EMPLOYEE_SUBGROUP U5
  • sap.hire.org.PERSONNEL_SUBAREA 0001
  • sap.hire.org.LEGAL_PERSON 0001
  • sap.hire.org.PAYROLL_AREA PR
  • sap.hire.org.COSTCENTER 4130
  • sap.hire.org.ORG_UNIT 50000590
  • sap.hire.org.POSITION 50000046
  • sap.hire.org.JOB 50052752
  • sap.hire.personal.PERSIDNO 50052755
  • sap.hire.hr_infotype.TO_DATE 50052757
  • sap.hire.default.dob 1980-01-01
SMTP Services Configuration
  • smtp.host smtp.gmail.com
  • smtp.port 587
  • smtp.user exampleuser@gmail.com
  • smtp.password ExamplePassword456

Email Details

  • mail.from batch.migrateworkers.migration%40mulesoft.com
  • mail.to your.addres@yourcompany.org
  • mail.subject Batch Job report

API Calls

There are no special considerations regarding API calls.

Customize It!

This brief guide provides a high level understanding of how this template is built and how you can change it according to your needs. As Mule applications are based on XML files, this page describes the XML files used with this template. More files are available such as test classes and Mule application files, but to keep it simple, we focus on these XML files:

  • config.xml
  • businessLogic.xml
  • endpoints.xml
  • errorHandling.xml

config.xml

This file provides the configuration for connectors and configuration properties. Only change this file to make core changes to the connector processing logic. Otherwise, all parameters that can be modified should instead be in a properties file, which is the recommended place to make changes.

businessLogic.xml

This file holds the functional aspects of the template (points 2. to 4. described in the template overview). Its main component is a batch job, and it includes steps for executing the broadcast operation from Workday to SAP.

endpoints.xml

This file should contain every inbound endpoint of your integration app. It is intended to contain the application API.
In this particular template, this file contains a HTTP connector that listens for HTTP request to specified URL to trigger the batch processing.

errorHandling.xml

This file handles how your integration reacts depending on the different exceptions. This file provides error handling that is referenced by the main flow in the business logic.


Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onNov 14, 2018
Asset overview

Asset versions for 2.1.x

Asset versions
VersionActions
2.1.0

Categories

Pattern
MigrationNo values left to add
Object
EmployeeWorkerNo values left to add
Functions
Enterprise ITNo values left to add
Products
WorkdaySAPNo values left to add