首页 > 解决方案 > 我们如何在 Sailpoint IIQ 中设置日期范围

问题描述

我正在尝试动态设置报告的日期范围。但似乎我正在使用的包没有像它应该的那样实现接口 Serializable 。您知道我如何使用 Sailpoint 处理日期范围吗?有我的包裹: org.jfree.data.time.DateRange

当我设置一个字符串对象时,我没有收到任何错误,而我正在使用 dateRange:

java.lang.Exception: sailpoint.tools.GeneralException:
  The application script threw an exception:
    sailpoint.tools.xml.ConfigurationException:
      No serializer registered for class class org.jfree.data.time.DateRange

它发生在我保存对象后执行 context.commitTransaction() 时。

谢谢

标签: javadate-rangesailpoint

解决方案


我找到了解决方案。Daterange 不是对象的类型,它只是接口上的精度。如果您要设置日期范围,请执行以下操作:

 TaskDefinition task = context.getObjectByName(TaskDefinition.class, "The name of the report");
  Map map = new HashMap();
  map.put("end",end_date_convert_in_long); 
  map.put("start",start_date_convert_in_long); 
  task.setArgument("the name of the variable", map); 
  context.saveObject(task);
  context.commitTransaction();

推荐阅读