Skip to content

Latest commit

 

History

History

protobufs

Protobufs

Use Protobufs.

We provide the Payload Converter to the Client (src/client.ts) and Worker (src/worker.ts), and then we can use Protobufs in the Client, Workflow (src/workflows.ts), and Activity (src/activities.ts).

Running this sample

  1. temporal server start-dev to start Temporal Server.
  2. npm install to install dependencies.
  3. npm run start.watch to start the Worker.
  4. In another shell, npm run workflow to run the Workflow Client.

The client should log the Workflow ID that is started, and you should see it reflected in Temporal Web UI.

Optionally, you can also uncomment the await handle.result(), rerun, and see the client script return:

Started workflow my-business-id-b6155489-920f-41a8-9e88-c17c24d47ee9
{ sentence: 'Proto is 2 years old.' }