Skip to content

refs #10 - Add command to start a workflow#11

Open
mventuravoyageprive wants to merge 3 commits intopocfrom
dist_10
Open

refs #10 - Add command to start a workflow#11
mventuravoyageprive wants to merge 3 commits intopocfrom
dist_10

Conversation

@mventuravoyageprive
Copy link
Copy Markdown
Contributor

#10

*/
public static function start(string $workflowName, string $workflowId, array $payloadHash)
{
$brokers = 'localhost';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be taken from conf

Comment thread Library/Commands/Workflow.php Outdated
public static function start(string $workflowName, string $workflowId, array $payloadHash)
{
$brokers = 'localhost';
$msg = '{"contract":"'.$workflowId.'", "type" : "WF-CONTROL", "action":"start"}';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be abstracted by the dto

$msg = '{"contract":"'.$workflowId.'", "type" : "WF-CONTROL", "action":"start"}';

//send message with givens params
$kafkaProducer = new \RdKafka\Producer();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be in di or even abstracted

Comment thread Library/Commands/Workflow.php Outdated
//send message with givens params
$kafkaProducer = new \RdKafka\Producer();
$kafkaProducer->addBrokers($brokers);
$topicName = 'disturb-' . $workflowName . '-manager'; //xxx create service to manage topic name
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#14 ;)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants