Add columns in java datasource type custom report

We are trying to add a new column in our custom report which uses a OOTB java data source “ProvisioningTransactionObjectDataSource”. Could you please let us know on how to add columns for java data source report

@sayandeep_zurich Mostly it depend on your requirement but if you just want to add new column then u can add with one more entry in ReportColumnConfig.
and you can calculate the value as per property for example u already have one property with identityname then pass it in property for this filed and write source code where you can calculate and return department name from identity.

@mkumariaas We have tried that using renderscript but it didnot work

@sayandeep_zurich send report debug once let me check what u r trying to achieve so i can validate.

Hi @sayandeep_zurich ,

RenderScript will not function with the “ProvisioningTransactionObjectDataSource” datasource. You can only retrieve predefined columns from this source.

@Arun-Kumar so no way to add new columns

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<TaskDefinition created="1735588598522" executor="sailpoint.reporting.LiveReportExecutor" id="644151b194071ca58194192452f909d1" modified="1735821619862" name="Provisioning Transaction Failure Report" progressMode="Percentage" resultAction="Rename" significantModified="1735821619862" subType="Administration Reports" template="true" type="LiveReport">
  <Attributes>
    <Map>
      <entry key="report">
        <value>
          <LiveReport disablePreview="true" title="Provisioning Transaction Failure Report">
            <DataSource dataSourceClass="sailpoint.reporting.datasource.ProvisioningTransactionObjectDataSource" type="Java">
              <QueryParameters>
                <Parameter argument="applications" property="applicationName"/>
                <Parameter argument="integration" property="integration">
                  <QueryScript>
                    <Source>

                      import sailpoint.object.*;
                      import java.util.*;

                      if (value != null &amp;&amp; !value.isEmpty()){
                      queryOptions.addFilter(Filter.ignoreCase(Filter.like("integration", value, Filter.MatchMode.START)));
                      }

                      return queryOptions;

                    </Source>
                  </QueryScript>
                </Parameter>
                <Parameter argument="accountDisplayName" property="accountDisplayName">
                  <QueryScript>
                    <Source>

                      import sailpoint.object.*;
                      import java.util.*;

                      if (value != null &amp;&amp; !value.isEmpty()){
                      queryOptions.addFilter(Filter.ignoreCase(Filter.like("accountDisplayName", value, Filter.MatchMode.START)));
                      }

                      return queryOptions;

                    </Source>
                  </QueryScript>
                </Parameter>
                <Parameter argument="status" property="status"/>
                <Parameter argument="type" property="type"/>
                <Parameter argument="operation" property="operation"/>
                <Parameter argument="source" property="source"/>
                <Parameter argument="creationDateStart">
                  <QueryScript>
                    <Source>
                      import java.util.Calendar;
                      import sailpoint.object.*;

                      Calendar cal = Calendar.getInstance();
                      cal.add(Calendar.DATE, -3);

                      queryOptions.addFilter(Filter.gt("created", cal.getTime()));
                      return queryOptions;
                    </Source>
                  </QueryScript>
                </Parameter>
                <Parameter argument="forced" property="forced">
                  <QueryScript>
                    <Source>

                      import sailpoint.object.*;
                      import java.util.*;

                      if (value == true){
                      queryOptions.addFilter(Filter.eq("forced", true));
                      }

                      return queryOptions;

                    </Source>
                  </QueryScript>
                </Parameter>                
              </QueryParameters>
            </DataSource>
            <ReportForm>
              <Reference class="sailpoint.object.Form" id="644151b194071ca581941955767b0caf" name="AccessCentral-Provisioning Transaction Report Form"/>
            </ReportForm>
            <Columns>
              <ReportColumnConfig field="name" header="report_provisioning_id" property="name" sortable="true" width="110"/>
              <ReportColumnConfig field="applicationName" header="report_provisioning_application" property="applicationName" sortable="true" width="110"/>
              <ReportColumnConfig field="identityName" header="report_provisioning_identity" property="identityName" sortable="true" width="110"/>
              <ReportColumnConfig field="identityDisplayName" header="report_provisioning_identity_display" property="identityDisplayName" sortable="true" width="110"/>
              #Need to populate the email field
              <ReportColumnConfig field="email" header="Email" property="identities.email" sortable="true" width="110"/>              
              
              <ReportColumnConfig field="accountDisplayName" header="report_provisioning_account_display" property="accountDisplayName" sortable="true" width="110"/>
              <ReportColumnConfig field="status" header="report_provisioning_status" property="status" sortable="true" width="110"/>
              <ReportColumnConfig field="operation" header="report_provisioning_operation" property="operation" sortable="true" width="110"/>
              <ReportColumnConfig field="source" header="report_provisioning_source" property="source" sortable="true" width="110"/>
              <ReportColumnConfig field="created" header="report_provisioning_date" property="created" sortable="true" width="110"/>
              <ReportColumnConfig field="errorMessages" header="report_provisioning_errors" width="110"/>
              <ReportColumnConfig field="requestName" header="report_provisioning_request_name" width="110"/>
              <ReportColumnConfig field="requestValue" header="report_provisioning_request_value" width="110"/>
              <ReportColumnConfig field="requestOperation" header="report_provisioning_request_operation" width="110"/>
            </Columns>
          </LiveReport>
        </value>
      </entry>
    </Map>
  </Attributes>
  <Description>Displays all information from provisioning transactions.</Description>
  <RequiredRights>
    <Reference class="sailpoint.object.SPRight" id="644105c490911a2d819091da61ea005d" name="FullAccessProvisioningTransactionDetailedReport"/>
  </RequiredRights>
  <Signature>
    <Inputs>
      <Argument multi="true" name="applications" type="Application">
        <Description>help_report_provisioning_application</Description>
      </Argument>
      <Argument multi="true" name="identities" type="Identity">
        <Description>help_report_provisioning_identity</Description>
      </Argument>
      <Argument name="integration" type="string">
        <Description>help_report_provisioning_integration</Description>
      </Argument>
      <Argument name="accountDisplayName" type="string">
        <Description>help_report_provisioning_account_display_name</Description>
      </Argument>
      <Argument name="operation" type="string">
        <Description>help_report_provisioning_operation</Description>
      </Argument>
      <Argument name="source" type="string">
        <Description>help_report_provisioning_source</Description>
      </Argument>
      <Argument name="status" type="string">
        <Description>help_report_provisioning_status</Description>
      </Argument>
      <Argument name="type" type="string">
        <Description>help_report_provisioning_type</Description>
      </Argument>
      <Argument name="creationDate" type="date">
        <Description>help_report_provisioning_date</Description>
      </Argument>
      <Argument name="forced" type="boolean">
        <Description>help_report_provisioning_forced</Description>
      </Argument>
      <Argument name="email" type="string">
        <Description>help_report_provisioning_forced</Description>
      </Argument>
    </Inputs>
  </Signature>
