<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Filtering task based on the properties using REST API in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/filtering-task-based-on-the-properties-using-rest-api/m-p/26168#M11319</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;I am trying to filter the tasks based on the property filtration using the below code taken from TaskInstancesGet class. I was able to fetch all the properties whose values are Strings but couldn't fetch the values which are numbers or dates.&lt;/P&gt;&lt;P&gt;if (list_1 != null)&lt;BR /&gt;{&lt;BR /&gt;for (Object list_2 : list_1)&lt;BR /&gt;{&lt;BR /&gt;int propQNameEnd = list_2.toString().indexOf('/');&lt;BR /&gt;if (propQNameEnd &amp;lt; 1)&lt;BR /&gt;{&lt;BR /&gt;if (LOGGER.isDebugEnabled())&lt;BR /&gt;{&lt;BR /&gt;LOGGER.debug("Ignoring invalid property filter:" + list_2.toString());&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;String propValue = list_2.toString().substring(propQNameEnd + 1);&lt;BR /&gt;if (propValue.isEmpty())&lt;BR /&gt;{&lt;BR /&gt;if (LOGGER.isDebugEnabled())&lt;BR /&gt;{&lt;BR /&gt;LOGGER.debug("Ignoring empty property value filter [" + propValue + "]");&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;String propQNameStr = list_2.toString().substring(0, propQNameEnd);&lt;BR /&gt;QName propertyQName;&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;propertyQName = QName.createQName(propQNameStr, namespaceService);&lt;BR /&gt;}&lt;BR /&gt;catch (Exception ex)&lt;BR /&gt;{&lt;BR /&gt;if (LOGGER.isDebugEnabled())&lt;BR /&gt;{&lt;BR /&gt;LOGGER.debug("Ignoring invalid QName property filter [" + propQNameStr + "]");&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;if (LOGGER.isDebugEnabled())&lt;BR /&gt;{&lt;BR /&gt;LOGGER.debug("Filtering with property [" + propertyQName.toPrefixString(namespaceService) + "=" + propValue + "]");&lt;BR /&gt;}&lt;BR /&gt;propertyFilter.put(propertyQName, propValue);&lt;BR /&gt;taskQuery.setProcessCustomProps(propertyFilter);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Please do check the code and let me know if there are any changes in the above so that i can filter the properties whose values are numbers or dates.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be appreciated..&lt;/SPAN&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jul 2021 09:26:23 GMT</pubDate>
    <dc:creator>Tabu</dc:creator>
    <dc:date>2021-07-23T09:26:23Z</dc:date>
    <item>
      <title>Filtering task based on the properties using REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/filtering-task-based-on-the-properties-using-rest-api/m-p/26168#M11319</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am trying to filter the tasks based on the property filtration using the below code taken from TaskInstancesGet class. I was able to fetch all the properties whose values are Strings but couldn't fetch the values which are numbers or dates.&lt;/P&gt;&lt;P&gt;if (list_1 != null)&lt;BR /&gt;{&lt;BR /&gt;for (Object list_2 : list_1)&lt;BR /&gt;{&lt;BR /&gt;int propQNameEnd = list_2.toString().indexOf('/');&lt;BR /&gt;if (propQNameEnd &amp;lt; 1)&lt;BR /&gt;{&lt;BR /&gt;if (LOGGER.isDebugEnabled())&lt;BR /&gt;{&lt;BR /&gt;LOGGER.debug("Ignoring invalid property filter:" + list_2.toString());&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;String propValue = list_2.toString().substring(propQNameEnd + 1);&lt;BR /&gt;if (propValue.isEmpty())&lt;BR /&gt;{&lt;BR /&gt;if (LOGGER.isDebugEnabled())&lt;BR /&gt;{&lt;BR /&gt;LOGGER.debug("Ignoring empty property value filter [" + propValue + "]");&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;String propQNameStr = list_2.toString().substring(0, propQNameEnd);&lt;BR /&gt;QName propertyQName;&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;propertyQName = QName.createQName(propQNameStr, namespaceService);&lt;BR /&gt;}&lt;BR /&gt;catch (Exception ex)&lt;BR /&gt;{&lt;BR /&gt;if (LOGGER.isDebugEnabled())&lt;BR /&gt;{&lt;BR /&gt;LOGGER.debug("Ignoring invalid QName property filter [" + propQNameStr + "]");&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;if (LOGGER.isDebugEnabled())&lt;BR /&gt;{&lt;BR /&gt;LOGGER.debug("Filtering with property [" + propertyQName.toPrefixString(namespaceService) + "=" + propValue + "]");&lt;BR /&gt;}&lt;BR /&gt;propertyFilter.put(propertyQName, propValue);&lt;BR /&gt;taskQuery.setProcessCustomProps(propertyFilter);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Please do check the code and let me know if there are any changes in the above so that i can filter the properties whose values are numbers or dates.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be appreciated..&lt;/SPAN&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 09:26:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/filtering-task-based-on-the-properties-using-rest-api/m-p/26168#M11319</guid>
      <dc:creator>Tabu</dc:creator>
      <dc:date>2021-07-23T09:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering task based on the properties using REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/filtering-task-based-on-the-properties-using-rest-api/m-p/26169#M11320</link>
      <description>&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/86856"&gt;@Wilbert1542&lt;/A&gt;&amp;nbsp;Posting spam is not allowed in the forum&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 14:00:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/filtering-task-based-on-the-properties-using-rest-api/m-p/26169#M11320</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-08-05T14:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering task based on the properties using REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/filtering-task-based-on-the-properties-using-rest-api/m-p/26170#M11321</link>
      <description>&lt;P&gt;You can add like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;propertyFilter.put(WorkflowModel.PROP_START_DATE, "dateValue");&lt;BR /&gt;propertyFilter.put(WorkflowModel.PROP_PRIORITY, "1");&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 04:07:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/filtering-task-based-on-the-properties-using-rest-api/m-p/26170#M11321</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2021-08-06T04:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering task based on the properties using REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/filtering-task-based-on-the-properties-using-rest-api/m-p/26171#M11322</link>
      <description>&lt;P&gt;Glad you like it. We have been using this for several weeks now and it seems to be going nicely.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 06:38:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/filtering-task-based-on-the-properties-using-rest-api/m-p/26171#M11322</guid>
      <dc:creator>Hayes84</dc:creator>
      <dc:date>2021-08-13T06:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering task based on the properties using REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/filtering-task-based-on-the-properties-using-rest-api/m-p/26172#M11323</link>
      <description>&lt;P&gt;Thanks for your reply!&lt;BR /&gt;But this can be used to filter out the date of a Workflow&lt;BR /&gt;I want to filter the tasks by their start date (Task Start Date)&lt;BR /&gt;So, if there's any solution please do provide it.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 05:25:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/filtering-task-based-on-the-properties-using-rest-api/m-p/26172#M11323</guid>
      <dc:creator>Tabu</dc:creator>
      <dc:date>2021-08-31T05:25:37Z</dc:date>
    </item>
  </channel>
</rss>

