You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although it looks fine when using tools such as JsonPointer or JSON path to find items in the definition it may pose a challenge: states/0/actions/0/functionRef. One must rely on the array to find the objects. If the flow changes and a state or action changes the original order, the queries will be jeopardized.
Instead, we can use maps:
states:
state1:
action1:
state2:
state3:
The query then can be pragmatic, order won't matter: states/state1/action1.
Additionally, implementation-wise, a few languages may not guarantee a correct order when serializing/deserializing a workflow. Using maps will definitely get rid of such a risk.
On a side note, we will I believe need to remove naming restrictions on actions and states, as they will be naturally enforced by property naming rules.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What would you like to be added:
For the long term, we should use maps (key/value) instead of arrays when listing complex objects. For example:
Although it looks fine when using tools such as
JsonPointer
or JSON path to find items in the definition it may pose a challenge:states/0/actions/0/functionRef
. One must rely on the array to find the objects. If the flow changes and a state or action changes the original order, the queries will be jeopardized.Instead, we can use maps:
The query then can be pragmatic, order won't matter:
states/state1/action1
.Additionally, implementation-wise, a few languages may not guarantee a correct order when serializing/deserializing a workflow. Using maps will definitely get rid of such a risk.
Why is this needed:
See context: #820 (comment)
The text was updated successfully, but these errors were encountered: