# Rule/script in Taskdefinition attributes entry

**URL:** <https://developer.sailpoint.com/discuss/t/rule-script-in-taskdefinition-attributes-entry/196467>\
**Category:** IIQ Discussion and Questions\
**Tags:** tasks, identityiq\
**Created:** [February 18, 2026, 5:28pm UTC](https://developer.sailpoint.com/discuss/t/rule-script-in-taskdefinition-attributes-entry/196467 "2026-02-18T17:28:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxime-vhw](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@maxime-vhw](https://developer.sailpoint.com/discuss/u/maxime-vhw)\
**Post date:** [February 18, 2026, 5:28pm UTC](https://developer.sailpoint.com/discuss/t/rule-script-in-taskdefinition-attributes-entry/196467/1 "2026-02-18T17:28:02Z")

</div>

## 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
<?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
<?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.

---

<div class="post-metadata">

**Author:** ![neel193](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/neel193/32/34038_2.png) [@neel193](https://developer.sailpoint.com/discuss/u/neel193)\
**Post date:** [February 18, 2026, 6:12pm UTC](https://developer.sailpoint.com/discuss/t/rule-script-in-taskdefinition-attributes-entry/196467/2 "2026-02-18T18:12:31Z")

</div>

@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](https://community.sailpoint.com/t5/Professional-Services/Services-Standard-Deployment-SSD-v7-0-2/ta-p/190497?search-action-id=94277223364&search-result-uid=190497) → /ssd/src/sailpoint/services/standard/task and modify the \_basePath by appending the date in the path.

---

<div class="post-metadata">

**Author:** ![maxime-vhw](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@maxime-vhw](https://developer.sailpoint.com/discuss/u/maxime-vhw)\
**Post date:** [February 18, 2026, 8:14pm UTC](https://developer.sailpoint.com/discuss/t/rule-script-in-taskdefinition-attributes-entry/196467/4 "2026-02-18T20:14:42Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![neel193](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/neel193/32/34038_2.png) [@neel193](https://developer.sailpoint.com/discuss/u/neel193)\
**Post date:** [February 19, 2026, 4:59am UTC](https://developer.sailpoint.com/discuss/t/rule-script-in-taskdefinition-attributes-entry/196467/5 "2026-02-19T04:59:24Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![maxime-vhw](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@maxime-vhw](https://developer.sailpoint.com/discuss/u/maxime-vhw)\
**Post date:** [February 23, 2026, 3:49pm UTC](https://developer.sailpoint.com/discuss/t/rule-script-in-taskdefinition-attributes-entry/196467/6 "2026-02-23T15:49:10Z")

</div>

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

1. taskdef with inputs I can choose.

2. Rule where I can script whatever I want

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [April 24, 2026, 3:49pm UTC](https://developer.sailpoint.com/discuss/t/rule-script-in-taskdefinition-attributes-entry/196467/7 "2026-04-24T15:49:49Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
