<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2010-2017 Evolveum
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->


<!--

This file provides a set of tasks for demo/testing midPoint task suspension, resuming, deletion features.

Used for test scenarios (http://wiki.evolveum.com/display/midPoint/Test+Scenarios)
so please do not edit unless you know what you are doing.

-->

<objects xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:noop="http://midpoint.evolveum.com/xml/ns/public/task/noop/handler-3"
         xsi:schemaLocation="/../infra/schema/src/main/resources/xml/ns/public/common/common-3.xsd">

    <task oid="00000002-0000-0000-0000-123450000001">
        <name>Task1: long-running task (3600x1s, a 3600s)</name>

        <activity>
        <work>
            <noOp>
                <steps>3600</steps> <!--  at the end of each step, the NoOp handler looks for shutdown signal -->
                <delay>1000</delay> <!--  delay simulates a non-interruptible processing -->
            </noOp>
        </work>
        </activity>

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

        <binding>loose</binding>
        <schedule>
            <recurrence>recurring</recurrence>
            <interval>3600</interval>
        </schedule>
    </task>

    <task oid="00000002-0000-0000-0000-123450000002">
        <name>Task2: long-running, ill-behaved task (360x10s, a 3600s)</name>
        <activity>
            <work>
                <noOp>
                    <steps>360</steps> <!--  at the end of each step, the NoOp handler looks for shutdown signal -->
                    <delay>10000</delay> <!--  delay simulates a non-interruptible processing -->
                </noOp>
            </work>
        </activity>
        <taskIdentifier>10000002-0000-0000-0000-123450000002</taskIdentifier>
        <ownerRef oid="00000000-0000-0000-0000-000000000002"/>
        <executionStatus>runnable</executionStatus>
        <binding>loose</binding>
        <schedule>
            <recurrence>recurring</recurrence>
            <interval>3600</interval>
        </schedule>
    </task>

    <task oid="00000002-0000-0000-0000-123450000003">
        <name>Task3: short-running, tightly-bound task (1x1s, a 5s)</name>
        <activity>
            <work>
                <noOp>
                    <steps>1000</steps> <!--  at the end of each step, the NoOp handler looks for shutdown signal -->
                    <delay>1</delay> <!--  delay simulates a non-interruptible processing -->
                </noOp>
            </work>
        </activity>
        <taskIdentifier>10000002-0000-0000-0000-123450000003</taskIdentifier>
        <ownerRef oid="00000000-0000-0000-0000-000000000002"/>
        <executionStatus>runnable</executionStatus>
        <schedule>
            <recurrence>recurring</recurrence>
            <interval>5</interval>
        </schedule>
    </task>

    <task oid="00000002-0000-0000-0000-123450000004">
        <name>Task4: non-resilient task (3600x1s, a 3600s)</name>
        <activity>
            <work>
                <noOp>

                    <steps>3600</steps> <!--  at the end of each step, the NoOp handler looks for shutdown signal -->
                    <delay>1000</delay> <!--  delay simulates a non-interruptible processing -->
                </noOp>
            </work>
        </activity>
        <taskIdentifier>10000002-0000-0000-0000-123450000004</taskIdentifier>
        <ownerRef oid="00000000-0000-0000-0000-000000000002"/>
        <executionStatus>runnable</executionStatus>
        <binding>loose</binding>
        <schedule>
            <recurrence>recurring</recurrence>
            <interval>3600</interval>
        </schedule>
        <threadStopAction>suspend</threadStopAction>
    </task>

</objects>
