[midPoint] ignore fatal error in task

Hsin-Fang Hsu hsin-fang.hsu at itconcepts.ch
Thu Apr 27 12:05:18 CEST 2023


Hi,

I want to ignore fatal error in task so it can keep running without stop.
I am using midpoint 4.4.2.
I have tried <errorHandling> configuration in both singleBulkActionTask and LiveSyncTask but none of it works. The tasks still suspend after a fatal error occurs.
The same tasks were also tested in a simple (i.e., without any configuration) docker system and they run continuously after several fatal error even without the <errorHandling> configuration in the task.
So maybe somewhere else can define the ignore?

Below please find the configuration of the tasks.

Thanks a lot for your help in advance!

Best regards,
Hsin-Fang

singleBulkActionTask
<task xmlns=http://midpoint.evolveum.com/xml/ns/public/common/common-3
      xmlns:c=http://midpoint.evolveum.com/xml/ns/public/common/common-3
      xmlns:q=http://prism.evolveum.com/xml/ns/public/query-3
      xmlns:org=http://midpoint.evolveum.com/xml/ns/public/common/org-3
      oid="0819890e-acea-4afe-80d7-aff79f4d9bff">
    <name>mustChangePwd</name>
    <assignment>
        <targetRef oid="00000000-0000-0000-0000-000000000508" relation="org:default" type="c:ArchetypeType"/>
    </assignment>
   <archetypeRef oid="00000000-0000-0000-0000-000000000508" relation="org:default" type="c:ArchetypeType">
    </archetypeRef>
    <roleMembershipRef oid="00000000-0000-0000-0000-000000000508" relation="org:default" type="c:ArchetypeType">
    </roleMembershipRef>
    <ownerRef oid="00000000-0000-0000-0000-000000000002"/>
    <executionState>runnable</executionState>
    <category>BulkActions</category>
    <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/scripting/handler-3</handlerUri<http://midpoint.evolveum.com/xml/ns/public/model/scripting/handler-3%3c/handlerUri>>
    <schedule>
        <recurrence>single</recurrence>
    </schedule>
    <extension>
        <scext:executeScript
                xmlns:scext=http://midpoint.evolveum.com/xml/ns/public/model/scripting/extension-3>
            <s:search xmlns:s=http://midpoint.evolveum.com/xml/ns/public/model/scripting-3>
                <s:type>UserType</s:type>
                <s:action>
                    <s:type>modify</s:type>
                    <s:parameter>
                        <s:name>delta</s:name>
                        <c:value>
                            <changeType>modify</changeType>
                            <itemDelta>
                                <modificationType>replace</modificationType>
                                <path>extension/mustChangePwd</path>
                                <value>true</value>
                            </itemDelta>
                        </c:value>
                    </s:parameter>
                </s:action>
            </s:search>
        </scext:executeScript>
    </extension>
    <activity>
        <controlFlow>
            <errorHandling>
                <entry>
                    <situation>
                        <status>fatal_error</status>
                    </situation>
                    <reaction>
                        <retryLater>
                            <initialInterval>PT1S</initialInterval>
                            <nextInterval>PT1S</nextInterval>
                        </retryLater>
                    </reaction>
                </entry>
            </errorHandling>
        </controlFlow>
    </activity>
</task>

I also tried
<activity>
    <controlFlow>
        <errorHandling>
            <entry>
                <situation>
                    <status>fatal_error</status>
                </situation>
                <reaction>
                    <ignore/>
                </reaction>
            </entry>
        </errorHandling>
    </controlFlow>
</activity>


LiveSyncTask

<task xmlns=http://midpoint.evolveum.com/xml/ns/public/common/common-3
      xmlns:c=http://midpoint.evolveum.com/xml/ns/public/common/common-3
      xmlns:icfs=http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3
      xmlns:org=http://midpoint.evolveum.com/xml/ns/public/common/org-3
      xmlns:q=http://prism.evolveum.com/xml/ns/public/query-3
      xmlns:ri=http://midpoint.evolveum.com/xml/ns/public/resource/instance-3
      xmlns:t=http://prism.evolveum.com/xml/ns/public/types-3 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
      oid="ed760bf8-9bda-4f2d-88e0-077e37159403" version="1">
    <name>LiveSync Accounts</name>
    <assignment>
        <targetRef oid="00000000-0000-0000-0000-000000000504" relation="org:default" type="c:ArchetypeType"/>
    </assignment>
    <archetypeRef oid="00000000-0000-0000-0000-000000000504" relation="org:default" type="c:ArchetypeType"/>
    <roleMembershipRef oid="00000000-0000-0000-0000-000000000504" relation="org:default" type="c:ArchetypeType"/>
    <ownerRef oid="00000000-0000-0000-0000-000000000002" relation="org:default" type="c:UserType"/>
    <executionState>runnable</executionState>
    <schedulingState>ready</schedulingState>
    <objectRef oid="81c8ae58-3950-457d-a814-a7385372d131" relation="org:default" type="c:ResourceType"/>
    <binding>loose</binding>
    <schedule>
        <recurrence>recurring</recurrence>
        <interval>300</interval>
        <misfireAction>executeImmediately</misfireAction>
    </schedule>
    <errorHandlingStrategy>
        <entry>
            <situation>
                <status>fatal_error</status>
            </situation>
            <reaction>
                <retryLater>
                    <initialInterval>PT5S</initialInterval>
                    <nextInterval>PT5S</nextInterval>
                </retryLater>
            </reaction>
        </entry>
    </errorHandlingStrategy>
    <activity>
        <work>
            <liveSynchronization>
                <resourceObjects>
                    <resourceRef oid="81c8ae58-3950-457d-a814-a7385372d131" relation="org:default" type="c:ResourceType"/>
                    <kind>account</kind>
                    <intent>default</intent>
                    <objectclass>ri:AccountObjectClass</objectclass>
                </resourceObjects>
            </liveSynchronization>
        </work>
        <distribution>
            <workerThreads>2</workerThreads>
        </distribution>
    </activity>
</task>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20230427/1b630697/attachment-0001.htm>


More information about the midPoint mailing list