ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
package com.vci.server.workflow;
 
import java.io.IOException;
import java.util.Date;
import java.util.List;
import org.omg.CORBA.LongHolder;
 
import com.vci.common.ServiceNames;
import com.vci.corba.common.VCIError;
import com.vci.corba.workflow.data.QueryParamInfo;
import com.vci.corba.common.data.UserEntityInfo;
import com.vci.corba.workflow.data.EventInfo;
import com.vci.corba.workflow.data.FlowApproveContentInfo;
import com.vci.corba.workflow.data.FlowApproveHistoryInfo;
import com.vci.corba.workflow.data.FlowInstanceInfo;
import com.vci.corba.workflow.data.FlowObjectInfo;
import com.vci.corba.workflow.data.FlowTaskInfo;
import com.vci.corba.workflow.data.MapTransfersInfo;
import com.vci.corba.workflow.data.NodeHideInfo;
import com.vci.corba.workflow.data.PlwfinstancetemplateInfo;
import com.vci.corba.workflow.data.PlwfpersonsetInfo;
import com.vci.corba.workflow.data.ProcessCategoryInfo;
import com.vci.corba.workflow.data.ProcessDefinitionInfo;
import com.vci.corba.workflow.data.ProcessTaskInfo;
import com.vci.corba.workflow.data.SubprocessTemInfo;
import com.vci.corba.workflow.data.TaskCCInfo;
import com.vci.corba.workflow.data.TaskDescInfo;
import com.vci.corba.workflow.data.TaskRevokeInfo;
import com.vci.corba.workflow.data.TasksAssignedInfo;
import com.vci.corba.workflow.WorkflowService;
import com.vci.server.BaseService;
import com.vci.server.workflow.common.resouce.EventProperties;
import com.vci.server.workflow.common.resouce.WorkflowProperties;
//import com.vci.server.workflow.server.WorkFlowCahe;
import com.vci.server.workflow.server.delegate.FlowApproveContentDelegate;
import com.vci.server.workflow.server.delegate.FlowInstanceDelegate;
import com.vci.server.workflow.server.delegate.PlwfDelegate;
import com.vci.server.workflow.server.delegate.ProcessCustomDelegate;
import com.vci.server.workflow.server.delegate.TaskCCDelegate;
import com.vci.server.workflow.server.taskEventEdit.EventEditDelegate;
import com.zeroc.Ice.Current;
 
public class WorkflowServiceImpl extends BaseService implements WorkflowService {
 
    public WorkflowServiceImpl() {
//        // 初始化Hibernate
//        HibernateSessionFactory.getSession();
//        HibernateSessionFactory.closeSession();
 
//        if (WorkFlowCahe.getTemplateMap() != null && WorkFlowCahe.getTemplateMap().size() == 0) {
//            ProcessCategoryInfo[] processCategories;
//            try {
//                processCategories = this.getProcessCategories("root", null);
//                for (ProcessCategoryInfo pc : processCategories) {
//                    String id = pc.id;
//                    ProcessDefinitionInfo[] processDefinitions = this.getProcessDefinitions(id, null);
//                    for (ProcessDefinitionInfo pf : processDefinitions) {
//                        String jbpmDeploymentId = pf.jbpmDeploymentId;
//                        this.loadWorkFlowTemplate(jbpmDeploymentId, null);
//                    }
//                }
//            } catch (VCIError e) {
//                e.printStackTrace();
//            }
//        }
    }
    
    @Override
    public String getServiceName() {
        return ServiceNames.WFSERVICE;
    }    
    
    @Override
    public void test(com.zeroc.Ice.Current current) {
        String op = current.operation;
        String adapter = current.adapter.getName();
        String id = current.id.name;
        String time = new Date().toString();
        System.out.println(String.format("== %s [WorkflowService.test] (adapter=%s, id=%s, op=%s)",  time, adapter, id, op));
    }
 
 
    @Override
    public ProcessCategoryInfo[] getProcessCategories(String parentId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getProcessCategories(parentId);
    }
 
    @Override
    public String saveProcessCategory(ProcessCategoryInfo info, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).saveProcessCategory(info);
    }
 
    @Override
    public boolean updateProcessCategory(ProcessCategoryInfo info, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).updateProcessCategory(info);
    }
 
    public boolean deleteProcessCategory(String id, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).deleteProcessCategory(id);
    }
 
    public boolean existProcessCategory(String id, String name, Current current) throws VCIError {
        return new ProcessCustomDelegate().existProcessCategory(id, name);
    }
 
    public boolean deployProcess(byte[] jbpmImage, String jbmpXml, String graphXml, String processCategoryId,
            ProcessTaskInfo[] processTaskInfos, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).deployProcess(jbpmImage, jbmpXml, graphXml, processCategoryId,
                processTaskInfos);
    }
 
    public boolean updateProcess(byte[] jbpmImage, String jbmpXml, String graphXml, String processCategoryId,
            ProcessTaskInfo[] processTaskInfos, UserEntityInfo userEnt, String deployId, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).updateProcess(jbpmImage, jbmpXml, graphXml, processCategoryId,
                processTaskInfos, deployId);
    }
 
    public boolean deleteProcessDefinition(String deployId, String pdId, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).deleteProcessDefinition(deployId, pdId);
    }
 
    public ProcessDefinitionInfo getProcessDefinitionByDeployId(String deployId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getProcessDefinitionByDeployId(deployId);
    }
 
    public ProcessDefinitionInfo[] getProcessDefinitions(String processCategoryId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getProcessDefinitions(processCategoryId);
    }
 
    public byte[] getProcessResource(String jbpmDeploymentId, String resourceType, Current current) throws VCIError {
        return new ProcessCustomDelegate().getProcessResource(jbpmDeploymentId, resourceType);
    }
 
    public String[] getNextCandidates(String jbpmDeploymentId, String taskName, String outcome, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getNextCandidates(jbpmDeploymentId, taskName, outcome);
    }
 
    public String[] getNextTaskNames(String jbpmDeploymentId, String taskName, String outcome, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getNextTaskNames(jbpmDeploymentId, taskName, outcome);
    }
 
    public ProcessDefinitionInfo[] getProcessDefinition(String rmTemplateId, String processType, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getProcessDefinition(rmTemplateId, processType);
    }
 
    public void saveRMTemplateProcess(String rmTemplateId, String[] processTypes, String[] jbpmDeploymentIds,
            UserEntityInfo userEnt, Current current) throws VCIError {
        new ProcessCustomDelegate(userEnt).saveRMTemplateProcess(rmTemplateId, processTypes, jbpmDeploymentIds);
    }
 
    public boolean deleteRMTemplateProcess(String rmTemplateId, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).deleteRMTemplateProcess(rmTemplateId);
    }
 
    public boolean startProcessInstanceByKey(String processDefinitionKey, FlowInstanceInfo var, String[] objId,
            UserEntityInfo userEnt, String[] userName, String outcome, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).startProcessInstanceByKey(processDefinitionKey, var, objId, userName,
                outcome);
    }
 
