Skip to content

Instantly share code, notes, and snippets.

@vjandrea
Created January 6, 2020 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vjandrea/f2e1f24c2ae517c0a1b7e5e44581d2e8 to your computer and use it in GitHub Desktop.
Save vjandrea/f2e1f24c2ae517c0a1b7e5e44581d2e8 to your computer and use it in GitHub Desktop.
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