Problem/Motivation

The core version 8.3.3 comes updates the workflows module as well. Because of there we get an error while getting the initial state value in NotificationInformation::getTransition().

Proposed resolution

Use $workflow->getTypePlugin()->getInitialState($workflow, $entity) instead of $workflow->getInitialState().

Comments

akozma created an issue. See original summary.

akozma’s picture

Title: Adjust the usage of ` corresponding to 8.3.3 » Adjust the usage of getInitialState corresponding to 8.3.3
akozma’s picture

I'm not sure how can I get the initial state value when the node is just created. Our call (hook_insert) is executed after the entity object is updated, so by using the "Save and Publish" option the status is TRUE and based on that the getInitialState returns "published".

The patch adds the condition "$entity->original == NULL" but the "$previous_state = 'draft';" is still hardcoded now.

Any ideas?

akozma’s picture

Small fix on coding standards.

akozma’s picture

Status: Active » Needs review
rob holmes’s picture

Thanks for this, our upgrade window is tomorrow so i should get a chance to look at this then.

  • Rob Holmes committed 0b9620f on 8.x-2.x authored by akozma
    Issue #2885397 by akozma: Adjust the usage of getInitialState...
rob holmes’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.