Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.iqiny.silly.service.impl.DefaultMySillyWriteService Maven / Gradle / Ivy
/*
* Copyright iqiny.com
*
* https://gitee.com/iqiny/silly
*
* project name:silly-spring
* project description:top silly project pom.xml file
*/
package com.iqiny.silly.service.impl;
import com.iqiny.silly.common.util.SillyAssert;
import com.iqiny.silly.common.util.SillyMapUtils;
import com.iqiny.silly.core.base.SillyCategory;
import com.iqiny.silly.core.base.core.SillyMaster;
import com.iqiny.silly.core.engine.SillyTask;
import com.iqiny.silly.core.service.base.AbstractSillyWriteService;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
* 默认的 写入服务类
*/
public class DefaultMySillyWriteService extends AbstractSillyWriteService implements SillyCategory {
@Override
@Transactional(rollbackFor = Exception.class)
public M saveTaskMap(Map saveMap) {
String taskId = SillyMapUtils.getString(saveMap, taskIdKey());
boolean submit = SillyMapUtils.getBooleanValue(saveMap, submitKey(), false);
SillyAssert.notEmpty(taskId, "任务ID不可为空");
return saveData(submit, taskId, saveMap);
}
@Override
@Transactional(rollbackFor = Exception.class)
public M saveOrNewMap(Map saveMap) {
String taskId = SillyMapUtils.getString(saveMap, taskIdKey());
boolean submit = SillyMapUtils.getBooleanValue(saveMap, submitKey(), false);
return saveData(submit, taskId, saveMap);
}
@Override
@Transactional(rollbackFor = Exception.class)
public List startProcess(String masterId, String processKey) {
return super.startProcess(masterId, processKey);
}
@Override
@Transactional(rollbackFor = Exception.class)
public List startProcess(String masterId, String processKey, String userId, Map varMap) {
return super.startProcess(masterId, processKey, userId, varMap);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void changeUser(String taskId, String userId, String reason) {
super.changeUser(taskId, userId, reason);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void reject(String taskId, String nodeKey, String reason, String userId) {
super.reject(taskId, nodeKey, reason, userId);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void reject(String taskId, String nodeKey, String reason, String userId, boolean deleteOtherTaskFlag) {
super.reject(taskId, nodeKey, reason, userId, deleteOtherTaskFlag);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void reject(String taskId, String nodeKey, String reason, String userId, boolean deleteOtherTaskFlag, Map varMap) {
super.reject(taskId, nodeKey, reason, userId, deleteOtherTaskFlag, varMap);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String masterId, String processInstanceId) {
super.delete(masterId, processInstanceId);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void forceEndProcess(String masterId, String processInstanceId) {
super.forceEndProcess(masterId, processInstanceId);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void jumpNode(String masterId, String nodeKey, String reason, Map varMap) {
super.jumpNode(masterId, nodeKey, reason, varMap);
}
}