Topic
4 replies Latest Post - ‏2013-07-12T12:25:58Z by mark99
Preetha
Preetha
18 Posts
ACCEPTED ANSWER

Pinned topic Does ITIM custom adaper handle multiple requests at a time?

‏2013-06-24T17:01:13Z |

We have developed lot of custom adapters and it will trigger a batch script residing on a windows server, the issue here is if we submit more than one request at a time, none of those requests are processed or only one request is processed.

So we instructed managers/approvers to approve ONLY one requests at a time which we actually dont like to do, and they have to wait for some time (2-3 mins) to approve the next request.

 

Can someone please help is there a way to tell ITIM/TDI to queue up all the requests and process one by one like the default adapter does? I will share the custom code with you if needed.

 

  • dgowda01
    dgowda01
    32 Posts
    ACCEPTED ANSWER

    Re: Does ITIM custom adaper handle multiple requests at a time?

    ‏2013-06-25T16:02:41Z  in response to Preetha

    The experts might provide a better answer, but here is what I'd do:

    Wrap the 'execute command' part of your script in a crude non-concurrency system.

    Below is some pseudo code:

    var isCommandInUse = system.getExternalProperty(commandname);  //Check if a property is set with your command name for key and true/false for value

    while(isCommandInUse == "true") {

    system.sleep(10); // if another instance of the AL has set the property to true, wait till that AL finishes it's processing

    isCommandInUse = system.getExternalProperty(commandname); 

    }

    system.setExternalProperty(commandname,"true");

    <prepare the arguments for your command>

    system.shellCommand(commandname, args);

    <wait till you get response about your command completion>

    system.setExternalProperty(commandname,"false");

    <your remaining code>

    Of course you must set the property first time to false, manually, before you try executing this AL.

    Updated on 2013-06-25T16:04:44Z at 2013-06-25T16:04:44Z by dgowda01
    • Preetha
      Preetha
      18 Posts
      ACCEPTED ANSWER

      Re: Does ITIM custom adaper handle multiple requests at a time?

      ‏2013-06-25T16:06:04Z  in response to dgowda01

      Thanks for your reply dgowda01 , I will try and let you know how it works!

      • dgowda01
        dgowda01
        32 Posts
        ACCEPTED ANSWER

        Re: Does ITIM custom adaper handle multiple requests at a time?

        ‏2013-06-26T15:18:39Z  in response to Preetha

        Giving it a second thought, it would be better if you use the system store instead of external properties (which was very crude to start with).

  • mark99
    mark99
    26 Posts
    ACCEPTED ANSWER

    Re: Does ITIM custom adaper handle multiple requests at a time?

    ‏2013-07-12T12:25:58Z  in response to Preetha

    You can configure the rmi dispatcher to use caching of  assembly lines and determine the number of concurrent request that are processed.

    the magic words in the service.def are

    <dispatcherParameter name="MaxConnectionCnt">
    <default>1</default>
    </dispatcherParameter>

    <dispatcherParameter name="HostNameUrl">
    <default>a fixed value or one you get from the serviceform</default>
    </dispatcherParameter>

    do a google for "How to slow down ITIM RMI adapter"

    If you say you developped a lot of adapters check to see that names of the assembly lines are all different. For instance if you have and "add" operation in each adapter do not call the assembly line just "add" in all adapters.