Skip to content
This repository was archived by the owner on Apr 12, 2018. It is now read-only.
This repository was archived by the owner on Apr 12, 2018. It is now read-only.

models.event: non-deterministic lookup in factory #45

Open

Description

@ggreg

The way simple-workflow lookups the name of event types is non-deterministic. It iterates of the keys of the EVENTS dict. There is no guaranty in the order of keys in a Python dict, that's why there is a collections.OrderedDict class. Thus when it encounters a StartChildWorkflowExecutionInitiated event it either returns a ChildWorkflowExecution or a WorkflowExecution type. I had the two cases by executing code with CPython2.7 (returns WorkflowExecution) and pypy 2.5.0 (returns ChildWorkflowExecution), though of course it depends on the environment and not on the interpreter itself (even CPython2.7 dict may iterate keys on a different order).

Activity

  1. self-assigned this
    on Mar 24, 2015
  2. added a commit that references this issue on Mar 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions