Skip to content

Commit

Permalink
Respond to upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Dec 11, 2024
1 parent 6b53c3e commit 85bc801
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions early-return/src/start-test-workflow.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { Connection, Client, StartWorkflowOperation } from '@temporalio/client';
import { Connection, Client, WithStartWorkflowOperation } from '@temporalio/client';
import { transactionWorkflow } from './workflows';
import { getTransactionConfirmation } from './shared';

async function runTransactionWorkflow(transactionID: string, client: Client) {
const workflowId = 'transaction-' + transactionID;

const startWorkflowOperation = new StartWorkflowOperation(transactionWorkflow, {
const startWorkflowOperation = new WithStartWorkflowOperation(transactionWorkflow, {
workflowId,
args: [transactionID],
taskQueue: 'early-return',
workflowIdConflictPolicy: 'FAIL',
});

const earlyConfirmation = await client.workflow.executeUpdateWithStart(getTransactionConfirmation, {
Expand Down

0 comments on commit 85bc801

Please sign in to comment.