Automated campaign scheduling

Last modified 30 Sep 2026 14:26 UTC
Access certification feature
This page describes Access certification midPoint feature. Please see the feature page for more details.

Access certification campaigns can be automatically started using tasks. Scheduled certification campaigns are meaningful if you, for example, want to run access certifications quarterly. The task-based automation ensures that the campaign starts on time without human intervention.

See Task management for more information about tasks and their configuration.

This article describes basics of configuring a simple scheduled task referencing an access certification campaign. The goal is to launch the campaign periodically at times defined by a cron-like pattern in the task.

1. Define certification campaign

Firstly, define an access certification campaign. Refer to Certification campaign configuration regarding the campaign configuration options. See Access certification tutorial if you need help getting started with campaign definition.

For testing purposes, we suggest starting with something small; just one stage affecting low number of people willing to help you debug the setup.

2. Set up task launching the campaign

Once your campaign is ready, define a task that will launch it at defined times. Set the schedule to short intervals (minutes, hours, then days) to get meaningful results faster, or create an instance and run it manually.

As an example, here is a task that runs a campaign every five minutes:

<task
    xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
    xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3">

    <name>Start campaign: All user assignment</name>

    <ownerRef oid="00000000-0000-0000-0000-000000000002"/>
    <executionStatus>runnable</executionStatus>

    <handlerUri>http://midpoint.evolveum.com/xml/ns/public/certification/task/campaign-creation/handler-3</handlerUri>
    <objectRef type="AccessCertificationDefinitionType">
        <filter>
            <q:text>name="All user assignments"</q:text>
        </filter>
    </objectRef>
    <binding>loose</binding>
    <schedule>
        <recurrence>recurring</recurrence>
        <cronLikePattern>0 */5 * * * ?</cronLikePattern>        <!-- each 5 minutes (for testing) -->
    </schedule>

</task>

The filter in the <objectRef> element selects the campaign to run by its name—All user assignment. You can reference a campaign by OID like this:

<objectRef type="AccessCertificationDefinitionType" oid="12345678-9012-3245-6789-012345678901"/>

2.1. Get started with examples from samples repository

The midPoint samples repository contains examples to get you started. For testing purposes, you can:

  1. Download the def-*.xml campaign definition files and the start-*.xml task definition files found in directory linked above.

  2. Import them using the Import object action of the midPoint graphical user interface (GUI) left-side menu.

After importing the campaigns and tasks, the campaigns are automatically scheduled to run at given times.

3. Manage and review scheduled campaigns in GUI

You can check the current status of a campaign in midPoint graphical user interface (GUI) under Certification > Campaign scheduling. All certification-related tasks are shown.

scheduling
Was this page helpful?
YES NO
Thanks for your feedback