package com.huigou.explorer.application.impl;

import com.huigou.explorer.application.TaskFormKeyGenerator;
import org.activiti.bpmn.model.Process;
import org.activiti.bpmn.model.UserTask;

/**
 * @author yonghuan
 */
public class DefaultTaskFormKeyGenerator implements TaskFormKeyGenerator {

    private final String formUrl;

    public DefaultTaskFormKeyGenerator(String formUrl) {
        this.formUrl = formUrl;
    }

    @Override
    public String generateFormKey(Process process, UserTask task, String fromNo) {
        String formKey = formUrl + "?procId=" + process.getId() + "&formNo=" + fromNo;
        return formKey;
    }
}
