This feature is experimental. It means that it is not intended for production use. The feature is not finished. It is not stable. The implementation may contain bugs, the configuration may change at any moment without any warning and it may not work at all. Use at your own risk. This feature is not covered by midPoint support. In case that you are interested in supporting development of this feature, please consider purchasing midPoint Platform subscription.

Introduction

MidPoint Scripting Language (a.k.a "bulk actions") traditionally have two kinds of components: "actions" and "others". The former ones have been devised to do something on input objects: modify them, enable/disable them, assign roles or resources to them, and so on. The latter components have been created to do everything other: to search repository for objects (to be applied actions to), to structure the flow to pipelines or sequences, or to manipulate the objects being passed between components somehow, typically by filtering the content by removing (or keeping) specified items.

The original specification of actions and their parameters was quite powerful - parameters could be computed dynamically using other bulk actions - but also awkward to use.

So we decided to add an option of simple specification of action parameters. So, for example, instead of writing:

<s:pipeline>
    <s:search>
        <s:type>UserType</s:type>
    </s:search>
    <s:action>
        <s:type>execute-script</s:type>
        <s:parameter>
            <s:name>script</s:name>
            <c:value xsi:type="c:ScriptExpressionEvaluatorType">
                <code>
                    ...
                </code>
            </c:value>
        </s:parameter>
        <s:parameter>
            <s:name>forWholeInput</s:name>
            <c:value>false</c:value>
        </s:parameter>
        <s:parameter>
            <s:name>quiet</s:name>
            <c:value>true</c:value>
        </s:parameter>
    </s:action>
</s:pipeline>

one can simply write

<s:pipeline>
    <s:search>
        <s:type>UserType</s:type>
    </s:search>
    <s:execute>
        <s:script>
            <code>
                ...
            </code>
        </s:script>
        <s:forWholeInput>false</s:forWholeInput>
        <s:quiet>true</s:quiet>
    </s:execute>
</s:pipeline>

Moreover, we can rely on all the auto-completion and schema-checking features of modern IDEs, because the definition of s:execute element and its parameters is fully described in relevant XML schema document.

Actions

The actions themselves are the same as they were before midPoint 4.2. In some cases, the action names were clarified. In other ones, parameters were reorganized into more logical way. But the backward compatibility is fully ensured: the old way of specifying actions is still possible; although it will be probably deprecated (and removed) in the future.

ActionDescription
addAdds object(s) to the repository.
modifyModifies object(s).
deleteDeletes object(s).
enable, disableEnables or disables object(s).
assignAssigns an abstract role or a resource to object(s).
unassignRemoves assignment(s) from object(s).
recomputeRecomputes object(s) (or schedules the recomputation to the future).
executeExecutes a script against the input data.
resumeTaskResumes suspended task(s).
resolveReferenceResolves reference(s).
applyDefinitionApplies definition to shadows or resources.
purgeSchemaRemoves all schema information from given resource(s).
testResourceTests resource(s).
generateValueGenerates value(s) for object(s).
notifySends a custom notification event for objects.
logLogs the input data.

The following actions were not changed and are accessible only in the traditional way:

ActionDescription
discover-connectorsDiscovers all connectors on given connector host(s).
validateValidates resource(s) - i.e. provides a set of issues just like in Resource Wizard (since 3.5)