Skip to content

Wrong announce events #76

@klimenttoshkov

Description

@klimenttoshkov

Workflow:
49b6efb1-f616-45b5-bba8-6932991d2bce

    public static function getWorkflowDefinition(): array
    {
        return [
            'type' => self::WORKFLOW_TYPE,
            'supports' => [self::class],
            'places' => [
                self::PLACE_DRAFT,
                self::PLACE_NEW,
                self::PLACE_PAID => ['metadata' => ['bg_color' => '#FF00AA']],
                self::PLACE_PROVISIONED,
                self::PLACE_EXPIRED,
            ],
            'initial_places' => [self::PLACE_DRAFT],
            'transitions' => [
                self::TRANSITION_START => ['from' => self::PLACE_DRAFT, 'to' => self::PLACE_NEW, 'metadata' => ['kyp1']],
                self::TRANSITION_NOTIFY => ['from' => self::PLACE_NEW, 'to' => self::PLACE_NEW, 'metadata' => ['kyp2']],
                self::TRANSITION_PAYMENT => ['from' => self::PLACE_NEW, 'to' => self::PLACE_PAID, 'metadata' => ['kyp3']],
                self::TRANSITION_PROVISION => ['from' => self::PLACE_PAID, 'to' => self::PLACE_PROVISIONED, 'metadata' => ['kyp4']],
                self::TRANSITION_EXPIRE => ['from' => self::PLACE_NEW, 'to' => self::PLACE_EXPIRED, 'metadata' => ['kyp5']],
            ],
        ];
    }

When workflow_apply('startProcess') we receive the following events:

  1. Entered event for place "New" - this is OK
  2. Announce event for "startProcess" - this is not OK
[2022-08-10 15:20:44] local.DEBUG: Entered "New" for subject of class "App\Crm\Models\Orders\Order" in workflow "CrmOrder".  
[2022-08-10 15:20:45] local.DEBUG: Announce "startProcess" for subject of class "App\Crm\Models\Orders\Order" in workflow "CrmOrder". 

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions