Getting Sub Actions of Top Level BES Action?

(imported topic written by MP6591)

Hi, Does anyone if there’s a way to get the names/id’s of the sub-actions of a top level bes action given the top level action’s id?

for example… something along the lines of:

names of bes actions of top level bes actions whose (id of it = 1234)

Any help would be appreciated!

P.S. I should probably clarify the use-case to make things easier. We have a baseline with a number of fixlets in it. If we take an action on a baseline, it generates an action per fixlet. I would like to know the status of all sub-actions for a given computer in one baseline.

(imported comment written by jessewk)

MP,

There is not currently a good inspector to get at the member actions of a multiple action group, but we can fake it pretty well. The key is that there are 2 hidden start/end actions associated with each multiple action group. If you can identify the start or end action you can get a list of the member actions.

The start action id will be just after the action id shown in the console for the top level action. So if you look for the ‘next closest’ action id that is a hidden start action and is greater than the id of the top-level action, it should be the one you’re looking for. The caveat is that if the action id you provide is not a multiple action group, you will get the member actions of the first multiple action group taken after the action id you provided.

Here’s some code you can paste into a custom web report or the presentation debugger. It assumes you’re looking for the members of an action with id = 5034. Just for fun I’ve included an example of how to style the results with css.

.myTable, .myTable tr, .myTable td { border: 1px solid blue; } <?relevance table "class=myTable" of tbody of concatenation of trs of (td of name of action of it & td of name of computer of it & td of (status of it as string)) of results of middle actions of hidden bes actions whose ((start flag of it) AND (id of it = minimum of (ids whose (it > 5034) of hidden bes actions whose (start flag of it)))) ?>

(imported comment written by MP6591)

This is excellent! Thanks so much. Now to wrap it in some pretty javascript and I’m all set :slight_smile: