workflow-engine

All demonstrations

Waits for a person

Approve and copy

The run measures a file and stops on a question. Nothing else happens until someone answers: a yes copies the file, a no ends the run with nothing copied.

File whose copy has to be approved
LICENSE
Existing folder the file is copied into
~/work/_temp/copy-target

The question

The run stopped here and waited. Answer the question and see which way the run goes.

Measure the filecode
Ask for approvalperson
Copy the filecode
Report the copycode
The run is waiting for a person

Approve the copy

Decide whether 'LICENSE' (1.05 KB) may be copied. Answer 'approved' or 'rejected' as the answer text, and name the decision maker in 'reviewer'.

Goal of the step: Nothing is copied before someone approves it.

Nothing has run since the question. The state is saved, and the run can wait as long as it takes.

This card replays the question of a real run. The real run is answered from the command line.

How it runs

The run: approved4 steps · 327 ms
  1. code · 1 step

    Measure the file

    Reads the size of the file, so the question can state it.

  2. person · 1 step

    Ask for approval

    Stops and waits for a person. The state is saved, and the run can wait as long as it takes.

  3. code · 1 step

    Copy the file

    Runs only after the answer was a yes.

  4. code · 1 step

    Report the copy

    Says where the copy went and ends the run.

Every cell is one step of the runIn the order it happened, coloured by who did it.
codemodelpersonCode took 7 ms of the 327 ms.

Go deeper