# @flowbuild/process-tree

> solution to store process hierarchies

Latest version **1.0.4** (published 2023-03-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @flowbuild/process-tree
pnpm add @flowbuild/process-tree
yarn add @flowbuild/process-tree
bun add @flowbuild/process-tree
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2023-03-06 |
| First published | 2023-03-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 40.1 KB |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | FDTE-DSD |
| Maintainers | ricardo.imagure, pedropereiraassis, fdte_pcasari, gustavo_fdte, rafgoncalves, elson_oliveira, bot.flowbuild |
| Keywords | flowbuild |

## Links

- npm: https://www.npmjs.com/package/@flowbuild/process-tree
- Repository: https://github.com/flow-build/process-tree
- Homepage: https://github.com/flow-build/process-tree#readme
- Issues: https://github.com/flow-build/process-tree/issues
- npm.io page: https://npm.io/package/@flowbuild/process-tree

## Dependencies (6)

- [pg](https://npm.io/package/pg.md) 8.9.0
- [knex](https://npm.io/package/knex.md) 2.4.2
- [uuid](https://npm.io/package/uuid.md) 9.0.0
- [dotenv](https://npm.io/package/dotenv.md) 16.0.3
- [lodash](https://npm.io/package/lodash.md) 4.17.21
- [winston](https://npm.io/package/winston.md) 3.8.2

## Recent versions

- 1.0.4 (latest) — 2023-03-06
- 1.0.3 — 2023-03-04
- 1.0.2 — 2023-03-03
- 1.0.1 — 2023-03-03
- 1.0.0 — 2023-03-03

## README

# Flowbuild Process Tree

A flowbuild extension to allow saving hierarchical relationship between processes.

## Gist

**Install**

``` $ npm install @flowbuild/process-tree ```

Add environment variables to configure db connection

KNEX_ENV: test | prod
PTREE_LOG_LEVEL: silly | debug | verbose | info | warn | error

POSTGRES_HOST
POSTGRES_USER
POSTGRES_PASSWORD
POSTGRES_PORT
POSTGRES_DATABASE

**Create a new tree**

```
    import { Tree } from '@flowbuild/process-tree'

    const tree = new Tree(db)

    await tree.createTree(processId)

```

**Append a new node to existing tree**

```
   
    await tree.appendChild({ parentId: uuid, processId: uuid })

```

**Retrieve the path**

Any process from the thee will return all process from that tree.

```
   
    await tree.getPath(processId)

```

---
_Source: https://npm.io/package/@flowbuild/process-tree · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
