Skip to content

Commit 7cb26e4

Browse files
committed
Removed execution describe
1 parent 8c88c74 commit 7cb26e4

File tree

13 files changed

+112
-252
lines changed

13 files changed

+112
-252
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h1 align="center">Welcome to microflow 👋</h1>
22
<p>
33
<a href="https://www.npmjs.com/package/microflow" target="_blank">
4-
<img alt="Version" src="https://img.shields.io/npm/v/microflow.svg">
4+
<img alt="Version" src="https://img.shields.io/npm/v/microflow/alpha.svg">
55
</a>
66
<a href="https://github.com/krn0x2/microflow#readme" target="_blank">
77
<img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
@@ -89,7 +89,10 @@ const task = await flow.task.create({
8989
"Cache-Control": "no-cache",
9090
"Content-Type": "application/json"
9191
},
92-
data: "$.data",
92+
data: {
93+
actualData: '$.data',
94+
token: '$$.task.token'
95+
},
9396
method: "post"
9497
}
9598
});
@@ -218,7 +221,7 @@ await execution.send({
218221
}
219222
});
220223

221-
const { completed, output, state } = await execution.describe();
224+
const { completed, output, state } = await execution.data();
222225

223226
console.log(output, completed, state);
224227

examples/sample/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ app.post(`/${PATH}/workflow/:id/start`, async (req, res) => {
6666
const { id } = params;
6767
const workflow = await microflowService.workflow.read(id);
6868
const execution = await workflow.start(body);
69-
const response = await execution.describe();
69+
const response = await execution.data();
7070
return res.status(200).json(response);
7171
});
7272

@@ -76,7 +76,7 @@ app.post(`/${PATH}/workflow/instance/:id/event`, async (req, res) => {
7676
const { id } = params;
7777
const execution = await microflowService.execution.read(id);
7878
await execution.send(body);
79-
const response = await execution.describe();
79+
const response = await execution.data();
8080
return res.status(200).json(response);
8181
});
8282

@@ -89,7 +89,7 @@ app.get(`/${PATH}/task-success`, async (req, res) => {
8989
token as string,
9090
body
9191
);
92-
const response = await execution.describe();
92+
const response = await execution.data();
9393
return res.status(200).json(response);
9494
});
9595

@@ -101,15 +101,15 @@ app.get(`/${PATH}/task-failure`, async (req, res) => {
101101
token as string,
102102
body
103103
);
104-
const response = await execution.describe();
104+
const response = await execution.data();
105105
return res.status(200).json(response);
106106
});
107107

108108
// Query workflow instance
109109
app.get(`/${PATH}/workflow/instance/:id`, async (req, res) => {
110110
const { id } = req.params;
111111
const execution = await microflowService.execution.read(id);
112-
const response = await execution.describe();
112+
const response = await execution.data();
113113
res.status(200).json(response);
114114
});
115115

examples/sample/package-lock.json

Lines changed: 77 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/sample/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"body-parser": "^1.19.0",
88
"express": "^4.17.1",
99
"express-jwt": "^6.0.0",
10+
"microflow": "^3.0.0-alpha.2",
1011
"sequelize": "^6.3.5",
1112
"sqlite3": "^5.0.0"
1213
},

examples/sample/workflow/input.json

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)