Skip to content

A Workday command-line interface (CLI) for working with files (Drive, Documents, Photos) and deploying Workday Studio integrations without Workday Studio.

License

swhitley/CLARiNET

Repository files navigation

CLARiNET

A Workday command-line interface (CLI) for working with files (Drive, Documents, Photos) and deploying Workday Studio integrations without Workday Studio.

Windows or Mac

Workday Drive Features

  • Upload files in bulk to Workday Drive. Load files for different Workday user accounts.
  • Send files to the Workday Drive Trash.

Documents

  • Mass file upload to Worker Documents.
  • Select a different document category with each run.

Profile Pictures

  • Download or upload worker profile pictures.

CLAR Backup and Versioning

  • Quickly download and backup a unique version of a CLAR file.
  • Add the backup feature to the Workday Studio menu.

CLAR Deployment: Why deploy CLAR files with CLARiNET?

You might be asking yourself, "Why load a CLAR file from outside of Workday Studio?"

  • Distribute an integration to someone who is not a developer.
  • Enable an operations role to move an integration to production without requiring development tools.
  • Migrate an integration from a laptop that hasn't been configured for Studio.
  • Save time when reloading integrations to Sandbox following the weekly refresh.

Installation

  1. Download the latest release for your operating system (Mac or Windows).
  2. Unzip the executable files into a new directory.
  3. Run clarinet --help to view the available options.
  4. You may need to install the dotnet core runtime.
  5. Optional: Download Test.clar to try it out.

Notes:

  • When uploading CLAR files, CLARiNET calls an unpublished Workday API endpoint. Functionality is not guaranteed.
  • The Drive API is published and fully-supported by Workday.
  • On a Mac, you will be blocked from executing CLARiNET by an "Unidentified Developer" warning. Use Ctrl-Click or right-click to open CLARiNET.

Uploading files to Workday Drive

  • Domains: Ensure you have enabled Modify access on Report/Task and Integration permissions for the following domains in Workday:
    • Drive Administrator
    • Drive Web Services
  • Ensure that a directory named inbound has been created alongside the clarinet program file. The directory will be created automatically when clarinet is executed.
  • Place each file in the inbound directory with the following file name format: {Workday User Account}~{File Name}
    Example: swhitley~MyExampleFile.txt
  • Enter clarinet on a line by itself. The application will prompt for all necessary information.
  • The clarinet command is DRIVE_UPLOAD.
  • Each file in the inbound directory will be uploaded to the drive for the appropriate Workday user account. The file name in Workday Drive will only show the text following the tilde (~).
  • Once uploaded successfully, each file will be moved to the processed directory.

Sending Drive files to the Trash

  • Create a comma-separated value (CSV) file with the following layout:
    {Workday User Account (Owned By)},{File Name},{Drive Document Workday ID (WID)}
    Example: swhitley,MyExampleFile.txt,8a8a350990e401003bb7a37564c10000
  • In the file, use the Workday account of the original file owner, or it will be changed during this operation.
  • Place the file in the same folder as the clarinet application.
  • When naming the file, it will be convenient to include the word trash.
  • Enter clarinet on a line by itself. The application will prompt for all necessary information.
  • The clarinet command is DRIVE_TRASH.

Please note that a file is not deleted when sent to the trash. Files can be individually restored from the trash if needed.

Uploading files to Worker Documents

  • Ensure that a directory named inbound has been created alongside the clarinet program file. The directory will be created automatically when clarinet is executed.
  • Place each file in the inbound directory with the following file name format: {Workday Employee ID}~{File Name}
    Example: 500117~MyExampleFile.txt
  • Enter clarinet on a line by itself. The application will prompt for all necessary information.
  • The clarinet command is DOCUMENT_UPLOAD.
  • Enter the document category reference id in the CLARiNET Parameters option. This document category will be used for all files.
  • Each file in the inbound directory will be uploaded to worker documents for the appropriate Workday employee. The file name will only show the text following the tilde (~).
  • Once uploaded successfully, each file will be moved to the processed directory.

Download Profile Pictures (Employee Photos)

  • Create a CSV file with a list of employee ids (one id on each line).

    • This is the list of workers that will be used to download photos.

    • If any of the workers are contingent workers, add Contingent_Worker_ID as the second field of the CSV.

      Example:

      500117

      500118,Contingent_Worker_ID

  • Place the CSV file in the directory to which the photos should be downloaded.

  • Enter clarinet on a line by itself. The application will prompt for all necessary information.

  • The clarinet command is PHOTO_DOWNLOAD.

  • The Path option should point to the path where the CSV file is located.

  • The Parameter option should be the name of the CSV file.

  • Run clarinet --help to view the available options.

  • Run clarinet -w to view the list of Workday environments and the associated numbers.

Uploading Profile Pictures (Employee Photos)

  • Ensure that a directory named inbound has been created alongside the clarinet program file. The directory will be created automatically when clarinet is executed.
  • Place each file in the inbound directory with the following file name format: {Workday Employee ID}~{File Name}
    Example: 500117~MyPhoto.png
  • Enter clarinet on a line by itself. The application will prompt for all necessary information.
  • The clarinet command is PHOTO_UPLOAD.
  • Each file in the inbound directory will be uploaded for the appropriate Workday employee. The file name will only show the text following the tilde (~).
  • Once uploaded successfully, each file will be moved to the processed directory.

Download a snapshot of a CLAR file from Workday

  • Enter clarinet on a line by itself. The application will prompt for all necessary information.
  • The clarinet command is CLAR_DOWNLOAD.
  • Run clarinet --help to view the available options.
  • Run clarinet -w to view the list of Workday environments and the associated numbers.
  • The downloaded CLAR file name will include the Cloud Collection name and a timestamp.
  • In addition to the CLAR file, the integration system configuration will be downloaded to an XML file.

Loading a CLAR file to Workday

  • Enter clarinet on a line by itself. The application will prompt for all necessary information.
  • The clarinet command is CLAR_UPLOAD.
  • If a single .clar file is found in the same directory, CLARiNET will automatically select that file for processing.
  • Run clarinet --help to view the available options.
  • Run clarinet -w to view the list of Workday environments and the associated numbers.

Run CLARiNET from the command line using positional parameters:

  • %1 CLARiNET Command: CLAR_UPLOAD, CLAR_DOWNLOAD, DRIVE_UPLOAD, DRIVE_TRASH, PHOTO_DOWNLOAD, DOCUMENT_UPLOAD
  • %2 Path or Path and File Name
  • %3 Parameters for the command. Enter the Cloud Collection name when performing a CLAR_UPLOAD or CLAR_DOWNLOAD. For other commands, defaults will be used
  • %4 Workday Environment Number (run clarinet -w to see the list of numbers)
  • %5 Tenant
  • %6 Username
  • %7 Encrypted Password (run clarinet -e to encrypt a password)

Example: clarinet CLAR_UPLOAD "C:\example_folder\Test.clar" Test 7 mytenant myusername AQAAANCMnd8BFdERjHoAwE/Cl+...G3Q=

The entire list of parameters is not required. Prompts will appear for the parameters that are not included. These are all valid examples:

Example #1: clarinet CLAR_UPLOAD "C:\example_folder\Test.clar"

Example #2: clarinet CLAR_UPLOAD "C:\example_folder\Test.clar" Test 7 mytenant myusername

Example #3: clarinet CLAR_UPLOAD "C:\example_folder\Test.clar" Test

Sample clarinet Run

image

Downloading CLAR files from Workday Studio

CLARiNET can be run from within Workday Studio. The External Tools feature of Workday Studio (Eclipse) allows you to add custom executables to your Workday Studio menu After adding CLARiNET to Workday Studio, you can click on a project in Project Explorer and then click on the CLARiNET menu item to backup the CLAR file.

image

External Tools Configuration

  1. In Workday Studio, click Run on the menu.

  2. Navigate to External Tools -> External Tools Configurations...

  3. Select Program. Click New launch configuration (icon in the farthest left position of the External Tools dialog box).

  4. Give the configuration a name. Example: "CLARiNET Production Backup"

  5. For my setup, I placed the CLARiNET executable in my Workday workspace directory.

  6. Select an executable in the Location field.

     Example 1: ${workspace_loc}\CLARiNET.exe 
     ${workspace_loc} is an external tools variable that will convert to the workspace directory when run.
     
     Example 2: C:\CLARiNET\CLARiNET.exe 
    
  7. Set the Working Directory.

     Example 1: ${workspace_loc}
     
     Example 2: C:\CLARiNET
    
  8. Set the Arguments.

     Example: CLAR_DOWNLOAD "" "${project_loc}" {environment number} {tenant name} {username} {encrypted password} 
     ${project_loc} is an external tools variable that will convert to the project directory. 
     
     CLARiNET will use the last directory name of the project path as the `Cloud Collection`.
    
  • Run CLARiNET with the "-w" parameter to get the environment number.
  • Run CLARiNET with the "-e" parameter to generate an encrypted password.

Credits

Command Line Parser - https://github.com/commandlineparser/commandline (MIT)

CLARiNET is compatible with Workday® It is not sponsored, affiliated with, or endorsed by Workday.

About

A Workday command-line interface (CLI) for working with files (Drive, Documents, Photos) and deploying Workday Studio integrations without Workday Studio.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages