6 Replies Latest reply: Dec 5, 2012 6:00 AM by 977819 RSS

    SDDM 3.3.0.734 - transformation scripts - building DFD (external agents)

    977819
      Hello

      I have some troubles in creating external agents or information stores.

      When I've tried to do this script:

      processModel = model.getDesign().getProcessModel();
      dfd = processModel.getDataFlowDesigns().getByName("DFD_x");
      if(dfd == null){
           dfd = processModel.addDataFlowDesign("DFD_x");
           dfd.setVisible(true);
      }
      dfd.setDirty(true);

      prc = dfd.getProcessSet().getByName("proc_1");
      if(prc == null){
           prc = dfd.createProcess();
           prc.setType(1);
           prc.setName("proc_1");
           prc.setDirty(true);
      }

      var ea = dfd.getExternalAgentSet().getByName("ExtAg_A");
      if(ea == null){
           ea = dfd.createExternalAgent();
           ea.setName("ExtAg_A");
           ea.setDirty(true);
      }


      Everything is creating but ExtAg_A is not shown on diagram DFD_x after opening it.
      When I delete from navigation tree object: ExtAg_A and while DFD_x is opened and focused, when i run the script again, the object ExtAg_A is created and draw on the diagram.

      Is there a solution how can I create External Agents without opening DFD diagram?