I'm also facing an unrelated issue, I don't seem to be able to call a Durable Object from a Workflow

I'm also facing an unrelated issue, I don't seem to be able to call a Durable Object from a Workflow, either inside a step or within the run() function. An error like this is returned and then the workflow stops in the Errored status.
internal error; reference = qkhe7o6ej7li8rrie5v0eks4


Interestingly this works fine when I run locally via
wrangler dev
. This is a simplified version of my workflow/DO:

import { WorkflowEntrypoint, WorkflowStep, WorkflowEvent, DurableObject } from 'cloudflare:workers';
import { ActionEvent } from '../types/events';

export class Portal extends DurableObject<Env> {
  constructor(ctx: DurableObjectState, env: Env) {
    super(ctx, env);

    console.log('Initialising portal Durable Object');
  }

  async test(): string {
    return "Hello!";
  }
}

export class ActionWorkflow extends WorkflowEntrypoint<Env, ActionEvent> {
  async run(params: WorkflowEvent<ActionEvent>, step: WorkflowStep) {
    const event = params.payload;
    const portalIdString = event.portal_id.toString();
    console.log('Starting workflow', event);

    const portal = this.env.PORTAL.getByName(portalIdString);
    const test = await portal.test();

    await step.do('test', async () => {
      console.log(test);
    });
  }
}


Any ideas? Or is anyone from CF able to look up that error reference 🙏
Was this page helpful?