diff --git a/docusaurus/docs/openforms2bpel/configuration/scheduled-start-stop-receiver.md b/docusaurus/docs/openforms2bpel/configuration/scheduled-start-stop-receiver.md new file mode 100644 index 0000000..6d537c3 --- /dev/null +++ b/docusaurus/docs/openforms2bpel/configuration/scheduled-start-stop-receiver.md @@ -0,0 +1,17 @@ +--- +sidebar_position: 19 +--- + +# Scheduled Start/Stop WorkflowSelector Receiver +The processing of messages can be started or stopped by a scheduled job. This is done by starting/stopping the receiver of the **_WorkflowSelector_**. This still allows for messages to be delivered from the **_Notificaties API_**, but they won't be processed until the receiver is turned back on. The scheduled starting/stopping of the receiver can be useful if backend services are not available during a set period of time, for example during a backup cycle. By default this scheduled job is not enabled. + +### Configure Schedule +The scheduled start- and stop job for the **_WorkflowSelector_** can be configured with: +```ini +openforms2bpel.workflows.workflow-selector.start-receiver.cron-expression=0 * 5 * * ? +openforms2bpel.workflows.workflow-selector.start-receiver.enabled=false +openforms2bpel.workflows.workflow-selector.stop-receiver.cron-expression=0 * 0 * * ? +openforms2bpel.workflows.workflow-selector.stop-receiver.enabled=false +``` + +For information on the Quartz Cron syntax and list of examples, visit the [Quartz Scheduler Cron Trigger Documentation](https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html). \ No newline at end of file diff --git a/src/main/configurations/bpel/Configuration.xml b/src/main/configurations/bpel/Configuration.xml index ac0cb71..6f83f03 100644 --- a/src/main/configurations/bpel/Configuration.xml +++ b/src/main/configurations/bpel/Configuration.xml @@ -19,6 +19,7 @@ + @@ -46,6 +47,7 @@ &ConvertISO639Taal; &ImportFromLocalFS; &RetryScheduler; + &StartStopReceiverScheduler; &Notificaties_Subscribe; &UpdatePaymentCommandHandler; &Workflow_Fallback; diff --git a/src/main/configurations/bpel/Configuration_StartStopReceiverScheduler.xml b/src/main/configurations/bpel/Configuration_StartStopReceiverScheduler.xml new file mode 100644 index 0000000..6d05b2b --- /dev/null +++ b/src/main/configurations/bpel/Configuration_StartStopReceiverScheduler.xml @@ -0,0 +1,24 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/DeploymentSpecifics.properties b/src/main/resources/DeploymentSpecifics.properties index 86c35c5..06d2211 100644 --- a/src/main/resources/DeploymentSpecifics.properties +++ b/src/main/resources/DeploymentSpecifics.properties @@ -83,6 +83,10 @@ openforms2bpel.workflows.send-no-reply-user-email.auto-retry.cron-expression=${o openforms2bpel.workflows.send-no-reply-user-email.auto-retry.max-retries=${openforms2bpel.workflows.auto-retry.max-retries} openforms2bpel.workflows.send-no-reply-user-email.auto-retry.enabled=${openforms2bpel.workflows.auto-retry.enabled} +openforms2bpel.workflows.workflow-selector.start-receiver.cron-expression=0 * 5 * * ? +openforms2bpel.workflows.workflow-selector.start-receiver.enabled=false +openforms2bpel.workflows.workflow-selector.stop-receiver.cron-expression=0 * 0 * * ? +openforms2bpel.workflows.workflow-selector.stop-receiver.enabled=false openforms2bpel.workflows.formdata-collector-stylesheet-file=bpel/Common/xsl/FormDataCollector_ObjectsApi_Default.xslt openforms2bpel.workflows.formdata-transform-stylesheet-file=bpel/Common/xsl/FormDataTransform_Default.xslt