workflow.id and workflow.key is duplicate
What would you like to be added:
Only keep one of id or key property in workflow.
Why is this needed:
As the description:
The id property defines the unique, domain-specific workflow identifier, for example "orders", "payment", etc.
The key property defines the unique, domain-specific workflow identifier. It can be used when the id property is auto-generated by a content-management system for example. In these cases, you can specify the key property to be the domain-specific identifier of the workflow definition. The id and key properties are mutually exclusive, meaning you cannot define both.
The id & key property is exclusive,we can only have one of them, but when id is auto-generated (which means it have an value), we cannot define the key property, so the use case is wrong.
hi, i think the community member use case for this was that id is generated by some third party tool like a cms system so it would not be in the workflow definition (thus exclusive). can you describe your use case is the generated id in the json/yaml definition?
hi, i think the community member use case for this was that id is generated by some third party tool like a cms system so it would not be in the workflow definition (thus exclusive). can you describe your use case is the generated id in the json/yaml definition?
If id is generated by a cms system and not in workflow definition, why we must use another property named key to define the identifier?
As we keep both id and key property, there is some problem:
- it's will be confused to the user, they don't know the difference between these two and which property is used in which scenario
- if the user have a workflow definition with
id=1, and after a period of time change tokey=1, Is they are the same identified workflow definition?
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.
The way I see and use it, key is used at instantiation time to provide a unique identifier to instances of a workflow based on runtime expressions.
The real issues, imho, are:
- the uselessness of id when name/version pair are used to identify a definition
- the mutual exclusiveness of id and key
On a side note, there are many problems with naming conventions, as discussed in related issue #671 , which breaks expression functions, for example
The way I see and use it,
keyis used at instantiation time to provide a unique identifier to instances of a workflow based on runtime expressions.
If this is the use case,so user cannot provide it (because runtime will always rewrite it).
did we come to some consensus if we wanna remove this or not?
I'm not sure! Let's wait next community meeting if that's ok
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.
See https://github.com/serverlessworkflow/specification/discussions/817#discussioncomment-8408714
@ricardozanini Working on this one, can you update the status label?