//Get list of Work Items executed by Actions
List<PortableWorkDefinition> actionWorkItems = new ArrayList<PortableWorkDefinition>();
for ( ActionCol52 ac : model.getActionCols() ) {
if ( ac instanceof ActionWorkItemCol52 ) {
PortableWorkDefinition pwd = ((ActionWorkItemCol52) ac).getWorkItemDefinition();
actionWorkItems.add( pwd );
}
}
//Populate list of available result parameters
if ( actionWorkItems.size() == 0 ) {
workItemResultParameters.setEnabled( false );
workItemResultParameters.addItem( Constants.INSTANCE.NoWorkItemsAvailable() );
editingCol.setWorkItemName( null );
editingCol.setWorkItemResultParameterName( null );
editingCol.setParameterClassName( null );
} else {
int selectedItemIndex = -1;
String selectedItemKey = editingCol.getWorkItemName() + "." + editingCol.getWorkItemResultParameterName();
workItemResultParameters.setEnabled( true && !isReadOnly );
for ( PortableWorkDefinition pwd : actionWorkItems ) {
for ( PortableParameterDefinition ppd : pwd.getResults() ) {
if ( acceptParameterType( ppd ) ) {
String key = pwd.getName() + "." + ppd.getName();
String parameterDisplayName = pwd.getDisplayName() + "." + ppd.getName();
//Pre-select item if applicable
if ( key.equals( selectedItemKey ) ) {
selectedItemIndex = workItemResultParameters.getItemCount();
}