Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
workflow.yaml - testing double "from" marking
# Entity workflow - object names redacted
# A SuperUser can send an Entity to an Evaluator
# The Evaluator decides to optIn or optOut the request. They can change their mind until a timeout defined in the Entity.
# If Evaluator opts in, the Entity is then sent to the Recipient.
# The Recipient finally decides to accept or refuse
framework:
workflows:
Entity:
type: workflow
metadata:
title: Entity workflow
marking_store:
type: method
property: status
supports:
- App\Entity\Entity
initial_marking: waiting
places:
waiting:
metadata:
title: waiting
sent:
metadata:
title: sent
description: Sent to Evaluator
opted_in:
metadata:
title: opted_in
opted_out:
metadata:
title: opted_out
accepted:
metadata:
title: accepted
refused:
metadata:
title: refused
transitions:
send:
from: waiting
to: sent
# guard SuperUser only
metadata:
title: Send to Evaluator
optOut:
from: [sent, opted_in]
to: opted_out
# guard Evaluator only
metadata:
title: Evaluator opts out
optIn:
from: [sent, opted_out]
to: opted_in
# guard Evaluator only
metadata:
title: Evaluator opts in
accept:
from: opted_in
to: accepted
#guard Recipient only
metadata:
title: Recipient accepts
refuse:
from: opted_in
to: refused
# guard Recipient only
metadata:
title: Recipient refuses
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment