Topic
5 replies Latest Post - ‏2011-05-13T14:36:23Z by 命题 杨
Josselin Chevrin
Josselin Chevrin
5 Posts
ACCEPTED ANSWER

Pinned topic Launch a workflow automatically once a month

‏2011-01-31T10:49:02Z |
 Hi everybody,
 
I would like to launch a workflow each month, at the beginning of the month.
My workflow will create files in which users will consult metrics.
 
Then I would like to launch this one automatically without using specific devloppment.
Do you know how to do that ? using subscription or a workflow operation, ...
 
Thanks a lot,
Greetings,
 
Josselin
Updated on 2011-05-13T14:36:23Z at 2011-05-13T14:36:23Z by Eric Vonheim
  • Viktor Mitin
    Viktor Mitin
    6 Posts
    ACCEPTED ANSWER

    Ответ: Launch a workflow automatically once a month

    ‏2011-02-04T08:51:01Z  in response to Josselin Chevrin
     Hi, Josselin.
    Well, in my mind this is not of a big deal. At first you are to create a simple  workflow containing three steps (Launch Step -> Wait (Pause) step -> Launch WF step -> and back to Wait step created before). So we've got a loop. In wait step parameters you have to add "one month" or some another time corresponding to your purpose. Launch WF step should launch your WF transferred to PE (I meant that one creating files for metrcis).
    One more consideration regarding the issue i sthat you'll need an ability to stop that loop. You may create an additional step with decision point - two routes:
    1. "continue launching WF monthly" leading to next iteration of loop (Wait step);
    2. "Stop doing that" leading to some "End process step".
    Also you have to think about passing parameters to new instances of your WF (that might month name/number for new instance's F_Subject).
     
    Another way includes programming but it is not as horrible as one can think, that's quite easy. I can describe it for you if needed.

    I hope my answer is clear, if you'll need some tips feel free to post quiestions.
    Updated on 2011-02-04T08:51:01Z at 2011-02-04T08:51:01Z by Viktor Mitin
    • Josselin Chevrin
      Josselin Chevrin
      5 Posts
      ACCEPTED ANSWER

      Re : Ответ: Launch a workflow automatically once a month

      ‏2011-02-03T16:54:24Z  in response to Viktor Mitin
       Hi Viktor,
       
      Thanks a lot for your answer.
       
      But when you say "Wait (Pause) step" is there "Suspend Time" or "Delay" ? I think that it's Delay, right ?
      If names are differents, my Process Designer is the 4.5.0.0
       
      And in parameters, I can't see how to add one month.
      I have the function : addmonths(time_expr, no_of_months) but that's all.
      Should I save the old month in a property and when "addmonths(old_month,1) = Now" then past the step ?
      Is there anything like that ?
       
      Sorry to ask you all that things, it should be very easy but I haven't used  that in the past.
       
      Greetings,

      Josselin
      • Viktor Mitin
        Viktor Mitin
        6 Posts
        ACCEPTED ANSWER

        Re : Ответ: Launch a workflow automatically once a month

        ‏2011-02-04T08:50:34Z  in response to Josselin Chevrin
         Yes, Josselin, you are right. That is "Delay" step (I haven't had Process Designer on my hands while writing a reply;))
        In parameters for that step you should use addmonths(time_expr, no_of_months).
        time_expr should be replaced with call to systemtime() and no_of_months is 1
        Finally you'll get  addmonths(systemtime(), 1) . So you don't need to save old month.
        This should definitely  work.
        • Burton Boucher
          Burton Boucher
          6 Posts
          ACCEPTED ANSWER

          Re: Re : Ответ: Launch a workflow automatically once a month

          ‏2011-02-04T14:14:02Z  in response to Viktor Mitin
           Be careful with this method. By default auditing is turned on for a process map within Process Designer. I recommend turning this off in this use case as the size of history continues to grow until the workflow ends. The history will not be allowed to be purged until that time.
          Also, you will need some way to monitor and manage the running process. Maybe a notification or a call to another process to use as a heartbeat verification.
           
          Another route to take is to schedule a cron or AT schedule and launch the process using REST or Application Engine UI Services (AEUIS) API. Both are covered in the InfoCenter
  • This reply was deleted by Eric Vonheim 2011-05-13T14:36:23Z.