11 Jan 2024 09:01 PM
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:
{{ 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?
const exe = await execution("9906b170-3aac-4059-8ffe-0988f4a27400");
const eventContext = exe.event();
Thanks
Solved! Go to Solution.
12 Jan 2024 08:21 AM
Hi @r_weber,
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 in the MS Team action.
Please let me know if I can help you further (and if I got your inquiry right).
12 Jan 2024 10:04 AM - edited 12 Jan 2024 10:40 AM
Hi @michal_zawislak ,
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:
{{ 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
12 Jan 2024 10:56 AM
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....
12 Jan 2024 11:05 AM
Glad you made it work! We're aware of the Workflow editor graph flaws, and we'll work on them in the near future.