npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

itesoft-bpmn-sdk

v1.0.2

Published

[![npm version](https://badge.fury.io/js/itesoft-bpmn-sdk.svg)](https://badge.fury.io/js/itesoft-bpmn-sdk)

Downloads

2

Readme

itesoft-bpmn-sdk

npm version

Node.js SDK for Itesoft Engine API.

Table of Contents

How does it work?

itesoft-bpmn-sdk works as a connector between the customer and the Itesoft Engine API.

Install


$ npm install --save itesoft-bpmn-sdk

Basic usage

It can be imported with CommonJS, ES2015 modules, and preferably TypeScript.

The library is written in TypeScript and includes TypeScript definitions by default. Nevertheless, it can surely be used with plain JavaScript too.


// CommonJS
const itesoft = require('itesoft-bpmn-sdk');

// ES6 modules or TypeScript
import * as itesoft from 'itesoft-bpmn-sdk';

Configuration


import Client, {
  BasicAuthEngine,
  ClientConfig
} from "itesoft-bpmn-sdk";

const config: BasicAuthEngine = {
  // Username for the basic auth to the engine
  username: "USERNAME",
  // Password for the basic auth to the engine
  password: "PASSWORD",
};

const config: ClientConfig = {
  // Username for the basic auth to the engine
  apiUrl: "http://example.com",
};

new Client(basicAuth, clientConfig);

Custom header

You can add custom headers like that:


const clientConfig: ClientConfig = {
  apiUrl: "http://example.com",
  headers: {
    "CUSTOM-HEADER": "test",
  },
}

Logging

itesoft-bpmm-sdk can log http requests executed, if you active the log option like that:


const clientConfig: ClientConfig = {
  apiUrl: "http://example.com",
  log: true,
}

API Reference

Activity Instance

Get activity instances

Returns the activity instances matching the given filter

const client = new Client(basicAuth, clientConfig);

client.getActivityInstances(principal, attachment, filter, sortList, offset, maximumNumberOfResults)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Get activity instances count

Returns the number of results a search of activity instances will return

const client = new Client(basicAuth, clientConfig);

client.getActivityInstancesCount(principal, filter, cacheConfiguration)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Get activity instance by id

Returns the requested activity instance or an exception if the requested activity instance does not exist

const client = new Client(basicAuth, clientConfig);

client.getActivityInstanceById(activityInstanceId, principal, identifier, attachment)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Claim activity instance by id

Claims the user task instance for the connected user. Only a potential owner and not excluded owner can claim a user task instance

const client = new Client(basicAuth, clientConfig);

client.claimActivityInstanceById(activityInstanceId, principal, identifier)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Option claim activity instance by id

Option Claims the user task instance for the connected user. Only a potential owner and not excluded owner can claim a user task instance

const client = new Client(basicAuth, clientConfig);

client.optionClaimActivityInstanceById(activityInstanceId, principal, identifier)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Disclaim activity instance by id

Disclaims the user task instance for the connected user. Only a potential owner and not excluded owner can disclaim a user task instance

const client = new Client(basicAuth, clientConfig);

client.disclaimActivityInstanceById(activityInstanceId, principal, identifier)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Complete activity instance by id

Completes the given activity instance

const client = new Client(basicAuth, clientConfig);

client.completeActivityInstanceById(activityInstanceId, principal, identifier, dataEntries)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Save activity instance by id

Completes the given activity instance

const client = new Client(basicAuth, clientConfig);

client.saveActivityInstanceById(activityInstanceId, principal, identifier, dataEntries)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Assign activity instance potential owner

Assign an activity instance potential owner

const client = new Client(basicAuth, clientConfig);

client.assignActivityInstancePotentialOwner(activityInstanceId, principal, identifier, userIdentifier)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Unassign activity instance potential owner

Unassign an activity instance potential owner

const client = new Client(basicAuth, clientConfig);

client.unassignActivityInstancePotentialOwner(activityInstanceId, userId, principal, identifier, userIdentifier)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Authentication

Login

Logs in the given user with the given password. Allows to propagate the login to other modules.

const client = new Client(basicAuth, clientConfig);

client.login(username, password, propagate)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Logout

Logs the given principal out.

const client = new Client(basicAuth, clientConfig);

client.logout(principal)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Engine

Get engine core version

Returns the Engine Core version.

const client = new Client(basicAuth, clientConfig);

client.getEngineCoreVersion()
  .then(response => console.log(response))
  .catch(error => console.log(error));

Get engine check availability

Checks the engine service availability. If this method returns with no error,it means the server is still available.

const client = new Client(basicAuth, clientConfig);

client.getEngineCheckAvailability()
  .then(response => console.log(response))
  .catch(error => console.log(error));

Preference

Get preferences

Returns the preferences matching the given filter

const client = new Client(basicAuth, clientConfig);

client.getPreferences(principal, attachment, filter, sortList, offset, maximumNumberOfResults)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Get preference

Returns the preference matching the given identifier

const client = new Client(basicAuth, clientConfig);

client.getPreference(identifier, principal, attachment)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Process

Get process instantiable process identifiers

Returns the identifiers of processes that can be instantiate by the connected user. Each process identifier is associated with the available collaboration identifiers. null means theprocess can be instantiated in a standalone mode.

const client = new Client(basicAuth, clientConfig);

client.getProcessInstantiableProcessIdentifiers(principal)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Process instances

Get process instances

Returns the process instances matching the given filter.

const client = new Client(basicAuth, clientConfig);

client.getProcressInstances(principal, attachment, filter, sortList, offset, maximumNumberOfResults)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Get process instances count

Returns the number of results a search of process instances will return.

const client = new Client(basicAuth, clientConfig);

client.getProcressInstancesCount(principal, filter)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Get process instance by id

Returns the requested process instance or an exception if the requested process instance does not exist.

const client = new Client(basicAuth, clientConfig);

client.getProcressInstanceById(processInstanceId, principal,identifier, attachment)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Instantiate process instance

Instantiate a process and returns it's identifier.

const client = new Client(basicAuth, clientConfig);

client.instantiateProcessInstance(collaborationIdentifier, identifier, name, makeNameUnique, dataEntries, initializeAllData, attributes, principal)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Put process instance to terminate

Terminates the given process instance.

const client = new Client(basicAuth, clientConfig);

client.putProcessInstanceToTerminate(processInstanceId, principal, identifier)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Signal instance

Trigger signal instance

Triggers the given signal.

const client = new Client(basicAuth, clientConfig);

client.triggerSignalInstance(signalIdentifier, signalName, principal, payload)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Supports

Get supports by feature

Returns a boolean indicating if the feature is supported. This method can be used to manage ascending compatibility on client side.

const client = new Client(basicAuth, clientConfig);

client.getSupportsByFeature(feature)
  .then(response => console.log(response))
  .catch(error => console.log(error));

User

Get users

Returns the users matching the given filter.

const client = new Client(basicAuth, clientConfig);

client.getUsers(principal, attachment, filter, sortList, offset, maximumNumberOfResults)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Get user by id

Returns the user matching the given identifier.

const client = new Client(basicAuth, clientConfig);

client.getUserById(userId, principal, identifier, attachment)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Get user groups

Returns the groups of a user.

const client = new Client(basicAuth, clientConfig);

client.getUserGroups(userId, principal, identifier, attachment)
  .then(response => console.log(response))
  .catch(error => console.log(error));

Contributing

Thanks for wanting to contribute! Take a look at our Contributing Guide for notes on our commit message conventions and how to run tests.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

MIT

Copyright (c) 2019 SombreroElGringo