workflower icon indicating copy to clipboard operation
workflower copied to clipboard

Naming proposal for ProcessInstance

Open ateodorescu opened this issue 4 years ago • 5 comments

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 avatar Apr 08 '21 08:04 ateodorescu

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

ateodorescu avatar Apr 13 '21 10:04 ateodorescu

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

ateodorescu avatar Apr 29 '21 07:04 ateodorescu

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

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

iteman avatar Apr 29 '21 07:04 iteman

Working on a PR that does that as we speak.

ateodorescu avatar Apr 29 '21 08:04 ateodorescu

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

ateodorescu avatar Apr 29 '21 08:04 ateodorescu