diff --git a/src/content/docs/workflows/build/rules-of-workflows.mdx b/src/content/docs/workflows/build/rules-of-workflows.mdx index ec5889c96ab51b7..bc65b67e7926f7c 100644 --- a/src/content/docs/workflows/build/rules-of-workflows.mdx +++ b/src/content/docs/workflows/build/rules-of-workflows.mdx @@ -306,8 +306,8 @@ export default { let instanceId = getTransactionId() // e.g. assuming transaction IDs are unique // or: compose a composite ID and store it in your database // so that you can track all instances associated with a specific user or merchant. - instanceId = `${getUserId(request}-${await crypto.randomUUID().slice(0, 6)}` - let { result } = await addNewInstance(userId, instanceId) + instanceId = `${getUserId(request)}-${await crypto.randomUUID().slice(0, 6)}` + let { result } = await addNewInstanceToDB(userId, instanceId) let instance = await env.MY_WORKFLOW.create({ id: userId, params: payload