-
Notifications
You must be signed in to change notification settings - Fork 20
Stoppable process. #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stoppable process. #39
Conversation
Good, the workflow is that PM only sets the status, the process it self needs to check if the status has been changed right? |
Exactly. I have PoC ready for Import Defitnions here: https://github.com/w-vision/DataDefinitions/pull/246nd=1 |
README.md
Outdated
Additionally, you need to implement stop logic to your process. Track the process status and stop your process if it's set to `ProcessManagerBundle::STATUS_STOPPING`: | ||
|
||
```php | ||
$process = $this->processRepository->findOneBy(['id' => $processId]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find($processId)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
I think other than my comment, it seems fine |
Changed findOneBy() into find() in stoppable process instructions.
thanks a lot, again :) |
Added status and stoppable columns to processes table, also to all classes connected to Process model.
Status is displayed in the admin panel as an additional column. If the process is running and has stoppable flag set to true, button will show up in admin panel, which would change the status of the process to "stopping".
This way processes can detect if the user wants to stop given process and do so.