0a7700351f
Update workflow version struct ( #6716 )
...
We want to avoid the nested structure of active pieces. Steps to execute
will now be separated from the trigger. It will be an array executed
sequentially.
For now a step can only be an action. But at some point it will also be
a branch or a loop
2024-08-22 17:59:16 +02:00
be50a6256f
Check workflow version is valid before publishing ( #6702 )
...
Fix https://github.com/twentyhq/twenty/issues/6670
2024-08-21 17:56:33 +02:00
663acd56e4
Trigger workflow run manually ( #6696 )
...
Fix https://github.com/twentyhq/twenty/issues/6669
- create a commun function `startWorkflowRun` that both create the run
object and the job for executing the workflow
- use it in both the `workflowEventJob` and the `runWorkflowVersion`
endpoint
Bonus:
- use filtering for exceptions instead of a util. It avoids doing a try
catch in all endpoint
2024-08-21 17:41:26 +02:00
091c0f83be
6619 modify event emitter to emit an array of events ( #6625 )
...
Closes #6619
---------
Co-authored-by: Charles Bochet <charles@twenty.com >
2024-08-20 19:44:29 +02:00
6927f46e1c
Migrate to workspace services ( #6628 )
...
As title
2024-08-14 18:46:36 +02:00
9e7714e627
Add workflow run entity ( #6622 )
...
- create a workflow run every time a workflow is triggered in
not_started status. This status will be helpful later for once workflows
will be scheduled
- update run status once workflow starts running
- complete status once the workflow finished running
- add a failed status if an error occurs
2024-08-14 18:27:32 +02:00
0f75e14ab2
Create default view for workflows + fix task and note targets ( #6620 )
...
As title
2024-08-14 12:04:41 +02:00
03204021cb
Refactor onboarding user vars to be absent when user is fully onboarded ( #6531 )
...
In this PR:
- take feedbacks from: https://github.com/twentyhq/twenty/pull/6530 /
https://github.com/twentyhq/twenty/pull/6529 /
https://github.com/twentyhq/twenty/pull/6526 /
https://github.com/twentyhq/twenty/pull/6512
- refactor onboarding uservars to be absent when the user is fully
onboarded: isStepComplete ==> isStepIncomplete
- introduce a new workspace.activationStatus: CREATION_ONGOING
I'm retesting the whole flow:
- with/without BILLING
- sign in with/without SSO
- sign up with/without SSO
- another workspaceMembers join the team
- subscriptionCanceled
- access to billingPortal
2024-08-04 20:37:36 +02:00
8c8f192765
Trigger workflow on database event ( #6480 )
...
- Add global listener on database event
- Fetch event listener associated
- Trigger associated workflow
Also updated the runner so it expects the input to be in the payload
rather than the trigger
2024-08-01 11:57:44 +02:00
ae423f5e75
Improve typing definition ( #6481 )
...
- added typing for workflow-runner results
- fix workflow typing
- add a `workflow-action-runner` submodule that contains factories for
action runners
- added code-action-runner
- simplified code
2024-08-01 11:38:31 +02:00
424225943c
Add missing break ( #6474 )
2024-07-31 14:01:18 +02:00
6b4c79ff0d
Add workflow runner ( #6458 )
...
- add workflow runner module
- add an endpoint to trigger a workflow via api
- improve error handling for serverless functions
## Testing
- create 2 serverless functions
- create a workflow
- create this workflow Version
```
{
"type": "MANUAL",
"input": {"b": "bb"},
"nextAction": {
"name": "step_1",
"displayName": "Code",
"type": "CODE",
"valid": true,
"settings": {
"serverlessFunctionId": "Serverless function 1 Id",
"errorHandlingOptions": {
"retryOnFailure": {
"value": false
},
"continueOnFailure": {
"value": false
}
}
},
"nextAction": {
"name": "step_1",
"displayName": "Code",
"type": "CODE",
"valid": true,
"settings": {
"serverlessFunctionId": "Serverless function 1 Id",
"errorHandlingOptions": {
"retryOnFailure": {
"value": false
},
"continueOnFailure": {
"value": false
}
}
},
"nextAction": {
"name": "step_1",
"displayName": "Code",
"type": "CODE",
"valid": true,
"settings": {
"serverlessFunctionId": "Serverless function 2 Id",
"errorHandlingOptions": {
"retryOnFailure": {
"value": false
},
"continueOnFailure": {
"value": false
}
}
}
}
}
}
}
`
``
- call
```
mutation Trigger {
triggerWorkflow(workflowVersionId: "WORKFLOW_VERSION_ID") {
result
}
}
```
- try when errors are injected in serverless function
2024-07-31 12:48:33 +02:00
b85ae7e1ac
Fix googleApisSetRequestExtraParams ( #6455 )
2024-07-30 16:08:59 +02:00
e3496a19b5
Move folder ( #6451 )
...
Fix folder mistake
2024-07-30 14:16:23 +02:00
ee14f25996
Add enable workflow trigger endpoint ( #6443 )
...
Basic endpoint that only returns a boolean currently and overrides the
previous listener.
2024-07-30 14:00:37 +02:00
4cb83e050f
Put workfows behind a feature flag ( #6417 )
...
We have recently merged
[#workflow](https://github.com/twentyhq/twenty/pull/6412 ) but we should
put the workflow standard object behind a feature flag for now
---------
Co-authored-by: bosiraphael <raphael.bosi@gmail.com >
2024-07-25 20:33:31 +02:00
ce68f8ac79
Add workflow and version as standard object ( #6412 )
...
As title
Hidden behind a feature flag.
2024-07-25 18:33:11 +02:00