Is there a way to find a ProcessFlow activity not only by name, but also by type?
Consider for example the common use case where I have a subflow, and Run Subflow activities with the same name:
When I use
getactivity( "ProcessFlow", "Generate items" )
I (may) get the Run Subflow activity instead of the Start activity of the subflow.
Of course I could rename one of them but this may not always be possible or practical, and sometimes this is the most natural name (I could train myself to start all Start activities' names with "Subflow: ", for example, but that's just ugly). Is there a way I can request an activity by type, e.g.
getactivity( "ProcessFlow", "Generate items", "ProcessFlow::Start" )
or at least get a list of all matching activities so I can filter by them, e.g.
var activities = getactivities( "ProcessFlow", "Generate items" ); for( int i = 1; i <= activities.length; i++ ) { if( isclasstype( activities[i], "ProcessFlow::Start" ) ) { // Found the one I need! break; } }
(Technically, I could use forobjecttreeunder here, I guess...)
I even tried
getactivity( "ProcessFlow", "Generate items~2", "ProcessFlow::Start" )
but that didn't work either, and I think that PF activities get moved around the tree as you select or edit them anyway.