Skip to content

[Feature Request] Rename Instance / ActivityInstance / WorkflowInstance to wrappers #820

Description

@knegyesi

Is your feature request related to a problem? Please describe.

In InvokeActivity::handle

$context = $context->withInstance($instance->getContext())

This is confusing.

ActivityProtoType::getInstance and ActivityProtoType::withInstance are very confusing because the word "instance" means a different thing in these methods.

Describe the solution you'd like

  1. Rename Instance to InstanceWrapper, same for ActivityInstance and WorkflowInstance.
  2. Rename ActivityInstance::$context to ActivityInstanceWrapper::$instance, same for WorkflowInstance.

and change the relevant getters as well. The code above would change to

$context = $context->withInstance($instanceWrapper->getInstance())

That's much more intuitive, isn't it?

ActivityPrototype::getInstance becomes getInstanceWrapper, which, again, I believe to be much more clear.

Additional context

I could submit a PR if this suggestion is something you like.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions