Create the RulesOfProgess service - Intergraph Smart Construction - 2019 (7.0) - Configuration - Hexagon PPM

Intergraph Smart Construction API and Programming Reference (2019)

PPMProduct
Intergraph Smart Construction
PPMCategory_custom
Administration & Configuration
SPCVersion_custom
2019(7.0)

Complete the following steps to implement the IRulesOfProgress service contract.

  1. Open Microsoft Visual Studio.

  2. Click File > New > Project to open the New Project dialog box.

  3. In the Templates pane of the New Project dialog box, select Class Library.

  4. Type a name in the Name box and a location in the Location box on the New Project dialog box. Click OK to open your project.

  5. Right-click the References node in your Solution Explorer and select Add Reference.

  6. On the Add Reference dialog box, click the Browse tab and navigate to your SmartPlant Foundation bin directory.

  7. Select SPC.External.Services.dll and SPF.ServerModuleCore.dll. Click OK.

  8. Verify that the selected files were added to the References node in the Solution Explorer.

  9. Select SPC.External.Services. In the Properties window, select False for the Copy Local setting. Select False for the Specific Version setting.

  10. Select SPFServerModuleCore. In the Properties window, select False for the Copy Local setting. Select False for the Specific Version setting.

  11. In the Solution Explorer, right-click the Project node and select Add > New Item.

  12. In the Templates pane of the Add New Item dialog box, select Class. Type a name in the Name box. Click OK to open the new class.

  13. Add the line implements SPC.External.Services.Contracts.IRulesOfProgressService below the class declaration line. Press Enter.

  14. Add your logic to the IsAvailable method to inform callers about the availability of your Rules of Progress service.

  15. Add your logic to the SetWorkStepsForPackagedItems method like the following.

  16. Once you have completed your implementation, click Build > Rebuild Solution to build your custom implementation of the Rules of Progress Service. Copy it into the build path specified in your project settings inside of Visual Studio. The default location is the bin\debug directory located under your project.

  17. Copy the RulesOfProgressApiSample.dll (or your specific name) from the directory and paste the file into SmartPlant Foundation Server bin directory.

  18. Open the SmartPlant Foundation Server directory.

  19. Open the web.config file and locate the XML node Unity.

  20. Comment out the Rules of Progress Service type node.

  21. Replace the Rules of Progress Service type node with your implementation of the Rules of Progress service like the following.

  22. Recycle the Internet Information Services (IIS) application pools for the site of your project. For more information on resetting IIS application pools, see IIS documentation.

    Smart Construction now uses your implementation of the Rules of Progress Service rather than the default implementation.