-
2005年09月02日
how to use the Deadline Activity property
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
Q:
http://fireshort.blogbus.com/logs/1405352.html
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?"随机文章:
结合ToolAgent与自定义数据类型实现下拉列表 2005年10月18日Shark里面如何使用自定义数据类型 2005年09月15日shark的学习路线 2005年09月15日How to find Requester for Subflows 2004年11月12日工作流和MIS的关系 2006年09月05日
收藏到:Del.icio.us
引用地址:





