Rest api based workflow with an option to wait for client input

Good day,

I am still in the early stages of testing Camunda. I seen how to use Camunda for inner workflow management, but I wanted to ask if it is possible to use it for the following workflow scenario ( which is based on the customer input from the client side ).

For example, i got a website with a section in which a user follows a 5 steps flow. On each step the process waits for the next user input to proceed ( via a form button submit ).
On the server side i got a few micro services each with its own logic which needs to be used at some point in the workflow scenario.

I want to use a web api based service, i will call it ‘Flow Service’ for now, with which i will be able to control the 5 step flow.
Something like this -

  1. The client(user) sends a request with some intial data to start the process via a button click on the website.

  2. The flow service gets the rest http request and initiates the workflow engine ( camunda ) which reaches the first step and waits for the next client input.

3.The client(user) recives valid response and fills in the details for the first step and clicks ‘next’.

  1. The flow service receives the next http request from the client and initiates the next workflow step ( part of which is calling different micro services to do some logic ).

5.The client receives a valid response and continues to the next step.

_. … At the last step the workflow reaches the end point and ends.

Hi,

One way to achieve this is you have a process started by the initial page submission and then you could use a receive task to capture each of the subsequent page submissions. Hence have a look at the Message correlation API in the REST reference…

regards

Rob

@Ivgi take a look at: Chaining User Tasks to create an interactive flow (sort of a wizard style)?

Wizard style flows can be largely problematic because of the all of the validations, step sequences, etc.

For example, how would you support going back a step?

@StephenOTT I dont think we will be making wizard style flows, maybe some basic ‘await’ for user input but i dont believe it will involve multiple steps. I think the receive task option will be enough.

When i did get to work on a wizard style workflow in the past i did it with windows workflow and for supporting going back we had to store each state’s data. But i didnt try doing it with other tools so i dont have much to compare to, but it was paintful at the complex steps.

To create a wizard you are better to use a actual wizard framework and send your final data into a workflow. And use workflows for transactional step verification as required. IMO, Much easier. :slight_smile:

2 Likes