</TaskDefinition>

Trying to achieve the email field

Hi @sayandeep_zurich ,

You can create a new report using the Filter DataSource to retrieve the required fields.

<DataSource objectType="ProvisioningTransaction" type="Filter">

@Arun-Kumar how to achieve the other columns that is present in detailed provisioning transaction report. I need the error messages, attributes, etc

Hi @sayandeep_zurich ,

You can get all the required details from Filer DataSource. Please refer the column for errorMessages below.


 <ReportColumnConfig field="errorMessages" header="provisioning_errors" property="name" scriptArguments="attributes" width="110">
                <RenderScript>
                  <Source>               
                        import sailpoint.object.Attributes;
						import sailpoint.object.ProvisioningResult;
						
						Attributes attributes = scriptArgs.get("attributes");
						Map attributemap = attributes.getMap();
						if(attributemap.get("planResult") != null){
							ProvisioningResult result=attributemap.get("planResult");
							return result.getErrors();
						}
                    </Source>
                </RenderScript>
              </ReportColumnConfig>
1 Like

@Arun-Kumar this attributemap.get(“planResult”) is not working

Hi @sayandeep_zurich ,

Go to the “Debug” page and select the “Provisioning Transaction” object. Then, choose any one of the available Provisioning Transactions. This will provide you with a better understanding of the data. Keep in mind that not all records will have the “planResult” and “errors” fields.

1 Like