Skip to content
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

Naming proposal for ProcessInstance #77

Open
ateodorescu opened this issue Apr 8, 2021 · 5 comments
Open

Naming proposal for ProcessInstance #77

ateodorescu opened this issue Apr 8, 2021 · 5 comments

Comments

@ateodorescu
Copy link
Contributor

According to the BPMN standard an instance of a Process Definition is called Process Instance. I suggest a rename of the Workflow class to ProcessInstance.

The WorkflowBuilder class could become ProcessDefinition. A ProcessDefinition could have multiple versions (ProcessDefinitionVersion) but only one of them is active.

A ProcessInstance is usually linked to a ProcessDefinitionVersion.

If we would have a ProcessDefinition class then we could implement methods for:

  • creating new ProcessInstances;
  • finding an existing ProcessInstance by id;
  • migrating ProcessInstances from a version to the latest version.

Of course these definition classes could be also implemented by users in their apps.

@iteman What do you think?

@ateodorescu
Copy link
Contributor Author

@iteman If you agree to this then I could easily apply the renaming in a PR.

@ateodorescu
Copy link
Contributor Author

@iteman What do you think about renaming the Workflow class to ProcessInstance?

@iteman
Copy link
Member

iteman commented Apr 29, 2021

@iteman What do you think about renaming the Workflow class to ProcessInstance?

Seems good. I will rename it, and remove WorkflowBuilder.

@ateodorescu
Copy link
Contributor Author

Working on a PR that does that as we speak.

@ateodorescu
Copy link
Contributor Author

@iteman you should also revisit PHPMentors\Workflower\Process\Process class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants