Xflow - The tickets could not be retrieved.

Document ID : KB000072543
Last Modified Date : 05/03/2018
Show Technical Document Details
Issue:
When users login to xFlow, they are getting the following error as a popup that disappears: "The tickets could not be retrieved . Contact the system administrator if the problem persists." However, there are no issues in retrieving tickets and once the popup disappears, we do not see the popup display again.

incidentMS.log logging will show:
INFO - 2018-02-27 14:51:36 [c.ca.casm.authorization.Authorizer] - Functional group not found for resource:list_card_config_attr 
ERROR - 2018-02-27 14:51:36 [c.ca.casm.framework.util.CasmFuture] - Exception occurred, see call stack for more details: userid (jdoe) 
java.util.concurrent.CompletionException: java.lang.NullPointerException 
at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) 
at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) 
at java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source) 
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source) 
at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) 
Caused by: java.lang.NullPointerException: null 
at com.ca.casm.sdm.SdmProducerUtil.getFieldValueForMajicAttribute(SdmProducerUtil.java:1903) 
at controllers.helper.tickets.StreamsTicketHelper.getWhereClause(StreamsTicketHelper.java:128) 
at controllers.helper.tickets.StreamsTicketHelper.lambda$getTickets$120(StreamsTicketHelper.java:91) 
at java.util.function.BiConsumer.lambda$andThen$0(Unknown Source) 
at java.util.function.BiConsumer.lambda$andThen$0(Unknown Source) 
INFO - 2018-02-27 14:51:36 [c.ca.casm.authorization.Authorizer] - Functional group not found for resource:cnt_wx 
ERROR - 2018-02-27 14:51:36 [c.ca.casm.framework.util.CasmFuture] - Exception occurred, see call stack for more details: userid (jdoe) 
java.util.concurrent.CompletionException: java.lang.NullPointerException 
at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) 
at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) 
at java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source) 
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source) 
at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) 
Caused by: java.lang.NullPointerException: null 
at com.ca.casm.sdm.SdmProducerUtil.getFieldValueForMajicAttribute(SdmProducerUtil.java:1903) 
at controllers.helper.tickets.StreamsTicketHelper.getWhereClause(StreamsTicketHelper.java:128) 
at controllers.helper.tickets.StreamsTicketHelper.lambda$getTickets$120(StreamsTicketHelper.java:91) 
at java.util.function.BiConsumer.lambda$andThen$0(Unknown Source) 
at java.util.function.BiConsumer.lambda$andThen$0(Unknown Source) 
ERROR - 2018-02-27 14:51:37 [c.ca.casm.framework.util.CasmFuture] - Exception occurred, see call stack for more details: userid (jdoe) 
java.util.concurrent.CompletionException: java.lang.NullPointerException 
at java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) 
at java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) 
at java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source) 
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source) 
at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) 
Caused by: java.lang.NullPointerException: null 
at com.ca.casm.sdm.SdmProducerUtil.getFieldValueForMajicAttribute(SdmProducerUtil.java:1903) 
at controllers.StreamsController.fetchTicketsCountFuture(StreamsController.java:175) 
at controllers.StreamsController.lambda$null$40(StreamsController.java:107) 
at java.util.function.BiConsumer.lambda$andThen$0(Unknown Source) 
at java.util.function.BiConsumer.lambda$andThen$0(Unknown Source)


Additional logging may also reference:
ERROR - 2018-02-15 10:31:20 [c.ca.casm.actor.SdmGetObjectsActor] - Error doing select_count: Error : AHD03053:Bad where clause: Parse error at : "type = 2307 AND delete_flag = 0" (Bad where clause) 
Cause:
The above suggests that there is an issue in the Streams definitions in place on the given installation.
Resolution:
The streams in xFlow all point to Stored Queries.  But it is important to note:

- Disabling the corresponding Stored Query does not necessarily negate the workstream that is referencing the query.
- Workstreams are meant to access specific stored query objects.  In the above example, the message in the logs denoting a "Parse error at : "type = 2307 AND delete_flag = 0"" suggests a stored query for contacts was used, which not all xFlow implementations would support (in r14 releases, only Request stored queries should be referenced in each stream)

The solution is to "clean up" the Workstreams.  These can be accessed by going into the Service Desk Admin tab, under xFlow Analyst Interface, access "Work Streams".  The idea is to remove any extraneous and unnecessary workstreams that reference invalid stored queries.