package com.jpsoft.shinestar.modules.workflow.service;

import java.util.List;
import java.util.Map;

import com.jpsoft.shinestar.modules.base.entity.PersonPopedom;
import com.jpsoft.shinestar.modules.workflow.entity.Procinst;
import com.github.pagehelper.Page;
import com.jpsoft.shinestar.modules.common.dto.Sort;

public interface ProcinstService {
	Procinst get(String id);
	boolean exist(String id);
	int insert(Procinst model);
	int update(Procinst model);
	int delete(String id);
	List<Procinst> list();
	Page<Procinst> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);

    Procinst findByBusinessKey(String businessKey);

    String addProcInst(String businessKey,String businessName, String formId, PersonPopedom personPopedom,
					   String activityId, String processTemplateId,Map<String,Object> conditions) throws Exception;

    void revoke(PersonPopedom personPopedom, String id) throws Exception;
}