-1

I want update field "Results" (UI) for the one of scenario steps defined to element, but its not working. Method "Update()" (API) updated filed "results" instead "result". Only the value from "result" (database, t_objectscenarios.XMLContent=>result) is shown in UI. It is true? It is another way to updated field "Results" (UI) using API?

                        foreach (EA.IDualScenario es in element.Scenarios)
                        {
                            foreach (EA.IDualScenarioStep ess in es.Steps)
                            {
                                if (ess.Name.Trim().Length == 0 &&
                                    ess.Uses.Trim().Length == 0 &&
                                    ess.Results.Trim().Length == 0
                                    )
                                {
                                    ess.Name = "TEST_Name";
                                    ess.Uses = "TEST_Uses";
                                    ess.Results = "TEST_Results";

                                    ess.Update();
                                }
                            }
                            es.Update();
                        }
                        element.Update();
Vertexwahn
  • 7,709
  • 6
  • 64
  • 90
  • It looks like you're updating both the step and the scenario, which is what you need to do (updating the element is not necessary). However, I don't know of any way (in the GUI at least) to create a step with an empty name, which is what you're searching for. Are you absolutely sure the 'if' expression ever evaluates to true? – Uffe Jun 03 '14 at 08:09
  • Yes, I'm absolutely sure, the 'if' expression sometimes evaluates to true. Maybe these step with "empty" fields was created by using API, not GUI, I dont know. It isn't my EAP. – user3274759 Jun 03 '14 at 11:33
  • Finding, methods Update() and Refresh() are working but... Method Update() (API) updated filed "results" instead "result". Only the value from "result" (database, t_objectscenarios.XMLContent=>result) is shown in GUI. – user3274759 Jun 03 '14 at 11:34
  • When I updated step, field "Results" (using API) in database was added a new field t_objectscenarios.XMLContent=>results with new value, but filed t_objectscenarios.XMLContent=>result is still now and had a old value, and in the end, in GUI nothing changed in column "Results". I think it is not correct, and it is true problem. – user3274759 Jun 03 '14 at 11:34
  • What version and edition are you using? I do not get that behavior with a VBScript in EA 10 or 11, I get the correct behavior ("result" tag in the XML is updated, "Results" column in the GUI is updated). – Uffe Jun 03 '14 at 11:48
  • EA Edition: Corporate Build: 9.2.921 – user3274759 Jun 03 '14 at 12:15

1 Answers1

0

You're using an EA version that's more than two years (and two major versions) out of date. The behavior in question is a confirmed bug, which was fixed in version 10.0.1005.

Sparx Systems don't release bug fixes to old versions (unless you're on some sort of special support plan I'm unaware of) so you'll need to upgrade. The good news is that EA is eminently backwards-compatible, so you shouldn't have any problems.

Uffe
  • 10,396
  • 1
  • 33
  • 40