Ems-cmd TaskState:'Failed'

Hi,

We use ems-cmd to trigger flows on EasyMorph server. Since EasyMorph does not send mails on failure of tasks when those are triggerd via ems-cmd, I have made a project to request the status of each task.
That project gave me all failed tasks on every load of our datawarehouse.

Now, I realised that the project doesn’t work any longer. In the project I filtered the output of taskinfo on TaskState:‘Failed’.
When I request the info for a task, the TaskState field seems to be gone from the output ? The documentation on github for ems-cmd does not seem to be up-to-date on that point.

How can we check for task failure using ems-cmd ?

Thanks !
Nikolaas

Hi, @reynsnivea
We had to remove the task state due to multisession support.

But you are still able to analyze failed tasks that were called by ems-cmd.
Just perform a query to EasyMorph journal. If you’re using an embedded journal, query to sqlite database (C:\ProgramData\EasyMorph Server\journal.db)

Filter records by condition

"event_name" = 'computation.finished'
AND "initiator_type" = 'APICall'
AND "initiator_subtype" = 'MorphServerApiClient/next'
AND "result" = 'Failure'
AND "source_type" = 'RegularTask'
AND "source_detail" = your_task_id
AND "space_name" = your_space_name
AND "id" >  your_last_processed_record_id

Field result_detail_xml is an XML representation of task errors.

Thanks. I will have a look at that.