itesoft-bpmn-sdk
Node.js SDK for Itesoft Engine API.
Table of Contents
- How does it work?
- Install
- Basic usage
- API Reference
- Activity Instance
- Get activity instances
- Get activity instances count
- Get activity instance by id
- Claim activity instance by id
- Option claim activity instance by id
- Disclaim activity instance by id
- Complete activity instance by id
- Save activity instance by id
- Assign activity instance potential owner
- Unassign activity instance potential owner
- Authentication
- Engine
- Preference
- Process
- Process Instances
- Signal Instance
- Supports
- User
- Activity Instance
- Contributing
- License
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.
// CommonJSconst itesoft = ; // ES6 modules or TypeScript;
Configuration
; ; ; new ClientbasicAuth, clientConfig;
Custom header
You can add custom headers like that:
Logging
itesoft-bpmm-sdk can log http requests executed, if you active the log option like that:
API Reference
Activity Instance
Get activity instances
Returns the activity instances matching the given filter
; client.getActivityInstancesprincipal, attachment, filter, sortList, offset, maximumNumberOfResults .thenconsole.logresponse .catchconsole.logerror;
Get activity instances count
Returns the number of results a search of activity instances will return
; client.getActivityInstancesCountprincipal, filter, cacheConfiguration .thenconsole.logresponse .catchconsole.logerror;
Get activity instance by id
Returns the requested activity instance or an exception if the requested activity instance does not exist
; client.getActivityInstanceByIdactivityInstanceId, principal, identifier, attachment .thenconsole.logresponse .catchconsole.logerror;
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
; client.claimActivityInstanceByIdactivityInstanceId, principal, identifier .thenconsole.logresponse .catchconsole.logerror;
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
; client.optionClaimActivityInstanceByIdactivityInstanceId, principal, identifier .thenconsole.logresponse .catchconsole.logerror;
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
; client.disclaimActivityInstanceByIdactivityInstanceId, principal, identifier .thenconsole.logresponse .catchconsole.logerror;
Complete activity instance by id
Completes the given activity instance
; client.completeActivityInstanceByIdactivityInstanceId, principal, identifier, dataEntries .thenconsole.logresponse .catchconsole.logerror;
Save activity instance by id
Completes the given activity instance
; client.saveActivityInstanceByIdactivityInstanceId, principal, identifier, dataEntries .thenconsole.logresponse .catchconsole.logerror;
Assign activity instance potential owner
Assign an activity instance potential owner
; client.assignActivityInstancePotentialOwneractivityInstanceId, principal, identifier, userIdentifier .thenconsole.logresponse .catchconsole.logerror;
Unassign activity instance potential owner
Unassign an activity instance potential owner
; client.unassignActivityInstancePotentialOwneractivityInstanceId, userId, principal, identifier, userIdentifier .thenconsole.logresponse .catchconsole.logerror;
Authentication
Login
Logs in the given user with the given password. Allows to propagate the login to other modules.
; client.loginusername, password, propagate .thenconsole.logresponse .catchconsole.logerror;
Logout
Logs the given principal out.
; client.logoutprincipal .thenconsole.logresponse .catchconsole.logerror;
Engine
Get engine core version
Returns the Engine Core version.
; client.getEngineCoreVersion .thenconsole.logresponse .catchconsole.logerror;
Get engine check availability
Checks the engine service availability. If this method returns with no error,it means the server is still available.
; client.getEngineCheckAvailability .thenconsole.logresponse .catchconsole.logerror;
Preference
Get preferences
Returns the preferences matching the given filter
; client.getPreferencesprincipal, attachment, filter, sortList, offset, maximumNumberOfResults .thenconsole.logresponse .catchconsole.logerror;
Get preference
Returns the preference matching the given identifier
; client.getPreferenceidentifier, principal, attachment .thenconsole.logresponse .catchconsole.logerror;
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.
; client.getProcessInstantiableProcessIdentifiersprincipal .thenconsole.logresponse .catchconsole.logerror;
Process instances
Get process instances
Returns the process instances matching the given filter.
; client.getProcressInstancesprincipal, attachment, filter, sortList, offset, maximumNumberOfResults .thenconsole.logresponse .catchconsole.logerror;
Get process instances count
Returns the number of results a search of process instances will return.
; client.getProcressInstancesCountprincipal, filter .thenconsole.logresponse .catchconsole.logerror;
Get process instance by id
Returns the requested process instance or an exception if the requested process instance does not exist.
; client.getProcressInstanceByIdprocessInstanceId, principal,identifier, attachment .thenconsole.logresponse .catchconsole.logerror;
Instantiate process instance
Instantiate a process and returns it's identifier.
; client.instantiateProcessInstancecollaborationIdentifier, identifier, name, makeNameUnique, dataEntries, initializeAllData, attributes, principal .thenconsole.logresponse .catchconsole.logerror;
Put process instance to terminate
Terminates the given process instance.
; client.putProcessInstanceToTerminateprocessInstanceId, principal, identifier .thenconsole.logresponse .catchconsole.logerror;
Signal instance
Trigger signal instance
Triggers the given signal.
; client.triggerSignalInstancesignalIdentifier, signalName, principal, payload .thenconsole.logresponse .catchconsole.logerror;
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.
; client.getSupportsByFeaturefeature .thenconsole.logresponse .catchconsole.logerror;
User
Get users
Returns the users matching the given filter.
; client.getUsersprincipal, attachment, filter, sortList, offset, maximumNumberOfResults .thenconsole.logresponse .catchconsole.logerror;
Get user by id
Returns the user matching the given identifier.
; client.getUserByIduserId, principal, identifier, attachment .thenconsole.logresponse .catchconsole.logerror;
Get user groups
Returns the groups of a user.
; client.getUserGroupsuserId, principal, identifier, attachment .thenconsole.logresponse .catchconsole.logerror;
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
Copyright (c) 2019 SombreroElGringo