BlogEntryWorkflow workflow to control publication of a BlogEntry
25 April 2023 - 07:21
|
Version 1
|
micha
| untagged
Roles
Nodes
ID |
Title |
Message |
Allow Edit |
Allow View |
---|
unpublished |
Unpublished |
This posting is not published yet. |
BlogAuthors |
BlogAuthors |
published* |
Published |
This posting is out in the wild. |
BlogAuthors |
Audience |
Edges
From |
Action |
To |
Title |
Allowed |
Notify |
Trigger |
Command |
---|
unpublished |
publish |
published |
Publish |
BlogAuthors |
|
off |
formfield("PublishDate" value="1741089100") |
published |
unpublish |
unpublished |
Unpublish |
BlogAuthors |
|
off |
formfield("UnpublishDate" value="1741089100") |
Init Transitions |
---|
unknown |
hidden |
published |
init |
|
|
|
|
unknown |
hidden |
unpublished |
init |
|
|
|
|
Settings
* Set notifyAudience = %IF{"AudienceMode=~'\b2\b'" then="Notify"}%
* Set canPublish = %IF{"%validDates% and PublishDate and PublishDate <= %NOW% and (not UnpublishDate or %NOW% < UnpublishDate)" then="on" else="off"}%
* Set canUnpublish = %IF{"%validDates% and UnpublishDate and UnpublishDate <= %NOW%" then="on" else="off"}%
* Set publishAction = %IF{"not PublishDate" then="formfield(\"PublishDate\" value=\"%NOW%\")"}%
* Set unpublishAction = %IF{"not UnpublishDate" then="formfield(\"UnpublishDate\" value=\"%NOW%\")"}%
* Set validDates = (not Publishdate or not UnpublishDate or PublishDate < UnpublishDate)
Graph