1.1.16 • Published 3 years ago

nwc-package v1.1.16

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

nwc-package

Welcome to the unofficial Nintex Workflow Cloud Package and Deployment repository. This tool can be used to programmatically package, deploy, configure and publish NWC workflow across tenants.

  • Package all workflows marked with a specific tag in a JSON formatted file, with non-expiring export keys.
  • Identify relations between component workflows and come up with a proper deployment order
  • Identify required connections for the packaged workflows
  • Export the workflow definitions to JSON files to be included in a version control system of choice.
  • Identify matching connection to the target tenant based on the connectors used by the packaged workflows
  • Deploy and published the package to a different tenant

The tool is created using typescript, with all available type and interface definitions included.

Disclaimer: This is an unofficial, community driven effort, not officially supported ny Nintex.

Installation

  1. Add the tool to your node.js project using npm: npm -i nwc-package
  2. Follow the nwc-sdk documentation to configure a connection to your tenant.

Code Samples

Packaging

 public static async createPackage() : Promise<NWCPackageManager> {
	const nwcPackageManager = new NWCPackageManager('MyTag');
	nwcPackageManager.setLogging(true, true);
	await nwcPackageManager.connect(sourceConnectionConfig);
	await nwcPackageManager.buildPackage(true, './output');
	writeFileSync(`./output/${nwcPackageManager.package.key}-package.json`, JSON.stringify(nwcPackageManager.package));
	return nwcPackageManager;
}

Get matching connecions

public static async getMatchingConnections() {
	const nwcPackageManager = new NWCPackageManager(undefined, NWCPackageManager.loadPackage('./output/MyTag-package.json'));
	await nwcPackageManager.connect(targetConnectionConfig);
	const connections = await nwcPackageManager.getMatchingConnectionInfos();
	writeFileSync(`./output/connections.json`, JSON.stringify(connections));
}

Deploying

  public static async deployPackage(reuseExistingWorkflows: boolean) {
	const targetConnections = JSON.parse(readFileSync('./output/connections.json', 'utf-8')) as INWCConnectionInfo[];
	const nwcPackageManager = new NWCPackageManager(undefined, NWCPackageManager.loadPackage('./output/MyTag-package.json'));
	nwcPackageManager.setLogging(true, true);
	await nwcPackageManager.connect(targetConnectionConfig);
	await nwcPackageManager.deploy(targetConnections, reuseExistingWorkflows);
}
1.1.16

3 years ago

1.1.15

3 years ago

1.1.14

3 years ago

1.1.13

3 years ago

1.1.9

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago