buyanov/symfony-temporal-worker

Temporal worker for symfony app

Installs: 4 703

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 2

Open Issues: 0

Type:symfony-bundle

0.1.3 2024-02-27 06:33 UTC

This package is auto-updated.

Last update: 2024-12-09 07:18:23 UTC


README

Для регистрации активити и воркфлоу нужно использовать

#[AutoconfigureTag('temporal.activity')]

#[AutoconfigureTag('temporal.workflow')]

соответственно.

Пример активити

<?php

namespace App\Temporal\Activity;

use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
use Temporal\Activity\ActivityInterface;
use Temporal\Activity\ActivityMethod;

#[AutoconfigureTag('temporal.activity')]
#[ActivityInterface('ProductProperty.')]
interface ProductPropertyActivityInterface
{
    #[ActivityMethod('createOrUpdateProductProperty')]
    public function createOrUpdateProductProperty(string $productGuid, string $propertyNameGuid, string $value): string;
}