To get the number of flowervices/documents/connections

Dear Experts,

Could you please let me know is there is any webMehtods service or way to get the number of flowservices/documents/connections of the package??I am trying to build code where if we give package name it probably gives number elements in that packge.
Could any one please help me in it?

Thanks and Regards,

Explore the services in WmRoot and WmART package.

Make sure you are able to view the WmRoot in your navigation panel. Since WmRoot package is the core package of IS and SAG does not support this. You should use it at your own risk.

Hi Sudhir,

I just tried a sample java service, it worked.

IDataCursor idatacursor = pipeline.getCursor();
        String s = IDataUtil.getString(idatacursor, "package");
        int i = s.lastIndexOf(File.separator) + 1;
        String s1 = s.substring(i);
        IData idata1 = IDataFactory.create();
        IDataCursor idatacursor1 = idata1.getCursor();
        IDataUtil.put(idatacursor1, "showServices", "true");
        IDataUtil.put(idatacursor1, "package", s1);
        IData idata2 = IDataFactory.create();
        String as[] = null;
            IData idata3 = Service.doInvoke("wm.server.packages.adminui", "packageInfo", idata1);
            IDataCursor idatacursor2 = idata3.getCursor();
            as = IDataUtil.getStringArray(idatacursor2, "services");
        catch(Exception exception) { }
        IDataUtil.put(idatacursor, "services", as);
        IDataUtil.put(idatacursor, "index", (new StringBuilder()).append("").append(s1).toString());

i/p pipeline package (string) o/p pipeline services ( a string list)

Let me know, how it works for you.


1 Like

Thanks Naidu…It helps me to get the number of services.Is there is any chance to enhance this service like to get number of flow services and number of java services or number of jdbc/SAP adapter services…etc seperately??

Thanks and Regards,

If you want to know the number of adapter services, you can use ""and then “”. It will return a list of all existing adapters, just get the size of this list.

You can do the same with connections, using “” and “”

Now I’m trying to apply this to javaServices and flowServices =P

@ Sudhir,

Before you write any java service, explore the services in WmRoot and WmART. I bet there are services that will meet your requirements by parsing the output results accordingly. :slight_smile:

Hi Sudhir,

You make use of WmRoot Package to get the information services.
Use “wm.server.packages:packageInfo” to get the list of services in the package.
IT will give you one of the output field called “services”. It is a string list and contains all the services resides inside that package.
Then you can loop over this field and pass value to the service
This service take input as service name and provide you several output field and one of them is service type this service type tells you whether this service is “flow” /“java” or “adapter service”.
Only thing which it will not tell you that whether service is SAP adapter or Java adapter or any other adapter.
For that you can use your own logic to find out.

Thanks a lot Vikas for your technical information.I will do POC on it will let you know status.

Thanks and Regards,