package cn.axzo.workflow.core.engine.job.service;

import org.flowable.job.service.JobServiceConfiguration;
import org.flowable.job.service.impl.persistence.entity.JobEntity;
import org.flowable.job.service.impl.persistence.entity.TimerJobEntity;
import org.flowable.job.service.impl.persistence.entity.TimerJobEntityManagerImpl;
import org.flowable.job.service.impl.persistence.entity.data.TimerJobDataManager;

/**
 *
 * @author wangli
 * @since 2025-03-12 14:14
 */
public class CustomTimerJobEntityManagerImpl extends TimerJobEntityManagerImpl {
    public CustomTimerJobEntityManagerImpl(JobServiceConfiguration jobServiceConfiguration, TimerJobDataManager jobDataManager) {
        super(jobServiceConfiguration, jobDataManager);
    }

    @Override
    protected TimerJobEntity createTimer(JobEntity te) {
        TimerJobEntity timer = super.createTimer(te);
        timer.setElementId(te.getElementId());
        timer.setElementName(te.getElementName());
        return timer;
    }
}
