Hi All, We are trying to detect expired tasks by implementing IWorkflowListener. We have same way to detect newly created task, every thing is working fine with create task listener but we are facing environment not available with expired task listener (both listeners are accessing the Ivy environment). We detects newly created task by checking status WorkflowEventKind.EVENT_CREATE_TASK_BY_JOINED_TASKS and expired task is WorkflowEventKind.EVENT_CHANGE_TASK_TIMEOUT_TIMESTAMP. My questions are: What is the different of those states (WorkflowEventKind) when it's fired? Is there any way to access Ivy environment outside request? for example ivy global variable? Thanks, Lam Nguyen asked 22.01.2018 at 05:12 Lam Nguyen |
Hi Lam The availability of Ivy environment variable Inside a workflow listener depends on the thread that drives the notification. The Event CREATE_TASK_BY_JOINED_TASK is normally send by a request thread that just ended a task and therefore a new task is created. The Event CHANGE_TASK_TIMEOUT_TIMESTAMP is normally send by a background job that is expring tasks. In the request thread the environment is available but not in the background job. To access a global variable from a non request thread is complex because you have to setup a correct context first. And there is also no helper API to do that provided by Axon.ivy. Regards Reto Weiss, Axon.ivy Support answered 22.01.2018 at 08:21 Reto Weiss ♦♦ |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 22.01.2018 at 05:12
Seen: 1,353 times
Last updated: 23.01.2018 at 12:05