@5minds/processcube_app_sdk 0.0.1-develop-99c117-lj8np8cz → 0.0.1-develop-0a3c29-ljsn38ye
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -1
- package/client/index.d.ts +2 -1
- package/client/index.js +1 -2
- package/common/index.d.ts +1 -0
- package/common/index.js +1 -0
- package/package.json +19 -14
- package/server/index.d.ts +1 -0
- package/server/index.js +1 -11
- package/client/components/DynamicLink.js +0 -13
- package/client/components/DynamicLink.js.map +0 -1
- package/client/components/RemoteUserTask.js +0 -5
- package/client/components/RemoteUserTask.js.map +0 -1
- package/client/components/index.d.ts +0 -2
- package/client/components/index.js +0 -3
- package/client/components/index.js.map +0 -1
- package/client/index.js.map +0 -1
- package/server/index.js.map +0 -1
- package/server/lib/UserTaskFunctions.js +0 -42
- package/server/lib/UserTaskFunctions.js.map +0 -1
- package/server/lib/index.js +0 -2
- package/server/lib/index.js.map +0 -1
- package/server/lib/internal/EngineUrlConfig.js +0 -8
- package/server/lib/internal/EngineUrlConfig.js.map +0 -1
- package/server/server-actions/CommonActions.js +0 -8
- package/server/server-actions/CommonActions.js.map +0 -1
- package/server/server-actions/UserTaskActions.js +0 -12
- package/server/server-actions/UserTaskActions.js.map +0 -1
- package/server/server-actions/index.js +0 -3
- package/server/server-actions/index.js.map +0 -1
- /package/{client → common}/components/RemoteUserTask.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,2 +1,81 @@
|
|
|
1
1
|
# ProcessCube.App.SDK
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Das SDK beinhaltet Komponenten und Funktionen für Frontend und Backend (Client/Server) zur einfachen und schnellen Entiwcklung einer ProcessCube App auf Basis von [Next.js](https://nextjs.org/).
|
|
4
|
+
|
|
5
|
+
## Installation zur Verwendung
|
|
6
|
+
|
|
7
|
+
### Vorraussetzungen
|
|
8
|
+
|
|
9
|
+
- NodeJS `>= v16`
|
|
10
|
+
|
|
11
|
+
```shell
|
|
12
|
+
npm i @5minds/processcube_app_sdk
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Benutzung
|
|
16
|
+
|
|
17
|
+
Das NPM Paket hat *drei* Exports.
|
|
18
|
+
|
|
19
|
+
### Default/Common
|
|
20
|
+
|
|
21
|
+
Hier werden Komponten und Funktionen exportiert, die im Client und Server genutzt werden können.
|
|
22
|
+
|
|
23
|
+
Zum Beispiel die React Kompontene RemoteUserTask:
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
import { RemoteUserTask } from "@5minds/processcube_app_sdk";
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Server
|
|
30
|
+
|
|
31
|
+
Hier steht alles ausschließlich für eine Serverseitige Umgebung zur Verfügung. Dazu zählen Funktionen die mit der Engine arbeiten, oder React Komponenten, die Serverseitig gerendert werden können.
|
|
32
|
+
|
|
33
|
+
Beispiel:
|
|
34
|
+
|
|
35
|
+
```javascript
|
|
36
|
+
import { startProcess } from "@5minds/processcube_app_sdk/server";
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Client
|
|
40
|
+
|
|
41
|
+
Es können nur Komponenten und Funktionen importiert werden, die im Browser funktionieren. Zum Beispiel React Komponenten, die einen Clientseitigen Router und dessen React Hooks nutzen oder Funktionen die auf `window` oder generell globale Browser APIs zugreifen möchten.
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
import { DynamicLink } from "@5minds/processcube_app_sdk/client";
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Wie kann ich das Projekt aufsetzen?
|
|
48
|
+
|
|
49
|
+
### Setup/Installation
|
|
50
|
+
|
|
51
|
+
Das SDK wird über den Node Paketmanager `npm` gebaut.
|
|
52
|
+
|
|
53
|
+
Für das Installieren und Bauen können folgende Befehle benutzt werden:
|
|
54
|
+
|
|
55
|
+
```shell
|
|
56
|
+
npm ci
|
|
57
|
+
npm run build
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Für ein Productionbuild:
|
|
61
|
+
|
|
62
|
+
```shell
|
|
63
|
+
npm run build:prod
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Um mit dem Paket lokal zu arbeiten kann es mit npm in ein anderes Projekt verlinkt werden:
|
|
67
|
+
|
|
68
|
+
```shell
|
|
69
|
+
npm link
|
|
70
|
+
npm run watch
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Im Zielprojekt anschließend:
|
|
74
|
+
|
|
75
|
+
```shell
|
|
76
|
+
npm link @5minds/processcube_app_sdk
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Wen kann ich auf das Projekt ansprechen?
|
|
80
|
+
|
|
81
|
+
1. [Alexander Kasten](mailto:alexander.kasten@5minds.de)
|
package/client/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import 'client-only';
|
|
2
|
+
export * from './components/DynamicLink';
|
package/client/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import"client-only";import{useRouter as t}from"next/navigation";import{jsx as i}from"react/jsx-runtime";function a({href:r,children:o}){let e=t();return i("a",{href:r,onClick:n=>{n.preventDefault(),e.replace(r),e.refresh()},children:o})}export{a as DynamicLink};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/RemoteUserTask';
|
package/common/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";function t(r){return e("div",{style:{width:"100%",height:"100%"},children:e("iframe",{width:"100%",height:"100%",src:r.url})})}export{t as RemoteUserTask};
|
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@5minds/processcube_app_sdk",
|
|
3
|
-
"version": "0.0.1-develop-
|
|
3
|
+
"version": "0.0.1-develop-0a3c29-ljsn38ye",
|
|
4
4
|
"description": "The SDK for ProcessCube Apps",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "
|
|
7
|
-
"module": "
|
|
6
|
+
"main": "common/index.js",
|
|
7
|
+
"module": "common/index.js",
|
|
8
8
|
"browser": "client/index.js",
|
|
9
|
-
"types": "
|
|
9
|
+
"types": "common/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"types": "./
|
|
13
|
-
"default": "./
|
|
12
|
+
"types": "./common/index.d.ts",
|
|
13
|
+
"default": "./common/index.js"
|
|
14
14
|
},
|
|
15
15
|
"./server": {
|
|
16
16
|
"types": "./server/index.d.ts",
|
|
17
17
|
"default": "./server/index.js"
|
|
18
18
|
},
|
|
19
19
|
"./client": {
|
|
20
|
-
"types":
|
|
21
|
-
"default": "./client/index.d.ts"
|
|
22
|
-
},
|
|
20
|
+
"types": "./client/index.d.ts",
|
|
23
21
|
"default": "./client/index.js"
|
|
24
22
|
}
|
|
25
23
|
},
|
|
26
24
|
"scripts": {
|
|
27
|
-
"
|
|
25
|
+
"clean": "rm -rf server common client",
|
|
26
|
+
"prepare": "npm run build:prod",
|
|
28
27
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
29
|
-
"build": "tsc && tsc -p tsconfig.client.json",
|
|
30
|
-
"
|
|
28
|
+
"build": "NODE_ENV=development esbuild src/**/*.ts --outdir=. --packages=external --bundle --format=esm --analyze=verbose && tsc --emitDeclarationOnly && tsc -p tsconfig.common.json --emitDeclarationOnly && tsc -p tsconfig.client.json --emitDeclarationOnly",
|
|
29
|
+
"build:prod": "npm run clean && NODE_ENV=production esbuild src/**/*.ts --outdir=. --packages=external --bundle --format=esm --tree-shaking=true --splitting --minify --drop:console && tsc --emitDeclarationOnly && tsc -p tsconfig.common.json --emitDeclarationOnly && tsc -p tsconfig.client.json --emitDeclarationOnly",
|
|
30
|
+
"watch": "NODE_ENV=development concurrently --kill-others -n=esbuild,tsc:server,tsc:common,tsc:client \"esbuild src/**/*.ts --watch --outdir=. --format=esm --bundle --packages=external\" \"tsc --watch --emitDeclarationOnly\" \"tsc -p tsconfig.common.json --watch --emitDeclarationOnly\" \"tsc -p tsconfig.client.json --watch --emitDeclarationOnly\""
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"client",
|
|
38
|
-
"server"
|
|
38
|
+
"server",
|
|
39
|
+
"common"
|
|
39
40
|
],
|
|
40
41
|
"keywords": [
|
|
41
42
|
"SDK",
|
|
@@ -57,6 +58,8 @@
|
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
60
|
"@types/react": "^18.2.13",
|
|
61
|
+
"concurrently": "^8.2.0",
|
|
62
|
+
"esbuild": "0.18.11",
|
|
60
63
|
"prettier": "^2.8.8",
|
|
61
64
|
"typescript": "^5.1.3"
|
|
62
65
|
},
|
|
@@ -65,6 +68,8 @@
|
|
|
65
68
|
"react": ">=18.0.0"
|
|
66
69
|
},
|
|
67
70
|
"dependencies": {
|
|
68
|
-
"@5minds/processcube_engine_client": "^4.3.1"
|
|
71
|
+
"@5minds/processcube_engine_client": "^4.3.1",
|
|
72
|
+
"client-only": "^0.0.1",
|
|
73
|
+
"server-only": "^0.0.1"
|
|
69
74
|
}
|
|
70
75
|
}
|
package/server/index.d.ts
CHANGED
package/server/index.js
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default {
|
|
3
|
-
config: ({ engineUrl }) => {
|
|
4
|
-
if (typeof engineUrl === 'string') {
|
|
5
|
-
setEngineUrl(engineUrl);
|
|
6
|
-
}
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
export * from './lib';
|
|
10
|
-
export * from './server-actions';
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import"server-only";var f=process.env.PROCESSCUBE_ENGINE_URL||"http://localhost:10560";function o(){return f}function c(s){s=s}import{EngineClient as d,DataModels as p}from"@5minds/processcube_engine_client";var g=o(),n=new d(g);async function m(s){return(await n.userTasks.query({flowNodeInstanceId:s})).userTasks[0]}async function I(s,t){let e=await n.userTasks.query({processInstanceId:s,flowNodeId:t});return e.totalCount==0?null:e.userTasks[0]}async function E(s,t){return new Promise(async e=>{let r=n.userTasks.onUserTaskWaiting(async a=>{if(a.processInstanceId===s&&a.flowNodeId===t){let l=await m(a.flowNodeInstanceId);e(l)}}),i=await I(s,t);i&&e(i),await r})}async function P(s,t,e){await n.userTasks.finishUserTask(s,t);let r=await n.userTasks.query({flowNodeId:e,state:p.FlowNodeInstances.FlowNodeInstanceState.suspended});return r.totalCount>0?r.userTasks[0]:null}import{revalidatePath as T}from"next/cache";import{redirect as k}from"next/navigation";async function R(s,t){T(s),k(s,t)}import{EngineClient as w}from"@5minds/processcube_engine_client";var y=o(),u=new w(y);async function _(s){return await u.processModels.startProcessInstance({processModelId:s})}async function A(s,t){await u.userTasks.finishUserTask(s,t)}var z={config:({engineUrl:s})=>{typeof s=="string"&&c(s)}};export{z as default,A as finishTask,P as finishUserTaskAndGetNext,R as hardNavigate,_ as startProcess,E as waitForUserTaskByProcessInstanceId};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useRouter } from 'next/navigation';
|
|
4
|
-
// Workaround für https://github.com/vercel/next.js/issues/42991#issuecomment-1592921378
|
|
5
|
-
export function DynamicLink({ href, children }) {
|
|
6
|
-
const router = useRouter();
|
|
7
|
-
return (_jsx("a", { href: href, onClick: (e) => {
|
|
8
|
-
e.preventDefault();
|
|
9
|
-
router.replace(href);
|
|
10
|
-
router.refresh();
|
|
11
|
-
}, children: children }));
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=DynamicLink.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicLink.js","sourceRoot":"","sources":["../../src/client/components/DynamicLink.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAO5C,wFAAwF;AACxF,MAAM,UAAU,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAoB;IAC9D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,CACL,YACE,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,CAAC,CAAiC,EAAE,EAAE;YAC7C,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACrB,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,CAAC,YAEA,QAAQ,GACP,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export function RemoteUserTask(props) {
|
|
3
|
-
return (_jsx("div", { style: { width: '100%', height: '100%' }, children: _jsx("iframe", { width: "100%", height: "100%", src: props.url }) }));
|
|
4
|
-
}
|
|
5
|
-
//# sourceMappingURL=RemoteUserTask.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteUserTask.js","sourceRoot":"","sources":["../../src/client/components/RemoteUserTask.tsx"],"names":[],"mappings":";AAIA,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAC3C,iBAAQ,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,GAAG,EAAE,KAAK,CAAC,GAAG,GAAW,GACxD,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|
package/client/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/server/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,eAAe;IACb,MAAM,EAAE,CAAC,EAAE,SAAS,EAAyB,EAAE,EAAE;QAC/C,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;YACjC,YAAY,CAAC,SAAS,CAAC,CAAC;SACzB;IACH,CAAC;CACF,CAAC;AAEF,cAAc,OAAO,CAAC;AACtB,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { EngineClient, DataModels } from '@5minds/processcube_engine_client';
|
|
2
|
-
import { getEngineUrl } from './internal/EngineUrlConfig';
|
|
3
|
-
const url = getEngineUrl();
|
|
4
|
-
const client = new EngineClient(url);
|
|
5
|
-
async function getUserTaskByFlowNodeInstanceId(flowNodeInstanceId) {
|
|
6
|
-
const result = await client.userTasks.query({ flowNodeInstanceId: flowNodeInstanceId });
|
|
7
|
-
return result.userTasks[0];
|
|
8
|
-
}
|
|
9
|
-
async function getUserTaskByProcessInstanceId(processInstanceId, flowNodeId) {
|
|
10
|
-
const result = await client.userTasks.query({ processInstanceId: processInstanceId, flowNodeId: flowNodeId });
|
|
11
|
-
if (result.totalCount == 0) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
return result.userTasks[0];
|
|
15
|
-
}
|
|
16
|
-
export async function waitForUserTaskByProcessInstanceId(processInstanceId, flowNodeId) {
|
|
17
|
-
return new Promise(async (resolve) => {
|
|
18
|
-
const promise = client.userTasks.onUserTaskWaiting(async (event) => {
|
|
19
|
-
if (event.processInstanceId === processInstanceId && event.flowNodeId === flowNodeId) {
|
|
20
|
-
const userTask = await getUserTaskByFlowNodeInstanceId(event.flowNodeInstanceId);
|
|
21
|
-
resolve(userTask);
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
const userTask = await getUserTaskByProcessInstanceId(processInstanceId, flowNodeId);
|
|
25
|
-
if (userTask) {
|
|
26
|
-
resolve(userTask);
|
|
27
|
-
}
|
|
28
|
-
await promise;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
export async function finishUserTaskAndGetNext(flowNodeInstanceId, result, flowNodeId) {
|
|
32
|
-
await client.userTasks.finishUserTask(flowNodeInstanceId, result);
|
|
33
|
-
const userTasks = await client.userTasks.query({
|
|
34
|
-
flowNodeId: flowNodeId,
|
|
35
|
-
state: DataModels.FlowNodeInstances.FlowNodeInstanceState.suspended,
|
|
36
|
-
});
|
|
37
|
-
if (userTasks.totalCount > 0) {
|
|
38
|
-
return userTasks.userTasks[0];
|
|
39
|
-
}
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=UserTaskFunctions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserTaskFunctions.js","sourceRoot":"","sources":["../../src/server/lib/UserTaskFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,GAAG,GAAG,YAAY,EAAE,CAAC;AAC3B,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC;AAErC,KAAK,UAAU,+BAA+B,CAAC,kBAA2B;IACxE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAExF,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,KAAK,UAAU,8BAA8B,CAAC,iBAAyB,EAAE,UAAkB;IACzF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;IAE9G,IAAI,MAAM,CAAC,UAAU,IAAI,CAAC,EAAE;QAC1B,OAAO,IAAI,CAAC;KACb;IAED,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kCAAkC,CACtD,iBAAyB,EACzB,UAAkB;IAElB,OAAO,IAAI,OAAO,CAAgD,KAAK,EAAE,OAAO,EAAE,EAAE;QAClF,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACjE,IAAI,KAAK,CAAC,iBAAiB,KAAK,iBAAiB,IAAI,KAAK,CAAC,UAAU,KAAK,UAAU,EAAE;gBACpF,MAAM,QAAQ,GAAG,MAAM,+BAA+B,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;gBACjF,OAAO,CAAC,QAAQ,CAAC,CAAC;aACnB;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,MAAM,8BAA8B,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;QAErF,IAAI,QAAQ,EAAE;YACZ,OAAO,CAAC,QAAQ,CAAC,CAAC;SACnB;QAED,MAAM,OAAO,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,kBAA0B,EAAE,MAAW,EAAE,UAAkB;IACxG,MAAM,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;IAElE,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;QAC7C,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,SAAS;KACpE,CAAC,CAAC;IAEH,IAAI,SAAS,CAAC,UAAU,GAAG,CAAC,EAAE;QAC5B,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;KAC/B;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/server/lib/index.js
DELETED
package/server/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EngineUrlConfig.js","sourceRoot":"","sources":["../../../src/server/lib/internal/EngineUrlConfig.ts"],"names":[],"mappings":"AAAA,IAAI,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,wBAAwB,CAAC;AAC/E,MAAM,UAAU,YAAY;IAC1B,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,SAAiB;IAC5C,SAAS,GAAG,SAAS,CAAC;AACxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommonActions.js","sourceRoot":"","sources":["../../src/server/server-actions/CommonActions.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,GAAW,EAAE,IAAmB;IACjE,cAAc,CAAC,GAAG,CAAC,CAAC;IACpB,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AACtB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
import { EngineClient } from '@5minds/processcube_engine_client';
|
|
3
|
-
import { getEngineUrl } from '../lib/internal/EngineUrlConfig';
|
|
4
|
-
const url = getEngineUrl();
|
|
5
|
-
const client = new EngineClient(url);
|
|
6
|
-
export async function startProcess(processModelId) {
|
|
7
|
-
return await client.processModels.startProcessInstance({ processModelId: processModelId });
|
|
8
|
-
}
|
|
9
|
-
export async function finishTask(flowNodeInstanceId, result) {
|
|
10
|
-
await client.userTasks.finishUserTask(flowNodeInstanceId, result);
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=UserTaskActions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UserTaskActions.js","sourceRoot":"","sources":["../../src/server/server-actions/UserTaskActions.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAc,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,MAAM,GAAG,GAAG,YAAY,EAAE,CAAC;AAC3B,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC;AAErC,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,cAAsB;IACvD,OAAO,MAAM,MAAM,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC,CAAC;AAC7F,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,kBAA0B,EAAE,MAAW;IACtE,MAAM,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/server-actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
|
|
File without changes
|