Rule/script in Taskdefinition attributes entry

Which IIQ version are you inquiring about?

8.3

Please share any other relevant files that may be required (for example, logs).

I have Slimmed down both xml to minimum for this issue

xml exporter template:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<TaskDefinition executor="sailpoint.services.standard.task.ExportXML" name="XML Object Exporter" progressInterval="5000" progressMode="String" resultAction="Delete" subType="task_item_type_generic" template="true" type="Generic">
  <Description>Export XML of IIQ objects.</Description>
  <Signature>
    <Inputs>
      <Argument helpKey="Path to the directory under which the export structure will be placed." name="basePath" required="true" type="string">
        <Prompt>Base path for export</Prompt>
      </Argument>
    </Inputs>
    <Returns>
      <Argument name="exportDetails" type="string">
        <Prompt>Objects exported</Prompt>
      </Argument>
      <Argument name="objectsExported" type="int">
        <Prompt>Total objects exported</Prompt>
      </Argument>
    </Returns>
  </Signature>
</TaskDefinition>

my personal xml exporter:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<TaskDefinition assignedScopePath="numbers" name="my Object Exporter" resultAction="Delete" subType="task_item_type_generic" type="Generic">
  <Attributes>
    <Map>
      <entry key="basePath"/>
        <value>
          <script>
            <source>
              return “test“;
            </source>
          </script>
       </value>
    </Map>
  </Attributes>
  <AssignedScope>
    <Reference class="sailpoint.object.Scope" id="" name="0"/>
  </AssignedScope>
  <Description>Export XML of IIQ objects.</Description>
  <Owner>
    <Reference class="sailpoint.object.Identity" id="" name="johncena"/>
  </Owner>
  <Parent>
    <Reference class="sailpoint.object.TaskDefinition" id="" name="XML Object Exporter"/>
  </Parent>
</TaskDefinition>

Share all details about your problem, including any error messages you may have received.

So the xml export taskdefinition is called from another taskdefinition. Here we can prefill a value in the attributes.
But can I somehow get a rule of script within the entry value.
I found some documentation “dtddoc” that claims to name the available tags, but it seems to just list any tag for value without caring its also within a attribute within a taskdefinition.
I have tried script as above and <rule id= name= />
Both complain because i provide rule/stript while string is requested and it cant be parsed.
”sailpoint.object.Rule cannot be cast to java.lang.String]”
I tried type=”string” on the entry and also value but are invalid as debug cant save.

My endgoal is to inject today’s date into the path such as /home/user/export/2026-02-18/ where the date is just auto filled.

@maxime-vhw I have done something similar with Export Task already. You need to review the executor: ExportXML.java which you can get it from SSD → /ssd/src/sailpoint/services/standard/task and modify the _basePath by appending the date in the path.

Note: Found a fix?Help the community by marking the comment as solution. Feel free to react(:heart:,:+1:, etc.)with an emoji to show your appreciation or message me directly if your problem requires a deeper dive.

@neel193 I’m looking for a way to do it within the task definition as I don’t want to modify the exportXML.class or template xml file.

Everything should remain original as other people use it aswell and might want a different behaviour.
And if i make it work with the task i can just use it on other customer env.

@maxime-vhw Have you already tried with a rule runner to execute the task where you can pass the basepath with date as an argument?

Note: Found a fix?Help the community by marking the comment as solution. Feel free to react(:heart:,:+1:, etc.)with an emoji to show your appreciation or message me directly if your problem requires a deeper dive.

@neel193
That is almost exactly what I did.
So what I did:

  1. taskdef with inputs I can choose.

    • Parent: rule “Run Rule” that launches my rule.
  2. Rule where I can script whatever I want

    • Set arguments in taskArgumentMap
    • taskManager.runWithResult(exporterTaskDef, taskArgumentMap) to execute the XML Object exporter
    • merge the taskresult with the task which called this rule.