getWebhookPayloadAndHeaders example

'Text 1',
                'Text 2 and Text 3',
                'application/json'
            );

        $appFlowActionProvider = new AppFlowActionProvider(
            $connection,
            $this->createMock(BusinessEventEncoder::class),
            $stringTemplateRender
        );

        $webhookData = $appFlowActionProvider->getWebhookPayloadAndHeaders($flow$ids->get('appFlowActionId'));

        static::assertEquals(['param1' => 'Text 1', 'param2' => 'Text 2 and Text 3']$webhookData['payload']);
        static::assertEquals(['content-type' => 'application/json']$webhookData['headers']);
    }
}


        $action->handleFlow($event);
    }

    private function callApp(ActionSequence $sequence, StorableFlow $event): void
    {
        if (!$sequence->appFlowActionId) {
            return;
        }

        $eventData = $this->appFlowActionProvider->getWebhookPayloadAndHeaders($event$sequence->appFlowActionId);

        $globalEvent = new AppFlowActionEvent(
            $sequence->action,
            $eventData['headers'],
            $eventData['payload'],
        );

        $this->dispatcher->dispatch($globalEvent$sequence->action);
    }

    private function sequenceRuleMatches(StorableFlow $event, string $ruleId): bool
    {
Home | Imprint | This part of the site doesn't use cookies.