Documents in Sophora have different workflow states: for example working, released, published. Changes to these states can be done manually via the rich client or by other programs via the Sophora api. Beside this, there are state changes which are done automatically by the server.
If the server is not running while a date for an automatic workflow step is reached, the document state will be changed two minutes after the server start.
Publish at
It is possible to schedule an automatic publish operation on a document. To accomplish this, two steps have to be done:
- Setting the property
sophora:publishAtwith a date in the future - Publish the document
When the date of the property sophora:publishAt is reached, the server publishes the document without any checks. It is not relevant whether the document had an older published version or had no published version at all. The publish operation is done by the server, however, the value for "published by" is taken from the configured value in the property sophora.autoPublish.username. If this property is set to "[LAST_MODIFIER]" the server takes the "modified by" value from the document and copies it into the "published by" property of the document.
Online to (End date)
It is possible to schedule an automatic offline operation on a document. To accomplish this, two steps have to be done:
- The property
sophora:endDatemust be set. - The document must be published.
Changing the document afterwards will not stop the automatic offline operation. To change the offline date, the document must be published with the changed (or removed) date. The server always takes the offline date from the last published document version. The offline operation is done by the server, however, the value for "published by" is taken from the configured value in the property sophora.autoOffline.username. If this property is set to "[LAST_MODIFIER]" the server takes the "modified by" value from the document and copies it into the "published by" property of the document.
Cyclic Online/Offline
It is also possible to configure a cyclic online/offline workflow where documents will be set online/offline via a cron expression. To configure such a behaviour, you have to configure two properties:
sophora:cronOff
The cron expression set in this property will be used to set the document offline periodically.
sophora:cronOn
The cron expression set in this property will be used to publish the document periodically.
You can configure these properties by including the mixin sophora-mix:cronControl in your node type. You will also get two additional properties: sophora:cronNextOffDate and sophora:cronNextOnDate. These properties will be used internally and should not be edited manually.
Changing the document afterwards will not stop the automatic online/offline operation. To change the behaviour, the document must be published with the changed (or removed) properties. The server always takes the cron expressions from the last published document version. The offline and publish operations are done by the server, however, the value for "published by" is taken from the configured value in the property sophora.cronOffline.username. If this property is set to "[LAST_MODIFIER]" the server takes the "modified by" value from the document and copies it into the "published by" property of the document.