Building a GUI configurable workflow

I am experimenting with Temporal to build a GUI where an end-user can build a workflow through a GUI via selecting from an assortment of pre-defined activities (query a restful API, read from a db etc.)

The key challenges I am dealing with are:

  1. Ability to pass any custom parameters and triggers (timer, webhook etc) when initializing a workflow.
  2. Pass these parameters and outputs of preceding activities (in the current workflow) as parameters to subsequent activity.
  3. Query the inputs and outputs of each activity in the workflow.
  4. Validate the shapes of inputs and outputs for each activity based on what is specified in the GUI.
  5. Visualise the execution of a workflow (branching/fanout/errors)

I am new to Golang and Temporal and am picking up things as I go along.

What be the core concepts I should be looking at to support these use cases?

See if this Go DSL workflow sample answers your questions.

1 Like

@maxim thank you for your prompt reply. As I am going through this sample, and running it against the latest temporal release, I have another maybe stupid question:

As part of my use case I need to persist the bindings object in the sample at the end of every activity invocation and ultimately at the end of the workflow. Basically what this would mean in a real world example is that the initial input to the workflow (can be some json) and the result of each activity invocation is being persisted. Can this be done within Temporal itself or would an external persistence layer make sense here?

All the data in the workflow is already persisted. So no need to persist it somewhere else.

Nice! What would be the recommended way to query this data? For example, I would want to query the state of bindings object at the end of every activity invocation. Perhaps I can return it from every activity invocation and also the workflow to make sure it gets recorded in the history? Am I understanding this correctly?

Use query workflow execution feature.

There is no need to pass the bindings object through activities. You can just store it in a workflow variable.

1 Like