cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enriching Davis Problem data via workflows

r_weber
DynaMight Champion
DynaMight Champion

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
 

Certified Dynatrace Master, Dynatrace Partner - 360Performance.net
4 REPLIES 4

michal_zawislak
Dynatrace Advisor
Dynatrace Advisor

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).

Your AutomationEngine ally!

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

Certified Dynatrace Master, Dynatrace Partner - 360Performance.net

r_weber
DynaMight Champion
DynaMight Champion

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....

Certified Dynatrace Master, Dynatrace Partner - 360Performance.net

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

Your AutomationEngine ally!

Featured Posts