Set Timeout for WSProjectGroup getProjectGroup(int id) when taking too long

While making a call to get a project group to WorldServer webservices the getProjectGroup times out when there are a lot of locales for the project group (more than 8 locales or so).

The application is in C# and like below we can get the authorization fine and the call works well for projects with fewer locales.

WSWorkflowManager mgr = new WSWorkflowManager(context); //this works fine
WSProjectGroup group = mgr.getProjectGroup(Convert.ToInt32(groupNumber)); //this times out for groups with many locales

Is there a way to force this to continue to process? mgr has a default mgr.timeout value of '-1' which I assume should let it work for as long as possible.

If there is anyway to help this process or even say return all the Project IDs from the Project Group number that would be helpful.

Thanks,

Joe

emoji
Parents
  • Hi Joe,

    I am sorry to hear you experience timeout issues.

    Unfortunately, I was not able to reproduce the timeout you encounter (I used 30 locales and I received the response).

    Timeout -1 means there is no timeout, but you can also set up a timeout (milliseconds) to see if this is fixing your issue.

    My code snippet is below:

    var context = new WSContext(userName, password, soapEndpoint);
    context.timeout = 900000; //15 minutes

    WSWorkflowManager workflowManager = context.getWorkflowManager();
    WSProjectGroup group = workflowManager.getProjectGroup(projectGroupId);

    Another way to work around this is to use REST API endpoints.
    This is the documentation for Login API, used to achieve the login sessionId: docs.rws.com/.../login
    Using the token (sessionId), you can use this REST API to get project group information by ID:
    docs.rws.com/.../get-information-about-a-specific-project-group


    Hope the provided information helps you achieve the functionality you expect.
    Let me know if you have additional questions.

    Best regards,
    Anca

    emoji
Reply
  • Hi Joe,

    I am sorry to hear you experience timeout issues.

    Unfortunately, I was not able to reproduce the timeout you encounter (I used 30 locales and I received the response).

    Timeout -1 means there is no timeout, but you can also set up a timeout (milliseconds) to see if this is fixing your issue.

    My code snippet is below:

    var context = new WSContext(userName, password, soapEndpoint);
    context.timeout = 900000; //15 minutes

    WSWorkflowManager workflowManager = context.getWorkflowManager();
    WSProjectGroup group = workflowManager.getProjectGroup(projectGroupId);

    Another way to work around this is to use REST API endpoints.
    This is the documentation for Login API, used to achieve the login sessionId: docs.rws.com/.../login
    Using the token (sessionId), you can use this REST API to get project group information by ID:
    docs.rws.com/.../get-information-about-a-specific-project-group


    Hope the provided information helps you achieve the functionality you expect.
    Let me know if you have additional questions.

    Best regards,
    Anca

    emoji
Children
No Data