Esempio n. 1
0
        /// <summary>
        /// Jump to workflow timer. Exceptio is thrown if timer is already active or not found in workflow.
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public JumpWorkflowAction ToTimer(string name)
        {
            Ensure.NotNullAndEmpty(name, "name");
            var timerItem = _workflowItems.TimerItemFor(Identity.Timer(name));

            return(WorkflowAction.JumpTo(timerItem).WithTriggerAction(_triggeringAction(timerItem)));
        }
Esempio n. 2
0
        /// <summary>
        /// Returns the workflow action to cancel the timer.
        /// </summary>
        /// <param name="timerName"></param>
        /// <returns></returns>
        public WorkflowAction ForTimer(string timerName)
        {
            Ensure.NotNullAndEmpty(timerName, "timerName");

            var timerItem = _workflowItems.TimerItemFor(Identity.Timer(timerName));

            return(WorkflowAction.Cancel(timerItem));
        }
Esempio n. 3
0
 /// <summary>
 /// Returns child timer for given <see cref="WorkflowItemEvent"/>.
 /// </summary>
 /// <param name="event"></param>
 /// <returns></returns>
 protected ITimerItem Timer(WorkflowItemEvent @event)
 {
     Ensure.NotNull(@event, "@event");
     return(_allWorkflowItems.TimerItemFor(@event));
 }