GetAttribute and RemoveAttribute delegates

The GetAttribute and RemoveAttribute delegate respectively gets or removes attributes identified by the input parameters. Matching can be done by attributeId or by owner and type. If attributeId given the rest of the parameters are not taken into account. Matched/removed attributes are returned as a list with the output variable.

Field name Mandatory Description
attributeId N ID of the attribute.
ownerId N Id of the term that the attribute belongs to.
typeId N Identify type term of the attribute - either id or signifier must be set, setting both will cause typeId to be used.
typeSignifier
resultVariableName N The name of the variable that the result will be set in, if not given the result will be set in the variable named "output"

The delegate is deprecated. Replace your service task containing this delegate with a script task, for example:

  • Get attribute:
    <scriptTask id="scripttask1" name="Get attribute" scriptFormat="groovy" activiti:autoStoreVariables="false">
        <script><![CDATA[
            def attribute = attributeApi.getAttribute(string2Uuid(givenAttributeId));
            execution.setVariable("output", attribute)
        ]]></script>
    </scriptTask>
  • Remove attribute:
    <scriptTask id="scripttask1" name="Remove attribute" scriptFormat="groovy" activiti:autoStoreVariables="false">
        <script><![CDATA[
            attributeApi.removeAttribute(string2Uuid(givenAttributeId));
        ]]></script>
    </scriptTask>