Skip to content
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

Allow manual creation of additional NSubprocess while (parent) task is not yet DONE #258

Open
emihir0 opened this issue Jan 28, 2020 · 0 comments

Comments

@emihir0
Copy link

emihir0 commented Jan 28, 2020

As described here: https://stackoverflow.com/questions/59934735/dynamic-nsubprocess-start-additional-subprocess-after-nsuprocess-is-started

It would be useful to have additional behaviour in NSubprocess such that we can start up additional ones while the task is still alive (in STARTED state).

Right now NSubprocess is started up with items that are calculated when the (parent) task is started. The problem with this approach is that there is, sometimes, a need to be able to add additional items to the task.

For example a customer makes an order through phone, we submit the order, each order item/line is an item in the nsubprocess task (ie. a process is fired up to fulfill the order item). Then they call 5 minutes later and want to add additional item - this is very difficult. Current options are to either roll back all the way and cancel the task itself, or to cancel the full order process and re-try all the data.

It would be useful to be able to start up additional subprocesses when the task is not yet DONE, eg something like:

    @Activation.status.transition(source=STATUS.STARTED)
    def start_subprocess(self, item):
        self.flow_task.subflow_task.run(self.task, item)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants