Posts tagged "Date"

LiveCycle ES2: Search template returns results outside of date filter

Issue

If you are using Search Templates in Workspace ES2 to search for tasks between certain dates for a particular process, you may notice that the results return tasks outside of the specified dates.

This problem occurs when using a localized Workspace and adding the Task Start date in the search template criteria as seen below:

Then you specify a date range when executing the search template in Workspace ES2:

The results returned from the localized Workspace versions are not filtered at all on date, whereas in the English Workspace they are (i.e. it only returns the results between the given dates):

Reason

This is a bug in the localized versions of LiveCycle Workspace ES2 where the results are not filtered by the date criteria specified.

You can check this by using a database logging to track what SQL statements are being sent to the database when the search template is executed.  In the localized Workspace the SQL is as follows:

SELECT  DISTINCT T0.id, T0.status, T0.step_name, T0.route_list, T0.process_name, T0.process_instance_id, T0.action_instance_id, T0.update_time, T0.create_time, T1.id, T1.type, T2.id, T2.status, T2.complete_time, T3.id, T3.workflow_principal_id, T4.id, T4.commonname, T5.id FROM tb_task T0  INNER JOIN tb_assignment T1  ON (T0.current_assignment_id = T1.id) INNER JOIN tb_process_instance T2  ON (T0.process_instance_id = T2.id) INNER JOIN tb_queue T3  ON (T1.queue_id = T3.id) INNER JOIN EDCPRINCIPALENTITY T4  ON (T3.workflow_principal_id = T4.id) INNER JOIN tb_task_acl T5  ON (T0.id = T5.task_id) WHERE (T5.user_id = ‘9B365DDD-C7D4-102C-8DFF-00000A24CEC9′  AND T0.process_name = ‘Task_Forwarding/Task_Forwarding_Test’ )

whereas in the English Workspace the SQL contains the date criteria at the end:

SELECT  DISTINCT T0.id, T0.status, T0.step_name, T0.route_list, T0.process_name, T0.process_instance_id, T0.action_instance_id, T0.update_time, T0.create_time, T1.id, T1.type, T2.id, T2.status, T2.complete_time, T3.id, T3.workflow_principal_id, T4.id, T4.commonname, T5.id FROM tb_task T0  INNER JOIN tb_assignment T1  ON (T0.current_assignment_id = T1.id) INNER JOIN tb_process_instance T2  ON (T0.process_instance_id = T2.id) INNER JOIN tb_queue T3  ON (T1.queue_id = T3.id) INNER JOIN EDCPRINCIPALENTITY T4  ON (T3.workflow_principal_id = T4.id) INNER JOIN tb_task_acl T5  ON (T0.id = T5.task_id) WHERE (T5.user_id = ‘9B365DDD-C7D4-102C-8DFF-00000A24CEC9′  AND T0.process_name = ‘Task_Forwarding/Task_Forwarding_Test’  AND T0.create_time >= ‘2011-08-14 00:00:00′  AND T0.create_time <= ‘2011-08-22 00:00:00′ )

Solution

There is a patch available for Workspace ES2 SP2 (9.0.0.2), so contact enterprise support if you require this patch.  The issue will also be fixed in future versions of Workspace (Es2 SP3, and ADEP).

reference: (182579627/2951216)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 8.5/10 (2 votes cast)

LiveCycle ES: ALC-DSC-119-000: InvalidCoercionException: Cannot coerce object: Apr 07, 2010

Issue

When you use Date objects in a LiveCycle ES 8.2.1 orchestration after migrating from LiveCycle 7, the following exception may occur:

ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: Apr 07, 2010 of type: java.lang.String to type: class java.util.Date
 at com.adobe.idp.dsc.util.CoercionUtil.toDateTime(CoercionUtil.java:532)
 at com.adobe.idp.dsc.util.CoercionUtil.toType(CoercionUtil.java:966)
 at com.adobe.workflow.datatype.CoercionUtil.toType(CoercionUtil.java:168)
 at com.adobe.workflow.dom.VariableAttr.setBoundValue(VariableAttr.java:67)
 at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataValue(PATExecutionContextImpl.java:791)
 at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataWithExpression(PATExecutionContextImpl.java:375)
 at com.adobe.workflow.qpac.set_value.SetValueService.execute(SetValueService.java:72)
 at com.adobe.workflow.engine.PEUtil.executeAction(PEUtil.java:558)

Reason

This exception occurs if you are trying to use the parseDate() or parseDateTime() functions in your XPath expressions. In LiveCycle ES, it’s not necessary to use these functions to convert Strings into Date objects. These functions cannot handle formatted date strings. For more information about the date functions, see the LiveCycle online Help: http://livedocs.adobe.com/livecycle/8.2/wb_help/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Workbench_ES&file=000812.html.

Solution

Use a direct assignment in the XPath expression to convert the String into a Date variable.

reference: (181553843/2610966)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)