田源
2025-01-16 404966637eda6881a0f17683c5aacc7c1c34aed8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.vci.client.workflow.delegate;
 
import com.vci.client.ClientSession;
import com.vci.client.common.objects.UserEntityObject;
import com.vci.client.framework.delegate.ClientBaseDelegate;
import com.vci.client.ui.exception.VCIException;
import com.vci.corba.common.VCIError;
import com.vci.corba.workflow.data.FlowInstanceInfo;
 
public class FlowInstanceClientDelegate extends ClientBaseDelegate {
 
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
 
    public FlowInstanceClientDelegate() {
    }
 
    public FlowInstanceClientDelegate(UserEntityObject userEntityObject) {
        super(userEntityObject);
    }
 
    public String saveFlowInstance(FlowInstanceInfo info) throws VCIError {
        return ClientSession.getWorkflowService().saveFlowInstance(info, userEntityInfo);
    }
 
    public void endProcessInstance(String processInstanceId) throws VCIException {
        try{
            ClientSession.getWorkflowService().endProcessInstance(processInstanceId,userEntityInfo);
        } catch (VCIError e) {
            throw convertVCIErrorToVCIException(e);
        }
    }
    public void endProcessInstanceByplatform(String processInstanceId) throws VCIException {
        try{
            ClientSession.getWorkflowService().endProcessInstanceByplatform(processInstanceId,userEntityInfo);
        } catch (VCIError e) {
            throw convertVCIErrorToVCIException(e);
        }
    }
 
    public FlowInstanceInfo[] getFlowInstances(String applicant) throws VCIException {
        try {
            FlowInstanceInfo[] infos = ClientSession.getWorkflowService().getFlowInstances(applicant);
            return infos;
        } catch (VCIError e) {
            throw convertVCIErrorToVCIException(e);
        }
    }
    public FlowInstanceInfo[] getFlowInstancesname(String name) throws VCIException {
        try {
            FlowInstanceInfo[] infos = ClientSession.getWorkflowService().getFlowInstancesname(name);
            return infos;
        } catch (VCIError e) {
            throw convertVCIErrorToVCIException(e);
        }
    }
 
    public VCIException convertVCIErrorToVCIException(VCIError e) {
        return new VCIException(String.valueOf(e.code), e.messages);
    }
}