sclasen / swfsm

[golang] simple workflow finite state machines
MIT License
53 stars 14 forks source link

Documentation clarification: Correlator ActivityAttempts -- SWF allows reusing activity ids? #163

Closed ryanwalls closed 8 years ago

ryanwalls commented 8 years ago

The correlator has an ActivityAttempts field. Does SWF allow reusing activity ids? It seems ActivityAttempts is keeping track of how many times the same id has been attempted. I just assumed activity ids had to be unique or SWF would complain?

sclasen commented 8 years ago

activity ids are similar to workflow ids in swf, are primary-key-like. you can only have 1 activity of the same id scheduled/running at once (per workflow), but once that activity completes/fails/times-out you can reuse the same id.

So the attempts counting does count by id.

ryanwalls commented 8 years ago

Great. Will leave this open for now until I can submit a PR with a paraphrase of your comment added to the documentation.

ryanwalls commented 8 years ago

Actually, I think the current documentation already implies this, so will just close for now.