Custom scripting

Introduction

'Out of the box', Patchworks pulls data from a source system and pushes it into a destination system, using field mappings to decide where each item of source data should be placed in the destination system.

Patchworks provides default mappings which can be adjusted if needed, and a comprehensive set of transform functions that can be used if your source data doesn't quite slot neatly into the destination.

However, requirements for manipulating source data can be more complex than any standard set of transform functions can handle. If this is your position and you have developer experience in-house, custom scripting can be used to write and maintain your own scripts.

Using our integrated editor with IntelliSense, you can get as complex as you need with a choice of coding languages.

How are custom scripts used?

Once a script is deployed, it can be selected for use in process flows via:

Supported languages

The following coding languages are currently supported for custom scripting:

LanguageVersion(s)

C#

8.0

Javascript

Node 18

PHP

8.1

Python

3

Ruby

3

Supported libraries & packages

Default packages are available for supported coding languages. Additionally:

LanguagePackage/libraryVersionSummary

Javascript (JS Node)

jsrsasign

^10.8.6

For encryption and JWT support.

xml-js

^1.6.11

For XML support in javascript functions.

PHP

phpseclib/phpseclib

~3.0

For connecting to SFTP/SSH and various other secure connection types.

bcmath

-

Provides arbitrary precision arithmetic operations.

SSH-2.0-libssh2_1.11.0

1.11.0

Provides functions for accessing remote machines using the secure SSH and SFTP protocols.

If you require additional libraries you can:

  • embed them in your script directly

  • submit a request to Patchworks support for a library to be included globally

Last updated