The workflow file name must begin with "ugc-". In fact, in the "Content proposal" service parameters, only workflows beginning with "ugc-" are available.
In addition, the workflow associated with the proposed content must contain action 1111 as shown below:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
This 1111 action is used when submitting content from the Content Proposal service.
The life cycle depends on your use, and can be very close to the standard life cycle.
If, for example, you wish to moderate content after the fact, add the validation function to action 1111.
If you use plugin UGC with an integration mode that transforms the proposed content into another type of content, the lifecycle can be minimalist, containing only the 1111 action and a single state.
plugin Classified Ads provides 2 lifecycles for classified ads: a lifecycle with a priori validation and a lifecycle with a posteriori validation. You can use these examples to create your own workflow.
Send mail notifications to authors
plugin UGC also provides a workflow function (org.ametys.plugins.ugc.workflow.SendMailToCreatorFunction) which, by simple configuration, sends a mail to the creator of the proposed content.
The purpose and message of mail can be configured.
It can be used, for example, as a post-function for content validation and/or rejection.
Oops!
Copy to clipboard failed. Open the code and copy it manually.
{0} The user who acts on the content (validates, modifies, etc ...)
{1} Content name
{2} Site name
{3} Page title (if any)
{4} Link to content page (if available)
Examples:
Oops!
Copy to clipboard failed. Open the code and copy it manually.
<message key="PLUGINS_CLASSIFIED_ADS_WORKFLOW_MAIL_BODY_ACTION_VALIDATE">L'utilisateur {0} a validé la petite annonce "{1}" du site "{2}". Pour vous rendre sur la page cliquez sur le lien ci-après {4}.</message>
<message key="PLUGINS_CLASSIFIED_ADS_WORKFLOW_MAIL_BODY_ACTION_VALIDATE_ORPHAN">L'utilisateur {0} a validé la petite annonce "{1}" du site "{2}".</message>
<message key="PLUGINS_CLASSIFIED_ADS_WORKFLOW_MAIL_BODY_ACTION_VALIDATE">L'utilisateur {0} a validé la petite annonce "{1}" du site "{2}". Pour vous rendre sur la page cliquez sur le lien ci-après {4}.</message>
<message key="PLUGINS_CLASSIFIED_ADS_WORKFLOW_MAIL_BODY_ACTION_VALIDATE_ORPHAN">L'utilisateur {0} a validé la petite annonce "{1}" du site "{2}".</message>
<message key="PLUGINS_CLASSIFIED_ADS_WORKFLOW_MAIL_BODY_ACTION_VALIDATE">L'utilisateur {0} a validé la petite annonce "{1}" du site "{2}". Pour vous rendre sur la page cliquez sur le lien ci-après {4}.</message>
<message key="PLUGINS_CLASSIFIED_ADS_WORKFLOW_MAIL_BODY_ACTION_VALIDATE_ORPHAN">L'utilisateur {0} a validé la petite annonce "{1}" du site "{2}".</message>
The **_ORPHAN key is used when there is no page associated with the content.
Access to lifecycle buttons
To access lifecycle actions and status from the ribbon, you need to define the buttons/menus linked to this lifecycle.
Here is an example based on plugin Classified Ads and the post-clearance workflow
Oops!
Copy to clipboard failed. Open the code and copy it manually.
All that remains is to add these menus/buttons to the content tab. They will only be visible for content linked to this workflow (i.e. classified ads here).
To do this, the ribbon and the "Content" tab must be overloaded as follows:
Oops!
Copy to clipboard failed. Open the code and copy it manually.