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

Using wfmc with Python 3.6 and asyncio? #6

Open
zopyx opened this issue Apr 30, 2018 · 0 comments
Open

Using wfmc with Python 3.6 and asyncio? #6

zopyx opened this issue Apr 30, 2018 · 0 comments

Comments

@zopyx
Copy link

zopyx commented Apr 30, 2018

I am currently evaluating workflow system in the context of modular production. An entity in this context is a "station" that can perform a particular task. The most simple workflow is a two-state workflow IDLE -> FINISHED. The application code tied to the IDLE activity is supposed to be a longer running external action. I tried to implement the a prototype similar to this:

async def external_task():
    await asyncio.sleep(10)    # or await some event trigger from outside


class ApplicationBase():

    def start(self, args):
         await external_task()

This is obviously not working because start() is not defined as async def start(). Defining start() as async will not execute the start() method.

The more general question would be: we have different entities like STATION, PRODUCT etc. - each with a different workflow definition and there will be numerous instances of STATION and PRODUCT.
The workflows and their application code should processes side-by-side smoothly (as noted: the external application would be usually only await for external events and would not process expensive operations.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant