`export class myclass extends WorkflowEntrypoint<Env, Params> { async run(event: WorkflowEvent<P
export class myclass extends WorkflowEntrypoint<Env, Params> {
async run(event: WorkflowEvent<Params>, step: WorkflowStep) {
}
}export class myclass extends WorkflowEntrypoint<Env, Params> {
async run(event: WorkflowEvent<Params>, step: WorkflowStep) {
}
}// Can access bindings on this.env
max_concurrent_instances config.step.sleep duration is in seconds if it's a number but it seems to me that it's actually ms?Worker "workflows:AfterContractActivated-development"'s binding "USER_WORKFLOW" refers to a service "core:user:delivery-development", but no such service is defined.onError callback i could pass where i could set some custom logic to try when a step errors. E.g.:onError callback would still have to be treated like another step, but ends up being another not-quite-a-step API with its own semantics.WORKFLOW_SERVICE Env variabe as? 
✘ [ERROR] TypeError: The RPC receiver does not implement the method "createInstance"yieldEvent is outside of a step - meaning that these calls can be repeated multiple times (not sure if that's you want or not)internal error before the workflow tries to execute any steps. Any ideas? 

WorkflowEntrypoint and bindings are accessed via this.env rather than just env^[a-zA-Z0-9_][a-zA-Z0-9-_]*$ (https://developers.cloudflare.com/workflows/reference/limits)// Can access bindings on this.envmax_concurrent_instancesstep.sleepWorker "workflows:AfterContractActivated-development"'s binding "USER_WORKFLOW" refers to a service "core:user:delivery-development", but no such service is defined.onErroronError "services": [
{
"binding": "WORKFLOW_SERVICE",
"service": "wf-portcity-ai"
}
],WORKFLOW_SERVICE✘ [ERROR] TypeError: The RPC receiver does not implement the method "createInstance"yieldEventinternal errorWorkflowEntrypointthis.envenv^[a-zA-Z0-9_][a-zA-Z0-9-_]*$export class TextGenerator extends WorkflowEntrypoint<CloudflareBindings> {
async run(
event: Readonly<WorkflowEvent<{ prompt: string }>>,
step: WorkflowStep,
) {
const { prompt } = event.payload;
return await step.do(
"generate-text",
{
retries: { limit: 3, delay: 1000, backoff: "exponential" },
onError: async (error, retry) => {
if (error instanceof AITimeoutError) {
// Complex model timed out, try with a faster one first
try {
return await generateText({
model: "gpt-3.5-turbo",
prompt,
timeout: 5000,
});
} catch {
// If faster model fails, retry with original complex model (retry is the original callback in step.do)
return retry();
}
}
throw error;
}
},export class RAGWorkflow {
async run(event, step) {
const { text } = event.params;
const record = await step.do('create database record', async () => {
const query = 'INSERT INTO notes (text) VALUES (?) RETURNING *';
const { results } = await env.DB.prepare(query).bind(text).run();
const record = results[0];
if (!record) throw new Error('Failed to create note');
return record;
});
const embedding = await step.do('generate embedding', async () => {
const embeddings = await env.AI.run('@cf/baai/bge-base-en-v1.5', { text: text });
const values = embeddings.data[0];
if (!values) throw new Error('Failed to generate vector embedding');
return values;
});
await step.do('insert vector', async () => {
return env.VECTOR_INDEX.upsert([
{
id: record.id.toString(),
values: embedding,
},
]);
});
}
}