Topic
6 replies Latest Post - ‏2013-08-02T05:03:11Z by YPS1_guybrush_guybrush
SystemAdmin
SystemAdmin
1250 Posts
ACCEPTED ANSWER

Pinned topic Wait Time

‏2009-06-03T14:24:57Z |
Hi All,
In 3.7.1.1, is there a way to add "wait time" between 2 activities within an orchestration? Also, can we disable a particular activity? Currently, we have to delete the activity.
Thanks,
Sajid
 
Updated on 2009-06-15T23:20:46Z at 2009-06-15T23:20:46Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1250 Posts
    ACCEPTED ANSWER

    You can't comment, but you can "if"

    ‏2009-06-15T23:20:46Z  in response to SystemAdmin
    Activities cannot be commented, but you can put them in an if..then condition where you set the condition so it cannot be executed: 1=0, for example.
    Your options for putting an orchestration to sleep are addressed here https://community.castiron.com/node/2350.
    Regards,
    Alan
    • M3NG_Richard_Wolters
      18 Posts
      ACCEPTED ANSWER

      Re: You can't comment, but you can "if"

      ‏2013-07-31T15:31:05Z  in response to SystemAdmin

      Hi Alan,

      I would like to put my orchestration to sleep, is there another link or section where those options are addressed? That particular link is broken...

       

      Best Regards,

      Richard Wolters

      • ER56_Sathish_Kumar
        ER56_Sathish_Kumar
        2 Posts
        ACCEPTED ANSWER

        Re: You can't comment, but you can "if"

        ‏2013-07-31T20:05:39Z  in response to M3NG_Richard_Wolters

        Hi Richard,

        I might have a workaround here... Can you try writing a custom javascript function to sleep for few seconds and call it at the end of the activity? or if that particular activity does not allows to use the javascript function then you might have to create a dummy activity where this function can be called.. Not sure whether we have a better alternative here..

         

        Regards,

        Sathish

         

        • M3NG_Richard_Wolters
          18 Posts
          ACCEPTED ANSWER

          Re: You can't comment, but you can "if"

          ‏2013-07-31T20:13:41Z  in response to ER56_Sathish_Kumar

          Hi Sathish,

          This was actually addressed in another post here https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014630979.

          He used the java.lang.Thread.sleep(msec) method.  I was trying to use setTimeout() and it wasn't functioning the same way.

          • ER56_Sathish_Kumar
            ER56_Sathish_Kumar
            2 Posts
            ACCEPTED ANSWER

            Re: You can't comment, but you can "if"

            ‏2013-07-31T22:42:16Z  in response to M3NG_Richard_Wolters

            Hi Richard,

            Even I was thinking of setTimeout() solution for this.. but when I tested this in the orchestration it dint work for me as well. After few mins of google, found out that the setTimeout() is not part of javascript but its part of window object provided by the web browsers. So this window object does not exist in this context(i.e. in the CI environment) unless it is provided by some external libraries. Pls check whether this tutorial is useful by any means.

            http://ejohn.org/blog/bringing-the-browser-to-the-server/

            Meanwhile I tried the java solution given in the above link and it works perfect. Attaching the sample project which i tried for reference.

            Attachments

            Updated on 2013-07-31T22:44:09Z at 2013-07-31T22:44:09Z by ER56_Sathish_Kumar
            • YPS1_guybrush_guybrush
              45 Posts
              ACCEPTED ANSWER

              Re: You can't comment, but you can "if"

              ‏2013-08-02T05:03:11Z  in response to ER56_Sathish_Kumar

              Hi Sathish,

               

              I'm not sure whether this will be disabled in the future release or not, but apparently you could call the java library directly. You could just define a custom javascript and have it call

              java.lang.Thread.sleep(long millis)

              This will used the least resource as it basically puts the job and thread into sleep mode for predefined period. The other approach to loop and check for certain condition before actually process the orchestration is considered nasty as it will hog the resource in the server and cause drastic performance degrade.