Skip to content

workflow.id and workflow.key is duplicate #742

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

Closed
lsytj0413 opened this issue Jan 28, 2023 · 10 comments · Fixed by #824
Closed

workflow.id and workflow.key is duplicate #742

lsytj0413 opened this issue Jan 28, 2023 · 10 comments · Fixed by #824
Assignees
Labels
change: feature New feature or request. Impacts in a minor version change
Milestone

Comments

@lsytj0413
Copy link
Contributor

lsytj0413 commented Jan 28, 2023

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.

@tsurdilo
Copy link
Contributor

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?

@tsurdilo tsurdilo added the change: feature New feature or request. Impacts in a minor version change label Jan 29, 2023
@tsurdilo tsurdilo self-assigned this Jan 29, 2023
@lsytj0413
Copy link
Contributor Author

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:

  1. 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
  2. if the user have a workflow definition with id=1, and after a period of time change to key=1, Is they are the same identified workflow definition?

@github-actions
Copy link

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.

@cdavernas
Copy link
Member

cdavernas commented May 12, 2023

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

@lsytj0413
Copy link
Contributor Author

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.

If this is the use case,so user cannot provide it (because runtime will always rewrite it).

@tsurdilo
Copy link
Contributor

did we come to some consensus if we wanna remove this or not?

@cdavernas
Copy link
Member

I'm not sure! Let's wait next community meeting if that's ok

@ricardozanini ricardozanini added this to the v0.9 milestone May 25, 2023
@github-actions
Copy link

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.

@ricardozanini
Copy link
Member

See #817 (comment)

@fjtirado
Copy link
Collaborator

@ricardozanini Working on this one, can you update the status label?

@ricardozanini ricardozanini moved this from Todo to In Progress in Progress Tracker Feb 19, 2024
fjtirado added a commit to fjtirado/specification that referenced this issue Feb 21, 2024
Id is removed.
Name remains mandatory and is clarified that should be unique.
Key description is updated and becomes optional in all cases.
Version is assumed to be latest if not specified

Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
fjtirado added a commit to fjtirado/specification that referenced this issue Feb 21, 2024
Id is removed.
Name remains mandatory and is clarified that should be unique.
Key description is updated and becomes optional in all cases.
Version is assumed to be latest if not specified

Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
fjtirado added a commit to fjtirado/specification that referenced this issue Feb 21, 2024
Id is removed.
Name remains mandatory and is clarified that should be unique.
Key description is updated and becomes optional in all cases.
Version is assumed to be latest if not specified

Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
fjtirado added a commit to fjtirado/specification that referenced this issue Feb 21, 2024
Id is removed.
Name remains mandatory and is clarified that should be unique.
Key description is updated and becomes optional in all cases.
Version is assumed to be latest if not specified

Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
fjtirado added a commit to fjtirado/specification that referenced this issue Feb 21, 2024
Id is removed.
Name remains mandatory and is clarified that should be unique.
Key description is updated and becomes optional in all cases.
Version is assumed to be latest if not specified

Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
fjtirado added a commit to fjtirado/specification that referenced this issue Feb 22, 2024
fjtirado added a commit to fjtirado/specification that referenced this issue Feb 22, 2024
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
fjtirado added a commit to fjtirado/specification that referenced this issue Mar 8, 2024
fjtirado added a commit to fjtirado/specification that referenced this issue Mar 8, 2024
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
fjtirado added a commit to fjtirado/specification that referenced this issue Mar 8, 2024
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
fjtirado added a commit to fjtirado/specification that referenced this issue Mar 8, 2024
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
fjtirado added a commit to fjtirado/specification that referenced this issue Mar 8, 2024
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
fjtirado added a commit to fjtirado/specification that referenced this issue Mar 11, 2024
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
fjtirado added a commit to fjtirado/specification that referenced this issue Mar 11, 2024
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
fjtirado added a commit to fjtirado/specification that referenced this issue Mar 11, 2024
fjtirado added a commit to fjtirado/specification that referenced this issue Mar 11, 2024
Signed-off-by: Francisco Javier Tirado Sarti <[email protected]>
ricardozanini added a commit that referenced this issue Mar 20, 2024
[Fix #742] Id, key and name refactor
@github-project-automation github-project-automation bot moved this from In Progress to Done in Progress Tracker Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change: feature New feature or request. Impacts in a minor version change
Projects
Status: Done
5 participants