Showing results for 
Search instead for 
Did you mean: 

Example Rules Services Code

Community Manager Community Manager
Community Manager

Assumes that rule services are running on <RuleServicesAppServer>.

The Javadoc API documentation is located on the rules services server at:


You’ll want to look at the ModelServices class for the API methods that are available.



Assumes your model services are exposed on <webserver>

Using the supported proxy, a simple Rule Services application looks like this (code-wise, assuming the correct configuration in the app.config file as well):


using System;

using Rulestream.RuleServicesWS.RuleServices;

namespace RuleServicesDemo


    class Program


        static string userID = "fred";

        static string password = "";

        static string profileName = "test";

        static string projectID = "XXX000001";

        static int lineItemID = 1;

        static int processID = 16;


        static void Main(string[] args)


            Session s = null;

            int widthPropID = 45;

            string width = "178.3";

            int heightPropID = 63;

            string height = "33.2";

            int jtSpecID = 42;


            s = new Session();

            s.login(userID, password, profileName);


            // ...


            s.LoadModel(projectID, lineItemID, processID);


            // ...


            s.SetPropertyValue(widthPropID, width);

            s.SetPropertyValue(heightPropID, height);


            s.CreateOutput(s.GetTopLevelPart(), jtSpecID, "Implant3D", false);


            // refer to resulting JT via URL after CreateOutput call:

            // http://webserver/ModelServicesWS/resource/file/output/Implant3D.jt