• 2005年09月02日

    how to use the Deadline Activity property

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
    http://fireshort.blogbus.com/logs/1405352.html

    Q:
    Can somebody explain how to use the Deadline Activity property? I have the case that I will need to instantiate a process and set a variable, let say start_date, to the date that this process was instantiated. After that in one of its activities, say Activity1 I want to make a deadline such that if (start_date+2days) have passed it will move to the next activity if not triggered manually? Is this possible to be done and if so how?

    A:
    Set the deadline to Synchronous and enter as condition something like:
    var d = new java.util.Date(start_date.getTime() + WAIT_TIME_OUT);
    d;
    where start_date is of type Date and WAIT_TIME_OUT is in milliseconds. WAIT_TIME_OUT can be a process- or package-level WRD with initial value (some kind of constant), or just a numeric value - it is your choice.

    Fill in the Exception name with some meaningfull string, for example
    TimeToContinueException

    Then set two outgoing transitions:
    - By exception ("TimeToContinueException");
    - By condition - the normal activity completion.

    If you need exactly the process start date, you can use the Shark supplied value PROCESS_STARTED_TIME instead your own variable start_date.

    For more details see the "how_to" document, point "How to write deadline expressions for activities?"


    收藏到:Del.icio.us




    引用地址:

发表评论

您将收到博主的回复邮件
记住我