public override void Execute(IJobHandlerConfiguration configuration, ExecutionEntity execution,
                                     CommandContext commandContext, string tenantId)
        {
            var          activityId = ((TimerJobConfiguration)configuration).TimerElementKey;
            ActivityImpl eventSubprocessActivity = execution.ProcessDefinition.FindActivity(activityId) as ActivityImpl;

            if (eventSubprocessActivity != null)
            {
                execution.ExecuteEventHandlerActivity(eventSubprocessActivity);
            }
            else
            {
                throw new ProcessEngineException(
                          "Error while triggering event subprocess using timer start event: cannot find activity with id '" +
                          configuration + "'.");
            }
        }
        public override void Execute(IJobHandlerConfiguration _configuration, ExecutionEntity execution,
                                     CommandContext commandContext, string tenantId)
        {
            TimerJobConfiguration configuration = _configuration as TimerJobConfiguration;
            var          activityId             = configuration.TimerElementKey;
            ActivityImpl activity = execution.GetProcessDefinition().FindActivity(activityId) as ActivityImpl;

            EnsureUtil.EnsureNotNull(
                "Error while firing timer: boundary event activity " + configuration + " not found",
                "boundary event activity", activity);

            try
            {
                execution.ExecuteEventHandlerActivity(activity);
            }
            //catch (Exception e)
            //{
            //    throw e;
            //}
            catch (System.Exception e)
            {
                throw new ProcessEngineException("exception during timer execution: " + e.Message, e);
            }
        }