Onify Hub Functions is a set of server side helper functions for Onify Hub. This container usually runs in the same context/namespace as api and worker. The functions main purpose is to add functions that is used in Onify Flow (BPMN). Functions are built in Node.js.
Functions are a complement and sometime even a replacement for Onify Agent (scripts).
- chore: use node 18
- chore: add GitHub workflow for building branch
- test: fix test after node 18 update
- feature:
/excel/read
- New function: Read (and parse) uploaded excel file
- chore: bump fast-xml-parser from 4.0.11 to 4.2.4
- improve:
/ldap/search
- Convert binary attributes objectSid and objectGuid to text - improve:
/ldap/search
- Adjusted query parameters and response handling - fix:
/ldap/search
- Handled test script and property logic bugs
- feature:
/ldap/search
- New function: Search LDAP server
- improve: add rejectUnauthorized for /activedirectory/users
- improve:
/dustin/prepare/order
- ContactPhone is now optional for BuyerParty - fix:
/dustin/prepare/order
- Price could not be 0 - fix:
/dustin/prepare/order
- ItemDetail is now array, not ListOfItemDetail
- fix: do not require CommodityCode for Dustin order
- feature: new function: /stfp/list - List files/folders on STFP server
- feature: new function: /dustin/prepare/order - Prepare EDI order for Dustin
- feature: new function: /activedirectory/users - Get users from Active Directory
First release...
Checkout how to use the hub-functions
container together with the other services here.
Here is an example how to run in Docker.
functions:
image: eu.gcr.io/onify-images/hub/functions:latest
pull_policy: always
restart: always
ports:
- 8282:8282
Here is an example how to run in Kubernetes.
apiVersion: apps/v1
kind: Deployment
metadata:
name: onify-functions
spec:
selector:
matchLabels:
app: functions
template:
metadata:
labels:
app: functions
spec:
imagePullSecrets:
- name: onify-regcred
containers:
- name: functions
image: eu.gcr.io/onify-images/hub/functions:latest
ports:
- name: functions
containerPort: 8282
---
apiVersion: v1
kind: Service
metadata:
name: onify-functions
spec:
ports:
- protocol: TCP
name: functions
port: 8282
selector:
app: functions
To run it, just execute command npm start
.
In VSCode, there is a built-in debugging functionality. To run in debug mode, please press F5. This will execute the commands stated in the launch.json file. You may place in break points in the line/s of code to verify a current status of variables during the process.
In the upper right section of the code editor, you will see the debug controls for triggering when to play/pause the flow during runtime.
- Update changelog in
README.md
- Update version in
package.json
- Commit the changes
- Run
git tag v*.*.*
(eg. 1.1.0) - Run
git push --tags
- Community/forum: https://support.onify.co/discuss
- Documentation: https://support.onify.co/docs
- Support and SLA: https://support.onify.co/docs/get-support
Sharing is caring! :-) Please feel free to contribute! Please read Code of Conduct first. You can also create a new request (issue): https://github.com/onify/hub-functions/issues/new.
This project is licensed under the MIT License - see the LICENSE file for details.