Complete files and elements, like, for example, requirements, change requests, test cases, ideas, tickets, issues or ideas are versioned in in-STEP BLUE. With just a click, you can easily navigate to the history of an element or a file, compare versions or restore previous versions. How, exactly, do you determine the product history with a web service?
With the in-STEP BLUE web service interface you can request the data in a view and determine the history of a product. To do this, just call up the feature GetViewData of the SystemWebService. This expects both the PID of the project and the PID of a view or as an alternative the entry of a data provider with parameters and filters, if needed. It’s easiest if you fall back on an existing view and just have to give the view. To determine the PID, just follow these steps:
Create a new view of the type ‘views’:
You can also filter these directly according to the desired view. Now open the context menu of the new view with a right click and generate it to XML. Because the results of the view are in accordance with the views of the project, a list of all the displayed projects will come up, including their PIDs. In the XML results there is an additional ProjectPID to be found.
The XML for the web service will be:
<View ProjectPID=”Project_ID= 1415347839” PID=”View_ID= 1694654847“> </View>
The variant with the view PID is enough if you just want the current data from the prefabricated views.
If you want to generate dynamic views, then you also need to know the configuration format of the view and its filters. in-STEP BLUE offers logging for this purpose. Create the character string ViewConfigLogFile in the Windows registration under ”HKEY_CURRENT_USER\Software\microTOOL GmbH\in-Step\2.0”. Enter a file into the save location, for example;
Restart in-STEP BLUE and then open a view that is already configured as desired. In the indicated log file every opened view of the settings is logged. For our use cases with the production history a view of the type “Product history” is defined is necessary and a popular product is configured in it.
Activate the logging and open the view. The exemplary results would be:
<View PID=”View_ID= 1694654847″ ProjectPID=”Project_ID= 1415347839″ DataProvider=”StdReporter.ProductHistory” DataProviderParameter=”<PI_PID>ProductIncrement_ID= 1835828863</PI_PID><PS_PID></PS_PID><PI_NAME>Anforderungsdokument.doc</PI_NAME><COLS>1;2;3;4;5;6;7;8;9</COLS><COLCAPTIONS></COLCAPTIONS>”/>
After it’s converted for the web service, the XML structure would look like this:
<View ProjectPID=”Project_ID= 1415347839” DataProvider=”StdReporter.ProductHistory” DataProviderParameter=”<PI_PID>ProductIncrement_ID= 1835828863</PI_PID><PS_PID></PS_PID><PI_NAME>Anforderungsdokument.doc</PI_NAME><COLS>1;2;3;4;5;6;7;8;9</COLS><COLCAPTIONS></COLCAPTIONS>“> </View>
The green parts correspond to the result of “ViewConfig”. The blue one is the PID of the configured product. If you enter the PIN of each product that you want the history of, you will get the history of the product in XML structure as the result.
And you’re already done! With a bit of background knowledge, it’s pretty easy, isn’t it? Try it out yourself and if you still have any questions, get in touch with our support team: www.microTOOL.de/support/