# Enriching Davis Problem data via workflows

**URL:** <https://community.dynatrace.com/t/enriching-davis-problem-data-via-workflows/43580>\
**Category:** Developer Q&A Forum\
**Tags:** workflows\
**Created:** [January 11, 2024, 9:01pm UTC](https://community.dynatrace.com/t/enriching-davis-problem-data-via-workflows/43580 "2024-01-11T21:01:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![r\_weber](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/r_weber/32/24884_2.png) [@r\_weber](https://community.dynatrace.com/u/r_weber)\
**Post date:** [January 11, 2024, 9:01pm UTC](https://community.dynatrace.com/t/enriching-davis-problem-data-via-workflows/43580/1 "2024-01-11T21:01:10Z")

</div>

I’d like to “enhance” the Davis Problems that are sent via MS Teams integration with additional information.  
Currently you can access the davis event data in the adaptive card template and for example get the affected entity IDs, like so:

```markup
{{ event()['affected_entity_ids'] }}

```

However I created a custom javascript that takes the Davis event and fetches the entity names for these IDs. Now I want to use the entity names on the card template so that the generated notifications in teams make more sense to humans.

Is this possible? Can I modify/update the executionContext eventdata?

```markup
const exe = await execution("9906b170-3aac-4059-8ffe-0988f4a27400");
const eventContext = exe.event();

```

Thanks

---

<div class="post-metadata">

**Author:** ![michal\_zawislak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michal_zawislak/32/13613_2.png) [@michal\_zawislak](https://community.dynatrace.com/u/michal_zawislak)\
**Post date:** [January 12, 2024, 8:21am UTC](https://community.dynatrace.com/t/enriching-davis-problem-data-via-workflows/43580/2 "2024-01-12T08:21:25Z")

</div>

Hi&nbsp;[@r\_weber](https://community.dynatrace.com/user/35901),

Unfortunately, you can’t modify the event context provided with the execution (exe.event()). It’s a read-only field.

However, if I understand your scenario correctly, you can reference the javascript tasks’ results (affected entity names) where you enhanced the event context&nbsp;in the MS Team action.

Please let me know if I can help you further (and if I got your inquiry right).

---

<div class="post-metadata">

**Author:** ![r\_weber](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/r_weber/32/24884_2.png) [@r\_weber](https://community.dynatrace.com/u/r_weber)\
**Post date:** [January 12, 2024, 10:04am UTC](https://community.dynatrace.com/t/enriching-davis-problem-data-via-workflows/43580/3 "2024-01-12T10:04:59Z")

</div>

Hi&nbsp;[@michal\_zawislak](https://community.dynatrace.com/user/57046)&nbsp;,

how would I propagate the tasks result and then access it in the MS Teams action? A pointer to documentation/examples would be great!

I tried with:

```markup
{{ result('get_entity_names') }}

```

But that gives an error on the send\_message task: “Error evaluating input - ‘message’: Attempting to use result of unfinished task. Please make get\_entity\_names a predecessor of send\_message\_1.”

Reinhard

---

<div class="post-metadata">

**Author:** ![r\_weber](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/r_weber/32/24884_2.png) [@r\_weber](https://community.dynatrace.com/u/r_weber)\
**Post date:** [January 12, 2024, 10:56am UTC](https://community.dynatrace.com/t/enriching-davis-problem-data-via-workflows/43580/4 "2024-01-12T10:56:18Z")

</div>

Never mind I figured it out. Turns out the workflow display didn’t show properly that the two tasks werent connected. A UI glitch left the impression they are…

---

<div class="post-metadata">

**Author:** ![michal\_zawislak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michal_zawislak/32/13613_2.png) [@michal\_zawislak](https://community.dynatrace.com/u/michal_zawislak)\
**Post date:** [January 12, 2024, 11:05am UTC](https://community.dynatrace.com/t/enriching-davis-problem-data-via-workflows/43580/5 "2024-01-12T11:05:55Z")

</div>

Glad you made it work! We’re aware of the Workflow editor graph flaws, and we’ll work on them in the near future.
