for(int i = 0; i < actions.size(); i++) { if(actions.get(i) instanceof DescriptorAware) { ((DescriptorAware)actions.get(i)).setDescriptor(descriptor); } }
  public void setDescriptor(WorkflowDescriptor descriptor)  {    if(descriptor != null)    {      this.descriptor = descriptor;      List initialActionList = descriptor.getInitialActions();      addInitialActions(initialActionList);      List stepsList = descriptor.getSteps();      for(int i = 0; i < stepsList.size(); i++)      {        StepDescriptor step = (StepDescriptor)stepsList.get(i);        addStepDescriptor(step);      }      List splitsList = descriptor.getSplits();      for(int i = 0; i < splitsList.size(); i++)      {        SplitDescriptor split = (SplitDescriptor)splitsList.get(i);        addSplitDescriptor(split);      }      List joinsList = descriptor.getJoins();      for(int i = 0; i < joinsList.size(); i++)      {        JoinDescriptor join = (JoinDescriptor)joinsList.get(i);        addJoinDescriptor(join);      }      getWorkflowGraphModel().insertResultConnections();    }  }