Showing posts with label EIB Outbound. Show all posts
Showing posts with label EIB Outbound. Show all posts

Thursday, July 28

XSLT - Remove Special Characters Function

Remove Special Characters Function


Which ever characters are allowed, provide it in the select. Anything other than provided characters will be considered as special characters.

<xsl:function name="stripSpecialChars">
    <xsl:param name="string" />
    <xsl:variable name="AllowedSymbols" select ="'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789()*%$#@!~&lt;&gt;,.?[]=- +   /\ '"/>
    <xsl:value-of select="translate($string,translate($string, $AllowedSymbols, ''),' ')"/>
</xsl:function>


<xsl:value-of select="stripSpecialChars($string)"/>


For your information -

&lt;  ---> Less Than Symbol
&gt; ---> Greater Than Symbol

Tuesday, July 26

XSLT - Calculate Week Number based on date

 Calculate Week Number based on date


Template with Parameters:

Defining Template 1- [This template calls another template below]

   <xsl:template name="calculate-week-number">
        <xsl:param name="year"/>
        <xsl:param name="month"/>
        <xsl:param name="day"/>
        
        <xsl:variable name="j-day">
            <xsl:call-template name="calculate-julian-day">
                <xsl:with-param name="year" select="$year"/>
                <xsl:with-param name="month" select="$month"/>
                <xsl:with-param name="day" select="$day"/>
            </xsl:call-template>
        </xsl:variable>
        
        <xsl:variable name="d4" 
            select="($j-day + 31741 - ($j-day mod 7)) 
            mod 146097 mod 36524 mod 1461"/>
        
        <xsl:variable name="L" select="floor($d4 div 1460)"/>
        
        <xsl:variable name="d1" select="(($d4 - $L) mod 365) + $L"/>
        
        <xsl:value-of select="floor($d1 div 7) + 1"/>
        
    </xsl:template>

Defining Template 2 - [Used by above template]

    <xsl:template name="calculate-julian-day">
        <xsl:param name="year"/>
        <xsl:param name="month"/>
        <xsl:param name="day"/>
        
        <xsl:variable name="a" select="floor((14 - $month) div 12)"/>
        <xsl:variable name="y" select="$year + 4800 - $a"/>
        <xsl:variable name="m" select="$month + 12 * $a - 3"/>
        
        <xsl:value-of select="$day + floor((153 * $m + 2) div 5) + $y * 365 + 
            floor($y div 4) - floor($y div 100) + floor($y div 400) - 
            32045"/>
        
    </xsl:template>


Calling Template - [The returned value is stored in the variable WeekNumber]

<xsl:variable name="WeekNumber">            
    <xsl:call-template name="calculate-week-number">
        <xsl:with-param name="day" select="day-from-date($Start_Date)"/>
        <xsl:with-param name="month" select="month-from-date($Start_Date)"/>
        <xsl:with-param name="year" select="year-from-date($Start_Date)"/>
    </xsl:call-template>
</xsl:variable>

Monday, July 25

XSLT Functions with Examples

 XSLT Functions with Examples


Always remember while you are coding XSL Transformation, your input for your xsl is XML. 
i.e. your XSL code is based on the XML.

Below are most commonly used XSLT coding functions and methods. This is not an exhaustive list though.

How to Declare a variable:

<xsl:variable name="Newline" select="'&#xa;'"/>
<xsl:variable name="Tab" select="'&#9;'"/>
                <xsl:variable name="NumberFormat" select="'0.00'"/>
                <xsl:variable name="DateFormat" select="'[M01]/[D01]/[Y0001]'"/>
                <xsl:variable name="Pipe" select="'|'"/>
                <xsl:variable name="SplChar" select="'$@!%^&*()- '"/>
                <xsl:variable name="FillerZeros" select="'0000000000000000000000'"/>


How to use the variable which was declared: [Use $]

          <xsl:value-of select="$Newline"/>


Simple Text:
    <xsl:text>Test</xsl:text>


Concat Function:

   Example1:    <xsl:value-of select="concat(wd:Email,$Pipe)"/>
   Example2: <xsl:value-of select="concat('Y',$Pipe)"/>


Translate Function: [Use when you want to replace something]

       <xsl:value-of select="translate(wd:phone, '+().- ', '')" />


Sort Usage:

        <xsl:sort select="wd:Location"/>  


String-length Function:

         <xsl:when test="string-length(wd: Zip) = 8">  
Your Values Here
         </xsl:when>


Exists Function:

           <xsl:when test="exists(wd:Primary_Email)">   
Your Values Here
           </xsl:when>


Count Function:

   Example 1:        <xsl:value-of select="count(//wd:Report_Entry)"/>
   Example 2:        <xsl:value-of select= "count (//wd:Report_Entry[wd:Benefits/wd:Coverage='Family']/wd:Dependents)"/>


Format Date Function:

     Example 1:   <xsl:value-of select="format-date(current-date(),'[Y0001]-[M01]-[D01]')"/>
     Example 2:   <xsl:value-of select="format-date(wd:DateOfBirth,'[Y0001][M01][D01]')"/>


Format Number Function:

    <xsl:value-of select="format-number(wd:amount,$numberFormat)"/>


Substring Function:

         <xsl:value-of select="substring(wd:Work_Phone,3,10)"/>


Substring Before Function:

        <xsl:value-of select="substring-before(wd:Division/@wd:Descriptor,':')"/>


If Condition:

    <xsl:if test="wd:Gender = 'M'">
             .
             .            
            Your code here
             .
             .
    </xsl:if>


Choose and When Function:

  <xsl:choose> 
             <xsl:when test="(wd:Worker_Status = 'On Leave')"> 
                     <xsl:value-of select="'L'"/> 
             </xsl:when>
             <xsl:otherwise> 
                     <xsl:value-of select="'A'"/> 
             </xsl:otherwise> 
 </xsl:choose>


'For' Loop Function:

    Example 1:

   <xsl:for-each select="wd:Report_Data/wd:Report_Entry">
             .
             .            
            Your code here
             .
             .
       </xsl:for-each> 

    Example 2: [Using Group-by]

        <xsl:for-each-group select="wd:Report_Data/wd:Report_Entry" group-by="wd:Location">
             .
             .            
            Your code here
             .
             .
       </xsl:for-each> 


Other Text conditions in When Fuction:

Condition 1:
          <xsl:when test="(wd:Class_Item = '001' or wd:Class_Item = '002')">     
Your Values Here
  </xsl:when>

Condition 2:
         <xsl:when test="(wd:Benefits[1]/wd:Enrolment_Date) != ''">
Your Values Here
         </xsl:when> 

Condition 3:
         <xsl:when test="(wd:Class_Item = '002' and wd:Benefit_Changes[1]/wd:SubType ='T')">    
Your Values Here
         </xsl:when>


Template Declaration and Usage:

Calling Templates -

    <xsl:template match="/">
        <xsl:call-template name="HeaderRecord"/>
        <xsl:call-template name="DetailRecords"/>
    </xsl:template>

Defining Template -

    <xsl:template name="HeaderRecord">
             .
             .            
            Your code here
             .
             .
    </xsl:template>

Wednesday, July 20

MIME

 Multipurpose Internet Mail Extensions

MIME is the acronym of Multipurpose Internet Mail Extensions. MIME type is an optional field on your integrations. 

Instead of you defining your extension along with your File name, you may choose among the listed extension types for the output file. This option doesn't change the actual file format. To change the file format you need to select an alternate output format in Get Data or modify your transformation in Transformation Data tabs.



Wednesday, January 15

Integrations: Workday Web Services

Workday Web Services (WWS)

To access the Workday web services, you do not need community access. You can simply search on google and find the links as shown below.

This link below holds all the versions of workday web services. Click to view.

Version Directory

This link below shows all the public web services that you can access and the detailing of its attributes and properties. Click to view.

Workday Web Services

Example below:
Human_Resources is the Service
Change_Emergency_Contacts is the operation that you can perform.


As of today Jan 15th 2020, there are 43 broader services that you can find. Each of these services contain Operations.

You will be able to download the wsdl and xsd definitions.

  • WSDL - Web Services Description Language
  • XSD    - XML Schema Definition

Also notice that if any services were deprecated, they will be shown next to the operation.

Wednesday, June 19

How to Know When the Tenant is Available after Schedule Updates

How to Know When the Tenant is Available after Schedule Updates

Your tenants some times may be available before the scheduled end time.  If you would like to be notified when any of your tenants become available after a Weekly Service Update or a Workday Feature Release,

Follow the below sequence of steps in which ever tenant the notification is required:

  1. Create Custom Report - You can create your custom report with any report data source and fields. 
  2. Create a new EIB Outbound Integration and use the newly created custom report as the data source. No Transformation required.
  3. Use ‘Workday Attachment’ as the Delivery Method.
  4. Set up the EIB Integration Notification (Trigger on Launch) to trigger when this EIB is launched. - Provide email IDs or Distribution list as who need to receive the notification also configure the Subject appropriately to indicate that your (PROD / Sandbox / Implementation etc.,) Workday tenant is available
  5. Schedule the EIB to run after the maintenance window begins.( Weekly Recurrence 6:30pm PT on Friday for Sandbox and 12:30 am PT on Saturday for Production) 
  6. When the service update is complete, the EIB will trigger automatically, and the notification email will be sent to indicate the tenant's availability.
Specially for Sandbox notifications, create the schedule in your Production tenant so that it copies over during the weekly Sandbox refresh.

Restricted to Environment - Sandbox  6:30pm PT on Friday
Restricted to Environment - Production 12:30 am PT on Saturday
Workday is planning for zero downtime as part of roadmap so, the above process would no longer be needed for the users to configure.

Thursday, June 13

Interview Questions: EIB

Workday EIB Interview Questions


Here is the list of Interview Questions related to EIB - Enterprise Interface Builder Integrations.


What is EIB and what are the types of EIB?

EIB - Enterprise interface builder tool which is used to build simple inbound and outbound Integrations to connect workday with external endpoints.
Types:
      Inbound
     Outbound 

How many steps are involved in creation of an EIB?
3 Steps / Phases
Get Data, Transform, Deliver

What are outbound EIB?
Outbound EIBs are used to export data from workday. We can also send this exported data to any external vendors or legacy systems through different endpoints such as SFTP/FTP etc.
E.g. Send Dependents data to Benefits vendor from workday.

What are Inbound EIB?
Inbound EIB Integration are used to upload data into Workday from external endpoints or from spreadsheets.
E.g. Inserting One Time Payments, Inserting Bonus Data, Update Emergency Contacts 
We can upload data to workday using spreadsheet attachment or external file from SFTP/FTP/EMAIL locations.

What are the main types of Workday Integrations?
          Workday Studio Integration, 
          Enterprise Information Builder (EIB) Integration, 
          Cloud Connect Integration.

How do you choose which tool is best out of three integrations available?
Few things needs to be considered while choosing the integration tool. Here is what you need to identify first in place.
Is the solution already pre-built? Am I connecting to a third-party vendor with a solution already in place? – If yes, most likely you will choose a Core Connector (Packaged Connector).

Does this integration just need to export or import some data into Workday? – If yes, then most likely you need to go with EIBs.

Do I need to execute several rules, and reports to get the data and calculate the results I need? For example: Determining payroll between Exempt and Non-Exempt employees, calculate deductions, etc. – If yes, then most likely you need a Workday Studio Integration.

Can we create an EIB with the help of matrix report?
No, the reason being reports need to be Web Service enabled for creating EIB and Matrix reports can’t be Web Service enabled.

Can we use all advance reports as a data source in EIB?
 No, we cannot use all advance reports in EIB. We can use only those reports which are web service enabled.

Can we use simple reports as a data source in EIB?
No

What are the types of transformation allowed with EIB?
We can use 3 types of transformation with EIB:

Custom report Transformation -This type is inbuilt transformation of EIB and have limited functionality.
Custom transformation - In this we have to attach XSLT with EIB and supports XSLT functionality. So, this has more features than Custom report Transformation. Learn here w3schools
Document Transformation -This is type of connector that we can connect with EIB and will supports all functionality of Document transformation such as XTT and ETV.

What are the limitations of EIB?
Only one data source can be used. And only one destination point can be configured for one tenant. Can’t define output tag in EIB.

What data sources can we choose while creating the EIB outbound?
EIB outbound is to export the data from Workday.
Data Source - Custom report or Web Services or REST URL

What data sources can we choose while creating the EIB Inbound?
EIB Inbound is to Import the data into Workday.
Data Source - Attachment or External file or REST Endpoint

Name some Web services that you have used for inbound EIB Load?
Request One-Time Payment (OTP)
Change Emergency Contacts
Request Compensation Change
Terminations

While performing EIB Inbound load what should we do to avoid get pending actions / Tasks in inbox?
This represents, when you do a load through EIB the underlying BP/task should get complete without going for any approvals. Because your load may be huge , say 10,000 EE bonus data you are loading at that time, there shouldn't be any workflow triggering for approvals. So, while filling the Inbound Spreadsheet template, we need to select “Automatic processing” on first tab. This will skip the BP's

Where can you view Error messages for an EIB?
You can view the EIB run through Integration Events , Process Monitor

Name some input and output types for EIBs?
Input:   SFTP/FTP, REST, or attachment 
Output: SFTP/FTP, HTTP, Email, CSV, JSON, XML, etc

EIB Integration issues with Scenarios and Resolutions


Scenario 1: The EIB does not display in the integration prompt of the Launch/Schedule Integration task.
Resolution: Verify EIB security Configuration. Edit the EIB and resolve any critical errors.

Scenario 2: Non-legible character appears in Microsoft Excel when you open a CSV output file.
Resolution: Before opening the CSV file in Excel, open the CSV in notepad , Then select File>>save as, UTF-8 encoding.

Scenario 3: File name does not include generated date and time variables when the sequence Generator is configured correctly.
Resolution: When launching or scheduling the EIB, Use these settings with the file name launch parameter.
Value type: Determine value at run time
Value: Next sequence for integration File Utility.

Scenario 4: Workday returns the following error message: Root Cause: BadRequestException: Error code: unknown Response: 500: Processing error occurred. No value provided for required [Prompt Name].
Resolution:  Ensure that all required prompts are being populated when the EIB is launched. You may have to edit the scheduler if the EIB was launched from there.

Scenario 5: Workday returns the following error: Transform failed at component: HandleTransform.request.0.XsltTransform. Reason: Output character not available in this encoding
Resolution: 
  1. Open the XSLT transformation file in a text editor.
  2. Find the element <xsl: output>.
  3. Within that element, search for the setting for encoding=.
  4. Often this is set to ISO-8859-1 Change this value to UTF-8.
If the recipient of the EIB cannot accept UTF-8-encoded files, then you must change the source data in Workday.

Additional Reads

Workday EIB Inbound
Workday EIB Outbound
Workday Core Connectors Interview Questions

I will be updating / adding some more questions