//    public long queryTraceTaskCount(String pluseroid, UserEntityInfo userEnt, String expandSql, Current current) throws VCIError {
//        return new ProcessCustomDelegate(userEnt).queryTraceTaskCount(pluseroid, expandSql);
//    }
    @Override
    public long queryTraceTaskCount(String pluser, String expandSql, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).queryTraceTaskCount(pluser, expandSql);
    }
 
    @Override
    public long queryMyTraceProcessCount(String pluseroid, UserEntityInfo userEnt, String expandSql, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).queryMyTraceProcessCount(pluseroid, expandSql);
    }
 
    public boolean completeTask(String taskId, String outcome, String nextTask, String approvalNote,
            UserEntityInfo userEnt, String[] userName, Current current) throws VCIError {
        // if(nextTask==null||"".equals(nextTask)){
        // new ProcessCustomDelegate(userEnt).completeTask(taskId,
        // outcome, approvalNote, userName);
        // return true;
        // }else{
        return new ProcessCustomDelegate(userEnt).completeTask(taskId, outcome, nextTask, approvalNote, userName);
        // }
 
    }
 
    public boolean completeTaskByPlatform(String taskId, String outcome, String nextTask, String approvalNote,
            UserEntityInfo userEnt, String[] userName, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).completeTaskByPlatform(taskId, outcome, nextTask, approvalNote,
                userName);
    }
 
    public ProcessTaskInfo findTaskPropertyById(String jbpmDeploymentId, String name, Current current) throws VCIError {
        return new ProcessCustomDelegate().findTaskPropertyById(jbpmDeploymentId, name);
    }
 
    public FlowApproveHistoryInfo[] getHistoryActivityByProInsId(String processInstanceId, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getHistoryActivityByProInsId(processInstanceId);
    }
 
    public byte[] getExecutionImageByExecutionId(String executionId, String taskName, Current current) throws VCIError {
        try {
            return new ProcessCustomDelegate().getExecutionImageByExecutionId(executionId, taskName);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
 
    public FlowObjectInfo[] getFlowObjectByExecutionId(String executionId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getFlowObjectByExecutionId(executionId);
    }
 
    public String getDeploymentIdByExecutionId(String executionId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getDeploymentIdByExecutionId(executionId);
    }
 
    public FlowInstanceInfo[] getFlowInstances(String applicant, Current current) throws VCIError {
        return new FlowInstanceDelegate().getFlowInstances(applicant);
    }
 
    public String saveFlowInstance(FlowInstanceInfo info, UserEntityInfo userEnt, Current current) throws VCIError {
        return new FlowInstanceDelegate(userEnt).saveFlowInstance(info);
    }
 
    public void endProcessInstance(String processInstanceId, UserEntityInfo userEnt, Current current) throws VCIError {
        new ProcessCustomDelegate(userEnt).endProcessInstance(processInstanceId);
    }
 
    public void endProcessInstanceByplatform(String processInstanceId, UserEntityInfo userEnt, Current current)
            throws VCIError {
        new ProcessCustomDelegate(userEnt).endProcessInstanceByplatform(processInstanceId);
    }
 
    public FlowInstanceInfo getFlowInstanceInfo(String executionId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getFlowInstanceInfo(executionId);
    }
 
    public ProcessDefinitionInfo[] getProcessDefinitionByType(String processType, Current current) throws VCIError {
        return new ProcessCustomDelegate().getProcessDefinitionByType(processType);
    }
 
    public String getDepolymentID(String executionId, Current current) throws VCIError {
 
        return new ProcessCustomDelegate().getDepolymentID(executionId);
    }
 
    public byte[] getFlowImageByDeployID(String deployID, Current current) throws VCIError {
        try {
            return new ProcessCustomDelegate().getFlowImageByDeployID(deployID);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
 
    /*
     * 获取任务下阶段名称
     * 
     * @see
     * com.vci.rmip.workflow.corba.method.WorkflowServiceOperations#getTaskPhaseName
     * (java.lang.String, java.lang.String)
     */
    public String getTaskPhaseName(String processDefinitionKey, String jbpmdeploymentid, FlowInstanceInfo var,
            UserEntityInfo userEnt, Current current) throws VCIError {
        String taskPhaseName = new ProcessCustomDelegate(userEnt).getTaskPhaseName(processDefinitionKey,
                jbpmdeploymentid, var);
        return taskPhaseName;
    }
 
    /*
     * 判断key重复
     * 
     * @see com.vci.rmip.workflow.corba.method.WorkflowServiceOperations#checkKey
     * (java.lang.String, java.lang.String)
     */
    public boolean checkKey(String name, String keyValue, Current current) throws VCIError {
        return new ProcessCustomDelegate().checkKey(name, keyValue);
    }
 
    public String[] getDeployId(String taskId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getDeployId(taskId);
    }
 
    public boolean getProcessTaskByTaskName(String taskId, String taskName, String outcome, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getProcessTaskByTaskName(taskId, taskName, outcome);
    }
 
    public TaskDescInfo[] getTaskDescList(String deploymentId, String taskName, Current current) throws VCIError {
        return new ProcessCustomDelegate().getTaskDescList(taskName, deploymentId);
    }
 
    public String[] getTrainName(String jbpmDeploymentId, String taskName, String outcome, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getTrainName(jbpmDeploymentId, taskName, outcome);
    }
 
    public FlowTaskInfo[] getTodoTaskByUser(String pluseroid, long first, long pageSize, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).getTodoTaskByUser(pluseroid, (int)first, (int)pageSize);
    }
 
    public String[] getNextTask(String executionId, String taskName, String outcome, Current current) throws VCIError {
        return new ProcessCustomDelegate().getNextTask(executionId, taskName, outcome);
    }
 
    public String[] getUserNames(String executionId, String taskName, String outcome, Current current) throws VCIError {
        return new ProcessCustomDelegate().getUserNames(executionId, taskName, outcome);
    }
 
    // 获取全部任务列表
    public String[] getAllTaskNames(String jbpmDeploymentId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getAllTaskNames(jbpmDeploymentId);
    }
 
    // 获取全部流程定义
    public ProcessDefinitionInfo[] getProcessDefinitionAll(Current current) throws VCIError {
        return new ProcessCustomDelegate().getProcessDefinitionAll();
    }
 
    public String[] getAllOutComes(String taskID, Current current) throws VCIError {
        return new ProcessCustomDelegate().getAllOutComes(taskID);
    }
 
    public FlowTaskInfo[] getMyTrackProcessByUserId(String pluseroid, long first, long pageSize, UserEntityInfo userEnt,
            String expandSql, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).getMyTrackProcessByUserId(pluseroid, (int)first, (int)pageSize, expandSql);
    }
 
    public byte[] getExecutionImage(String executionId, Current current) throws VCIError {
        try {
            return new ProcessCustomDelegate().getExecutionImage(executionId);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
 
    public String getUrlPath(String jbpmDeploymentId, String taskName, Current current) throws VCIError {
        return new ProcessCustomDelegate().getUrlPath(jbpmDeploymentId, taskName);
    }
 
    public boolean assignTask(String executionId, String username, Current current) throws VCIError {
        return new ProcessCustomDelegate().assignTask(executionId, username);
    }
 
    public boolean assignTaskByPlatform(String executionId, String username, Current current) throws VCIError {
        return new ProcessCustomDelegate().assignTaskByPlatform(executionId, username);
    }
 
    public boolean saveTaskCCInfo(TaskCCInfo[] infoList, Current current) throws VCIError {
        return new TaskCCDelegate().saveTaskCCInfo(infoList);
    }
 
    public TaskCCInfo[] getTaskCCInfos(String jbpmDeploymentId, Current current) throws VCIError {
        return new TaskCCDelegate().getTaskCCInfos(jbpmDeploymentId);
    }
 
    public boolean deleteTaskCC(String jbpmDeploymentId, String userName, Current current) throws VCIError {
        return new TaskCCDelegate().deleteTaskCC(jbpmDeploymentId, userName);
    }
 
    public long queryCCTaskCount(String pluser, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate().queryCCTaskCount(pluser);
    }
 
    public FlowTaskInfo[] getCCTaskByUserId(String pluseroid, long first, long pageSize, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getCCTaskByUserId(pluseroid, (int)first, (int)pageSize);
    }
 
    public boolean saveOrUpdateTasksAssigned(TasksAssignedInfo tasksAssignedInfo, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).saveOrUpdateTasksAssigned(tasksAssignedInfo);
    }
 
    public TasksAssignedInfo getTasksAssignedByUserName(String userName, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).getTasksAssignedByUserName(userName);
    }
 
    public TasksAssignedInfo[] getAllTasksAssignedByUserName(String userName, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).getAllTasksAssignedByUserName(userName);
    }
 
    public void creatTxtFile(Current current) throws VCIError {
        EventEditDelegate ee = new EventEditDelegate();
        try {
            ee.creatTxtFile();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
 
    public String readTxtFile(Current current) throws VCIError {
        return new EventEditDelegate().readTxtFile();
    }
 
    public void writeTxtFile(EventInfo[] eventInfoList, Current current) throws VCIError {
        try {
            new EventEditDelegate().writeTxtFile(eventInfoList);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
 
    public void replaceTxtByStr(String oldStr, String replaceStr, Current current) throws VCIError {
        new EventEditDelegate().replaceTxtByStr(oldStr, replaceStr);
    }
 
    public void saveSubProcess(SubprocessTemInfo[] subprocessTemInfos, Current current) {
        new ProcessCustomDelegate().saveSubProcess(subprocessTemInfos);
    }
 
    // add by caill start 2016.4.8
    public String getEventPropertyValue(String strKey, Current current) throws VCIError {
        // return new EventConfServerDelegate().getStringProperty(strKey);
        return EventProperties.getStringProperty(strKey);
    }
 
    // add by caill end
    public long checkSubprocessQuote(String subProcess, Current current) {
        return new ProcessCustomDelegate().checkSubprocessQuote(subProcess);
    }
 
    /**
     * 配置任务和用户
     * 
     * @see com.vci.rmip.workflow.corba.method.WorkflowServiceOperations#configTaskAndUser(java.lang.String,
     *      java.lang.String[], java.lang.String[], java.lang.String[][])
     */
    public void configTaskAndUser(String deploymentId, String[] dataIds, String[] tasknames, String[][] userNames, Current current) {
        new ProcessCustomDelegate().configTaskAndUser(deploymentId, dataIds, tasknames, userNames);
    }
 
    public String getDeployIdByProcessDefintionId(String processDifId, Current current) {
        return new ProcessCustomDelegate().getDeployIdByProcessDefintionId(processDifId);
    }
 
    public boolean getEndNode(String jbpmDeploymentId, String endTaskName, Current current) {
        return new ProcessCustomDelegate().getEndNode(jbpmDeploymentId, endTaskName);
    }
 
    public String startPocessSetUser(String processDefinitionKey, FlowInstanceInfo flowInstanceInfo, String[] objId,
            UserEntityInfo userEnt, String[] userName, String outcome, String[] tasknames, String[][] taskUserNames,
            Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).startPocessSetUser(processDefinitionKey, flowInstanceInfo, objId,
                userEnt, userName, outcome, tasknames, taskUserNames);
    }
 
    public String[] nextTaskCandidateUsers(String excutionId, String taskName, Current current) throws VCIError {
        return new ProcessCustomDelegate().nextTaskCandidateUsers(excutionId, taskName);
    }
 
    public String getNextTaskAssigner(String executionId, String taskName, Current current) {
        return new ProcessCustomDelegate().getNextTaskAssigner(executionId, taskName);
    }
 
    public String getNextSubTaskAssigner(String executionId, String taskName, String outcome, Current current) {
        try {
            return new ProcessCustomDelegate().getNextSubTaskAssigner(executionId, taskName, outcome);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "";
    }
 
    public ProcessCategoryInfo[] getProcessCategoriesByPage(String parentId, long pageSize, long pageIndex, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getProcessCategoriesByPage(parentId, (int)pageSize, (int)pageIndex);
    }
 
    public ProcessDefinitionInfo[] getProcessDefinitionsForRMCode(String processCategoryId, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getProcessDefinitionsForRMCode(processCategoryId);
    }
 
    public ProcessDefinitionInfo[] getProcessDefinitionsByPage(String processCategoryId, String name, long pageSize,
            long pageIndex, Current current) throws VCIError {
        return new ProcessCustomDelegate().getProcessDefinitionsByPage(processCategoryId, name, (int)pageSize, (int)pageIndex);
    }
 
    public ProcessDefinitionInfo[] getProcessDefinitionByProcessDefinitionName(String processCategoryName,
            String processCategoryId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getProcessDefinitionByProcessDefinitionName(processCategoryName,
                processCategoryId);
    }
 
    public long queryTodoTaskCount(String pluser, String taskType, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().queryTodoTaskCount(pluser, taskType);
    }
 
    public FlowTaskInfo[] getTodoTaskByUserId(String pluseroid, long first, long pageSize, String taskType, String sql,
            UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).getTodoTaskByUserId(pluseroid, (int)first, (int)pageSize, taskType, sql);
    }
 
//    public long queryTraceTaskCount(String pluser, String expandSql, UserEntityInfo userEnt, Current current) throws VCIError {
//        return new ProcessCustomDelegate(userEnt).queryTraceTaskCount(pluser, expandSql);
//    }
 
    public FlowTaskInfo[] getTrackTaskByUserId(String pluseroid, long first, long pageSize, String taskType,
            String querySQL, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).getTrackTaskByUserId(pluseroid, (int)first, (int)pageSize, taskType, querySQL);
    }
 
    public FlowTaskInfo[] getDoneTaskByUserId(String pluseroid, long first, long pagesize, String taskType,
            String querySQL, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).getDoneTaskByUserId(pluseroid, (int)first, (int)pagesize, taskType, querySQL);
    }
 
    public long queryDoneTaskCount(String pluser, String expandSql, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).queryDoneTaskCount(pluser, expandSql);
    }
 
    public void completeTaskforRMCode(String taskId, String outcome, String approvalNote, String[] userName,
            UserEntityInfo userEnt, Current current) throws VCIError {
        new ProcessCustomDelegate(userEnt).completeTask(taskId, outcome, approvalNote, userName);
 
    }
 
    public ProcessTaskInfo findTaskPropertyByProcessId(String jbpmDeploymentId, Current current) throws VCIError {
        return new ProcessCustomDelegate().findTaskPropertyByProcessId(jbpmDeploymentId);
    }
 
    public String getNextCandidatesDefineString(String jbpmDeploymentId, String taskName, String outcome, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getNextCandidatesDefineString(jbpmDeploymentId, taskName, outcome);
    }
 
    public FlowTaskInfo[] getProcessControlByUserId(String pluseroid, long first, long pagesize, String taskType,
            String querySQL, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate().getProcessControlByUserId(pluseroid, (int)first, (int)pagesize, taskType, querySQL);
    }
 
    public long queryProcessControlCount(String pluser, String taskType, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().queryProcessControlCount(pluser, taskType);
    }
 
    public FlowTaskInfo[] getDoneProcessByUserId(String pluseroid, long first, long pagesize, String taskType,
            String querySQL, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).getDoneProcessByUserId(pluseroid, (int)first, (int)pagesize, taskType,
                querySQL);
    }
 
    public long queryDoneProcessCount(String pluser, String taskType, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).queryDoneProcessCount(pluser, taskType);
    }
 
    public ProcessTaskInfo getFirstProcessTask(String jbpmDeploymentId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getFirstProcessTask(jbpmDeploymentId);
    }
 
    public ProcessTaskInfo getFirstProcessTaskByExecId(String execId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getFirstProcessTaskByExecId(execId);
    }
 
    public String getAllNoAgreeProcessTaskByTaskName(String taskId, String taskName, String outcome, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getAllNoAgreeProcessTaskByTaskName(taskId, taskName, outcome);
    }
 
    public boolean setNodeHide(String deploymentId, Current current) throws VCIError {
        return new ProcessCustomDelegate().setNodeHide(deploymentId);
    }
 
    public NodeHideInfo[] getNodeHideDeploymentId(Current current) throws VCIError {
        return new ProcessCustomDelegate().getNodeHideDeploymentId();
    }
 
    public boolean deleteHideFlow(String deployId, Current current) throws VCIError {
        return new ProcessCustomDelegate().deleteHideFlow(deployId);
    }
 
    public FlowTaskInfo[] getTaskByCondition(String[] values, long first, long pagesize, String objectId,
            UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).getTaskByCondition(values, (int)first, (int)pagesize, objectId);
    }
 
    public long queryFlowTaskCount(String[] values, String objectId, boolean flag, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).queryFlowTaskCount(values, objectId, flag);
    }
 
    public String getNextTaskNameByJbpmId(String jbpmDeploymentId, String taskname, String outcome, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getNextTaskNameByJbpmId(jbpmDeploymentId, taskname, outcome);
    }
 
    public String getNextTaskTypeByJbpmId(String jbpmDeploymentId, String taskname, String outcome, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getNextTaskTypeByJbpmId(jbpmDeploymentId, taskname, outcome);
    }
 
    public String getProcessStartUser(String execId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getProcessStartUser(execId);
    }
 
    public String getProcessTaskId(String execId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getProcessTaskId(execId);
    }
 
    public boolean setPocessHide(String jbpmdeplotmentId, short status, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().setProcessHide(jbpmdeplotmentId, status);
    }
 
    public TaskRevokeInfo[] getTaskRevokeList(String deploymentId, String taskName, Current current) throws VCIError {
        return new ProcessCustomDelegate().getTaskRevokeList(taskName, deploymentId);
    }
 
    public boolean deleteTasksAssignedByUserName(String[] userName, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).deleteTasksAssignedByUserName(userName);
    }
 
    public boolean deleteTasksAssignedByIds(String[] ids, UserEntityInfo userEnt, Current current) throws VCIError {
 
        // System.out.println("===============WorkflowServiceImpl.deleteTasksAssignedByIds===============");
        return new ProcessCustomDelegate(userEnt).deleteTasksAssignedByIds(ids);
    }
 
    public void setParticipation(String nextTaskId, String[] userNames, Current current) throws VCIError {
        new ProcessCustomDelegate().setParticipation(nextTaskId, userNames);
    }
 
    public String[] getAllUserListForTask(String taskName, String deploymentId, String outcome, String[] varkey,
            String[] varValue, Current current) throws VCIError {
        return new ProcessCustomDelegate().getAllUserListForTask(taskName, deploymentId, outcome, varkey, varValue);
    }
 
    public boolean saveFlowApproveContent(FlowApproveContentInfo info, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new FlowApproveContentDelegate(userEnt).saveFlowApproveContent(info);
    }
 
    public boolean updateFlowApproveContent(FlowApproveContentInfo info, UserEntityInfo userEnt, Current current) throws VCIError {
        return new FlowApproveContentDelegate(userEnt).updateFlowApproveContent(info);
    }
 
    public boolean deleteFlowApproveContent(String[] ids, UserEntityInfo userEnt, Current current) throws VCIError {
        return new FlowApproveContentDelegate(userEnt).deleteFlowApproveContent(ids);
    }
 
    public FlowApproveContentInfo[] getFlowApproveContents(UserEntityInfo userEnt, Current current) throws VCIError {
        return new FlowApproveContentDelegate(userEnt).getFlowApproveContents();
    }
 
    public GetFlowApproveContentByPageingResult getFlowApproveContentByPageing(QueryParamInfo queryParamInfo,
            UserEntityInfo userEnt, Current current) throws VCIError {
 
        LongHolder total = new LongHolder();
        total.value = 0;
        FlowApproveContentInfo[] facis = new FlowApproveContentDelegate(userEnt).getFlowApproveContentByPageing(total,
                queryParamInfo);
 
        return new GetFlowApproveContentByPageingResult(facis, total.value);
    }
 
    public FlowApproveContentInfo getFlowApproveContentById(String id, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new FlowApproveContentDelegate(userEnt).getFlowApproveContentById(id);
    }
 
    public boolean revokeTask(String taskName, String destActivityName, String executionId, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().revokeTask(taskName, destActivityName, executionId);
    }
 
    public boolean appointTask(String destActivityName, String tagActivityName, String[] classNames, String executionId,
            String[] userNames, Current current) throws VCIError {
        return new ProcessCustomDelegate().appointTask(destActivityName, tagActivityName, classNames, executionId,
                userNames);
    }
 
    public String getProcessVariable(String executionId, String varName, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate().getProcessVariable(executionId, varName);
    }
 
    public String[] getTasksNameByProcessName(String[] processNames, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).getTasksNameByProcessName(processNames);
    }
 
    public String searchComplateTask(String[] param, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate().searchComplateTask(param);
    }
 
    public GetTasksAssignedByPageingResult getTasksAssignedByPageing(QueryParamInfo queryParamInfo,
            UserEntityInfo userEnt, Current current) throws VCIError {
 
        LongHolder total = new LongHolder();
        TasksAssignedInfo[] tais = new ProcessCustomDelegate().getTasksAssignedByPageing(total, queryParamInfo);
 
        return new GetTasksAssignedByPageingResult(tais, total.value);
    }
 
    public boolean transmitTask(String taskId, String toUsername, UserEntityInfo userEnt, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).transmitTask(taskId, toUsername, userEnt);
    }
 
    public boolean transmitTaskByPlatform(String[] taskIds, String toUsername, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).transmitTaskByPlatform(taskIds, toUsername, userEnt);
    }
 
    public FlowTaskInfo[] getFlowTaskInfoByDataId(String dataId, String tableName, Current current) throws VCIError {
        return new ProcessCustomDelegate().getFlowTaskInfoByDataId(dataId, tableName);
    }
 
    public String getTaskId(String currActivityName, String executionId, Current current) throws VCIError {
        return new ProcessCustomDelegate().getTaskId(currActivityName, executionId);
    }
 
    public String[] getOutComesByTaskName(String jbpmDeploymentId, String taskName, Current current) throws VCIError {
        return new ProcessCustomDelegate().getOutComesByTaskName(jbpmDeploymentId, taskName);
    }
 
    public boolean moveDefinition(String deploymentId, String categoryId, Current current) throws VCIError {
        return new ProcessCustomDelegate().moveDefinition(deploymentId, categoryId);
    }
 
    public void loadWorkFlowTemplate(String jbpmDeploymentId, Current current) throws VCIError {
        new ProcessCustomDelegate().loadWorkFlowTemplate(jbpmDeploymentId);
    }
 
    /*
     * 此处做了特殊处理,针对返回一个分类下的所有工作流模板的第一个任务的执行者列表,返回的字符串格式为: pdi.jbpmDeploymentId + "=="
     * + temps[j];
     */
    public String[] getCurCandidates(String jbpmDeploymentId, String taskName, String outcome, String excutionId, Current current)
            throws VCIError {
        if (taskName.equals("") && outcome.equals(""))
            return new ProcessCustomDelegate().getFirstTasksAssigneeByCatid(jbpmDeploymentId);
        else
            return new ProcessCustomDelegate().getCurCandidates(jbpmDeploymentId, taskName, outcome, excutionId);
    }
 
    public String[] getAllCandidatesForTask(String jbpmDeploymentId, String taskName, String outcome, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getAllCandidatesForTask(jbpmDeploymentId, taskName, outcome);
    }
 
    public String[] getCurConstituents(String jbpmDeploymentId, String taskName, String outcome, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getCurConstituents(jbpmDeploymentId, taskName, outcome);
    }
 
    // public boolean startProcessInstanceByKeyForWuyuan(
    // String processDefinitionKey, FlowInstanceInfo flowInstanceInfo,
    // String[] objId, UserEntityInfo userEnt, String[] userName,
    // String outcome) throws VCIError {
    // return new
    // ProcessCustomDelegate(userEnt).startProcessInstanceByKeyForWuyuan(processDefinitionKey,
    // flowInstanceInfo, objId,userName,outcome);
    // }
 
    public String[] getsubTasks(String taskId, Current current) {
        return new ProcessCustomDelegate().getsubTasks(taskId);
    }
 
    public boolean isEndNode(String executionId, String endTaskName, Current current) {
        return new ProcessCustomDelegate().isEndNode(executionId, endTaskName);
    }
 
    public String getDeploymentID(String processDefinitionKey, Current current) {
        return new ProcessCustomDelegate().getDeploymentID(processDefinitionKey);
    }
 
    public ProcessDefinitionInfo[] getAllProcessDefinitions(Current current) throws VCIError {
        return new ProcessCustomDelegate().getAllProcessDefinitions();
    }
 
    public String getProcessName(String executionid, Current current) {
        return new ProcessCustomDelegate().getProcessName(executionid);
    }
 
    public String[] getTrainsitionUrlPath(String jbpmDeploymentId, String taskName, String trainsitionName, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getTrainsitionUrlPath(jbpmDeploymentId, taskName, trainsitionName);
    }
 
    public FlowTaskInfo[] getTodoTaskCompositorByUserId(String pluseroid, long first, long pageSize, String taskType,
            String sql, String orderStr, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).getTodoTaskCompositorByUserId(pluseroid, (int)first, (int)pageSize, taskType,
                sql, orderStr);
    }
 
    public FlowTaskInfo[] getDoneTaskCompositorByUserId(String pluseroid, long first, long pagesize, String taskType,
            String querySQL, String orderStr, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).getDoneTaskCompositorByUserId(pluseroid, (int)first, (int)pagesize, taskType,
                querySQL, orderStr);
    }
 
    public FlowTaskInfo[] getMyTrackProcessCompositorByUserId(String pluseroid, long first, long pageSize,
            UserEntityInfo userEnt, String expandSql, String orderStr, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).getMyTrackProcessCompositorByUserId(pluseroid, (int)first, (int)pageSize,
                expandSql, orderStr);
    }
 
    public String startPocessByPLM(String processDefinitionKey, FlowInstanceInfo flowInstanceInfo, String[] objId,
            UserEntityInfo userEnt, String[] userName, String outcome, String[] tasknames, String[][] taskUserNames,
            MapTransfersInfo[] mapTransfersInfos, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).startPocessByPLM(processDefinitionKey, flowInstanceInfo, objId,
                userEnt, userName, outcome, tasknames, taskUserNames, mapTransfersInfos);
    }
 
    public void setTaskAndUserForComplete(String executionid, String[] tasknames, String[][] taskUserNames,
            UserEntityInfo userEnt, Current current) throws VCIError {
        new ProcessCustomDelegate(userEnt).setTaskAndUserForComplete(executionid, tasknames, taskUserNames);
    }
 
    public String[] getFlowTaskInfoByDataIds(String[] dataIds, String tableName, Current current) throws VCIError {
        return new ProcessCustomDelegate().getFlowTaskInfoByDataIds(dataIds, tableName);
    }
 
    public FlowTaskInfo getFlowTaskInfo(String executionid, String taskid, Current current) throws VCIError {
        return new ProcessCustomDelegate().getFlowTaskInfo(executionid, taskid);
    }
 
    public String startPocessSetUserForVar(String processDefinitionKey, FlowInstanceInfo flowInstanceInfo,
            String[] objId, UserEntityInfo userEnt, String[] userName, String outcome, String[] tasknames,
            String[][] taskUserNames, String[] keys, String[] values, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).startPocessSetUser(processDefinitionKey, flowInstanceInfo, objId,
                userEnt, userName, outcome, tasknames, taskUserNames, keys, values);
    }
 
    public boolean completeTaskForVar(String taskId, String outcome, String nextTask, String approvalNote,
            UserEntityInfo userEnt, String[] userName, String[] keys, String[] values, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).completeTask(taskId, outcome, nextTask, approvalNote, userName, keys,
                values);
    }
 
    public FlowApproveHistoryInfo[] getHistoryActivityByProInsIdbyPLM(String processInstanceId, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().getHistoryActivityByProInsIdbyPLM(processInstanceId);
    }
 
    public String startPocessByPLMv1(String processDefinitionKey, FlowInstanceInfo flowInstanceInfo, String[] objId,
            UserEntityInfo userEnt, String[] userName, String outcome, String[] tasknames, String[][] taskUserNames,
            MapTransfersInfo[] mapTransfersInfos, String[] objectProperty, String[][] objectPropertyValues,
            Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).startPocessByPLM_v1(processDefinitionKey, flowInstanceInfo, objId,
                userEnt, userName, outcome, tasknames, taskUserNames, mapTransfersInfos, objectProperty,
                objectPropertyValues);
    }
 
    public boolean completeTaskByPlatformv1(String taskId, String outcome, String nextTask, String approvalNote,
            UserEntityInfo userEnt, String[] userName, String[] objectProperty, String[][] objectPropertyValues, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).completeTaskByPlatform_v1(taskId, outcome, nextTask, approvalNote,
                userEnt, userName, objectProperty, objectPropertyValues);
    }
 
    public boolean completeTasksByPlatformv1(String[] taskIds, String outcome, String nextTask, String approvalNote,
            UserEntityInfo userEnt, String[] userName, String[] objectProperty, String[][] objectPropertyValues, Current current)
            throws VCIError {
        return new ProcessCustomDelegate(userEnt).completeTasksByPlatform_v1(taskIds, outcome, nextTask, approvalNote,
                userEnt, userName, objectProperty, objectPropertyValues);
    }
 
    public String getWorkflowPropertiesValue(String key, Current current) throws VCIError {
        String result = WorkflowProperties.getStringProperty(key);
        return result;
    }
 
    public boolean appointTask2(String destActivityName, String tagActivityName, String[] classNames,
            String executionId, String[] userNames, UserEntityInfo userEnt, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).appointTask2(destActivityName, tagActivityName, classNames,
                executionId, userNames, userEnt);
    }
 
    public boolean savePlwfinstancetemplate(PlwfinstancetemplateInfo plwfinstancetemplate,
            PlwfpersonsetInfo[] plwfpersonsetList, Current current) throws VCIError {
        return new PlwfDelegate().savePlwfinstancetemplate(plwfinstancetemplate, plwfpersonsetList);
    }
 
    public PlwfinstancetemplateInfo[] getPlwfinstancetemplate(Current current) throws VCIError {
        List<PlwfinstancetemplateInfo> plwfinstancetemplateList = new PlwfDelegate().getPlwfinstancetemplate();
 
        return plwfinstancetemplateList.toArray(new PlwfinstancetemplateInfo[plwfinstancetemplateList.size()]);
    }
 
    public boolean deletePlwfinstance(PlwfinstancetemplateInfo plwfinstancetemplate, Current current) throws VCIError {
        return new PlwfDelegate().deletePlwfinstancetemplate(plwfinstancetemplate);
    }
 
    public PlwfpersonsetInfo[] getPlwfpersonset(String tid, Current current) throws VCIError {
        List<PlwfpersonsetInfo> plwfpersonsetList = new PlwfDelegate().getPlwfpersonset(tid);
        return plwfpersonsetList.toArray(new PlwfpersonsetInfo[plwfpersonsetList.size()]);
    }
 
    public boolean deletePlwfpersonset(PlwfpersonsetInfo plwfpersonset, Current current) throws VCIError {
        return new PlwfDelegate().deletePlwfpersonset(plwfpersonset);
    }
 
    public PlwfinstancetemplateInfo getPlwfinstancetemplateById(String pid, Current current) throws VCIError {
        return new PlwfDelegate().getPlwfinstancetemplateById(pid);
    }
 
    public PlwfinstancetemplateInfo[] getPlwfinstancetemplateByClassAndDefault(String plclass, String plisdefault, Current current)
            throws VCIError {
        List<PlwfinstancetemplateInfo> plwfinstancetemplateList = new PlwfDelegate()
                .getPlwfinstancetemplateByClassAndDefault(plclass, plisdefault);
 
        return plwfinstancetemplateList.toArray(new PlwfinstancetemplateInfo[plwfinstancetemplateList.size()]);
 
    }
 
    public FlowInstanceInfo[] getFlowInstancesname(String name, Current current) throws VCIError {
        return new FlowInstanceDelegate().getFlowInstancesname(name);
    }
 
    public String startProcessAndExecuteFirstNode(String processDefinitionKey, FlowInstanceInfo flowInstanceInfo,
            String[] objId, UserEntityInfo userEnt, String[] userName, String outcome, String[] tasknames,
            String[][] taskUserNames, MapTransfersInfo[] mapTransfersInfos, String[] objectProperty,
            String[][] objectPropertyValues, Current current) throws VCIError {
        return new ProcessCustomDelegate(userEnt).startProcessAndExecuteFirstNode(processDefinitionKey,
                flowInstanceInfo, objId, userEnt, userName, outcome, tasknames, taskUserNames, mapTransfersInfos,
                objectProperty, objectPropertyValues);
    }
 
    public boolean resetNodeUser(String executionId, String[] taskNames, String[] userNames, Current current)
            throws VCIError {
        return new ProcessCustomDelegate().resetNodeUser(executionId, taskNames, userNames);
    }
 
 
 
}