/
processView.jsp
executable file
·563 lines (514 loc) · 36.9 KB
/
processView.jsp
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
<%@page import="org.joget.workflow.util.WorkflowUtil"%>
<%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
<commons:header />
<jsp:include page="/WEB-INF/jsp/includes/scripts.jsp" />
<div id="nav">
<div id="nav-title">
<jsp:include page="appTitle.jsp" flush="true" />
</div>
<div id="nav-body">
<ul id="nav-list">
<jsp:include page="appSubMenu.jsp" flush="true" />
</ul>
</div>
</div>
<div id="main">
<div id="main-title"></div>
<div id="main-action">
<span id="main-action-help"></span>
<ul id="main-action-buttons">
<li><button onclick="launchDesigner()"><fmt:message key="console.process.config.label.launchDesigner"/></button></li>
<li><button onclick="uploadPackage()"><fmt:message key="console.process.config.label.updateProcess"/></button></li>
<li><button onclick="runProcess()"><fmt:message key="console.process.config.label.startProcess"/></button></li>
</ul>
</div>
<div id="main-body">
<p><font class="ftl_label"><fmt:message key="console.app.process.common.label.name"/>:</font> <strong>${process.name} </strong></p>
<div id="main-body-content">
<div id="xpdlThumbnailLoading">
<img src="${pageContext.request.contextPath}/images/v3/loading.gif">
<fmt:message key="console.process.config.label.xpdlThumbnailLoading"/>
</div>
<div id="thumbnailDiv" style="display:block; overflow:hidden">
<a id="xpdlThumbnail" href="${pageContext.request.contextPath}/web/images/xpdl/${process.encodedId}" target="_blank"></a>
</div>
<div id="advancedView" style="display: none">
<dl>
<dt><fmt:message key="console.app.package.common.label.id"/></dt>
<dd>${process.packageId} </dd>
<dt><fmt:message key="console.app.process.common.label.definitionId"/></dt>
<dd>${process.id} </dd>
<dt><fmt:message key="console.app.process.common.label.description"/></dt>
<dd>${process.description} </dd>
<dt><fmt:message key="console.process.config.label.linkToRunProcess"/></dt>
<dd>${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/web/client/app/${appId}/${appVersion}/process/${processIdWithoutVersion}/start</dd>
</dl>
</div>
<div class="form-buttons">
<a href="#" id="showAdvancedInfo" onclick="showAdvancedInfo();return false"><fmt:message key="general.method.label.showAdditionalInfo"/></a>
<a href="#" style="display: none" id="hideAdvancedInfo" onclick="hideAdvancedInfo();return false"><fmt:message key="general.method.label.hideAdditionalInfo"/></a>
</div>
<div id="processTabView" style="min-height: 200px">
<ul>
<li class="selected"><a href="#participantList"><span><fmt:message key="console.process.config.label.mapParticipants"/></span></a></li>
<li><a href="#activityList"><span><fmt:message key="console.process.config.label.mapActivities"/></span></a></li>
<li><a href="#toolList"><span><fmt:message key="console.process.config.label.mapTools"/></span></a></li>
<li><a href="#variableList"><span><fmt:message key="console.process.config.label.variableList"/></span></a></li>
</ul>
<br><br>
<div>
<div id="participantList">
<div class="tabSummary"><fmt:message key="console.process.config.label.mapParticipants.description"/></div>
<c:forEach var="participant" items="${participantList}" varStatus="rowCounter">
<c:set var="participantUid" value="${processIdWithoutVersion}::${participant.id}"/>
<c:choose>
<c:when test="${rowCounter.last}">
<c:set var="rowStyle" scope="page" value="special"/>
</c:when>
<c:when test="${rowCounter.count % 2 == 0}">
<c:set var="rowStyle" scope="page" value="even"/>
</c:when>
<c:otherwise>
<c:set var="rowStyle" scope="page" value="odd"/>
</c:otherwise>
</c:choose>
<div class="main-body-row ${rowStyle}">
<span class="row-content" helpTitle="|||<fmt:message key="console.process.config.label.id"/>: ${participant.id}">
${participant.name}
</span>
<span class="row-content id">
<font class="ftl_label"><fmt:message key="console.process.config.label.id"/> :</font> ${participant.id}
</span>
<span class="row-button">
<input type="button" value="<fmt:message key="console.process.config.label.mapParticipants.addEditMapping"/>" onclick="addEditParticipant('${participant.id}')"/>
</span>
<div style="clear: both; padding-left: 1em; padding-top: 0.5em;">
<div id="participant_${participant.id}" style="padding-left: 1em; padding-top: 0.5em;">
<c:if test="${!empty participantMap[participantUid]}">
<dl>
<dt><fmt:message key="console.process.config.label.mapParticipants.type"/></dt>
<dd><fmt:message key="console.process.config.label.mapParticipants.type.${participantMap[participantUid].type}"/></dd>
<dt><fmt:message key="console.process.config.label.mapParticipants.value"/></dt>
<dd>
<c:choose>
<c:when test="${participantMap[participantUid].type eq 'user' || participantMap[participantUid].type eq 'group'}">
<c:forEach var="participantValue" items="${fn:split(participantMap[participantUid].value, ',')}" varStatus="status">
<span class="participant-remove">
<c:if test="${!(status.last && status.index eq 0)}">
<a onClick="participantRemoveMappingSingle(this, '${participantMap[participantUid].type}','${participant.id}','${participantValue}')"> <img src="${pageContext.request.contextPath}/images/v3/cross-circle.png"/></a>
</c:if>
<c:choose>
<c:when test="${participantMap[participantUid].type eq 'user'}">
<c:set var="participantDisplayName" value="${usersMap[participantValue].username}"/>
</c:when>
<c:otherwise>
<c:set var="participantDisplayName" value="${groupsMap[participantValue].name}"/>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${!isExtDirectoryManager}">
${participantDisplayName}
</c:when>
<c:otherwise>
<a href="${pageContext.request.contextPath}/web/console/directory/${participantMap[participantUid].type}/view/${participantValue}">${participantDisplayName}</a>
</c:otherwise>
</c:choose>
</span>
</c:forEach>
</c:when>
<c:when test="${participantMap[participantUid].type eq 'hod' || participantMap[participantUid].type eq 'department'}">
<c:set var="participantDisplayName" value="${departmentsMap[participantMap[participantUid].value].name}"/>
<a href="${pageContext.request.contextPath}/web/console/directory/dept/view/${participantMap[participantUid].value}">${participantDisplayName}</a>
</c:when>
<c:when test="${participantMap[participantUid].type eq 'workflowVariable'}">
<font class="ftl_label"><fmt:message key="console.app.process.common.label.variableId"/> :</font> <c:out value="${fn:substring(participantMap[participantUid].value, 0, fn:indexOf(participantMap[participantUid].value, ','))}"/><br/>
<fmt:message key="console.process.config.label.mapParticipants.variable.${fn:substring(participantMap[participantUid].value, fn:indexOf(participantMap[participantUid].value, ',')+1, -1)}"/>
</c:when>
<c:when test="${participantMap[participantUid].type eq 'requester' || participantMap[participantUid].type eq 'requesterHod' || participantMap[participantUid].type eq 'requesterSubordinates' || participantMap[participantUid].type eq 'requesterDepartment'}">
<c:choose>
<c:when test="${participantMap[participantUid].value ne ''}">
<font class="ftl_label"><fmt:message key="console.app.activity.common.label.definitionId"/> :</font>
<a href="${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/processes/${process.encodedId}?tab=activityList&activityDefId=${participantMap[participantUid].value}">${participantMap[participantUid].value}</a>
</c:when>
<c:otherwise>
<fmt:message key="console.process.config.label.mapParticipants.previousActivity"/>
</c:otherwise>
</c:choose>
</c:when>
<c:when test="${participantMap[participantUid].type eq 'plugin'}">
${participantPluginMap[participantMap[participantUid].value].name} (<fmt:message key="console.plugin.label.version"/> ${participantPluginMap[participantMap[participantUid].value].version})
</c:when>
<c:otherwise>
${participantMap[participantUid].value}
</c:otherwise>
</c:choose>
</dd>
<dt> </dt>
<dd>
<div>
<input type="button" class="smallbutton" value="<fmt:message key="console.process.config.label.mapParticipants.removeMapping"/>" onclick="participantRemoveMapping('${participant.id}')"/>
<c:if test="${participantMap[participantUid].type eq 'plugin'}">
<input type="button" class="smallbutton" value="<fmt:message key="general.method.label.configPlugin"/>" onclick="participantConfigurePlugin('${participant.id}')"/>
</c:if>
</div>
</dd>
</dl>
</c:if>
</div>
</div>
</div>
</c:forEach>
</div>
<div id="activityList" style="height_: 300px; overflow-y_: scroll">
<div class="tabSummary"><fmt:message key="console.process.config.label.mapActivities.description"/></div>
<c:forEach var="activity" items="${activityList}" varStatus="rowCounter">
<c:set var="activityUid" value="${processIdWithoutVersion}::${activity.id}"/>
<c:if test="${activity.type == 'normal'}">
<c:choose>
<c:when test="${rowCounter.last}">
<c:set var="rowStyle" scope="page" value="special"/>
</c:when>
<c:when test="${rowCounter.count % 2 == 0}">
<c:set var="rowStyle" scope="page" value="even"/>
</c:when>
<c:otherwise>
<c:set var="rowStyle" scope="page" value="odd"/>
</c:otherwise>
</c:choose>
<div class="main-body-row ${rowStyle}" style="min-height: 50px">
<span class="row-content" helpTitle="|||<fmt:message key="console.process.config.label.id"/>: ${activity.id}">
<c:set var="activityDisplayName" value="${activity.name}"/>
<c:if test="${empty activity.name}">
<c:set var="activityDisplayName" value="${activity.id}"/>
</c:if>
${activityDisplayName} <c:if test="${activity.type ne 'normal'}">(${activity.type})</c:if>
</span>
<span class="row-content id">
<font class="ftl_label"><fmt:message key="console.process.config.label.id"/> :</font> ${activity.id}
</span>
<span class="row-button">
<input type="button" value="<fmt:message key="console.process.config.label.mapActivities.addEditFormMapping"/>" onclick="addEditForm('${activity.id}')"/>
</span>
<div style="clear: both; padding-left: 1em; padding-top: 0.5em;">
<div id="activityForm_${activity.id}" style="padding-left: 1em; padding-top: 0.5em;">
<c:set var="activityForm" value="${activityFormMap[activityUid]}"/>
<c:set var="form" value="${formMap[activityUid]}"/>
<c:if test="${!empty activityForm && form != null}">
<dl>
<dt><fmt:message key="console.form.common.label.name"/></dt>
<dd><a href="#" onclick="launchFormBuilder('${form.id}');return false;">${form.name}</a></dd>
<dt> </dt>
<dd><div><input type="button" class="smallbutton" value="<fmt:message key="console.process.config.label.mapActivities.removeMapping"/>" onclick="activityRemoveForm('${activity.id}')"/></div></dd>
</dl>
</c:if>
<c:if test="${!empty activityForm && activityForm.type == 'EXTERNAL'}">
<dl>
<dt><fmt:message key="console.process.config.label.mapActivities.formExternal"/></dt>
<dd><a target="_blank" href="${activityForm.formUrl}">${activityForm.formUrl}</a></dd>
<dt> </dt>
<dd><div><input type="button" class="smallbutton" value="<fmt:message key="console.process.config.label.mapActivities.removeMapping"/>" onclick="activityRemoveForm('${activity.id}')"/></div></dd>
</dl>
</c:if>
</div>
<dl>
<dt> </dt>
<c:set var="showNext" value=""/>
<c:if test="${!empty activityForm && activityForm.autoContinue}">
<c:set var="showNext" value="checked"/>
</c:if>
<dd><input type="checkbox" name="showNextAssigment" ${showNext} onchange="toggleContinueNextAssignment('${processIdWithoutVersion}','${activity.id}', this)"> <fmt:message key="console.process.config.label.mapActivities.showContinueAssignment"/></dd>
</dl>
</div>
</div>
</c:if>
</c:forEach>
</div>
<div id="toolList" style="height_: 300px; overflow-y_: scroll">
<div class="tabSummary"><fmt:message key="console.process.config.label.mapTools.description"/></div>
<c:forEach var="activity" items="${activityList}" varStatus="rowCounter">
<c:set var="activityUid" value="${processIdWithoutVersion}::${activity.id}"/>
<c:if test="${activity.type == 'tool'}">
<c:choose>
<c:when test="${rowCounter.count % 2 == 0}">
<c:set var="rowStyle" scope="page" value="even"/>
</c:when>
<c:otherwise>
<c:set var="rowStyle" scope="page" value="odd"/>
</c:otherwise>
</c:choose>
<div class="main-body-row ${rowStyle}" style="min-height: 50px">
<span class="row-content" helpTitle="|||<fmt:message key="console.process.config.label.id"/>: ${activity.id}">
<c:set var="activityDisplayName" value="${activity.name}"/>
<c:if test="${empty activity.name}">
<c:set var="activityDisplayName" value="${activity.id}"/>
</c:if>
${activityDisplayName}
</span>
<span class="row-content id">
<font class="ftl_label"><fmt:message key="console.process.config.label.id"/> :</font> ${activity.id}
</span>
<span class="row-button">
<input type="button" value="<fmt:message key="console.process.config.label.mapTools.addEditMapping"/>" onclick="addEditPlugin('${activity.id}')"/>
</span>
<div style="clear: both; padding-left: 1em; padding-top: 0.5em;">
<div id="activityForm_${activity.id}" style="padding-left: 1em; padding-top: 0.5em;">
<c:set var="plugin" value="${pluginMap[activityUid]}"/>
<c:if test="${plugin ne null}">
<dl>
<dt><fmt:message key="console.plugin.label.name"/></dt>
<dd>${plugin.name} </dd>
<dt><fmt:message key="console.plugin.label.version"/></dt>
<dd>${plugin.version} </dd>
<dt> </dt>
<dd>
<div>
<input type="button" class="smallbutton" value="<fmt:message key="console.process.config.label.mapTools.removePlugin"/>" onclick="activityRemovePlugin('${activity.id}')"/>
<input type="button" class="smallbutton" value="<fmt:message key="general.method.label.configPlugin"/>" onclick="activityConfigurePlugin('${activity.id}')"/>
</div>
</dd>
</dl>
</c:if>
</div>
</div>
</div>
</c:if>
</c:forEach>
</div>
<div id="variableList">
<div class="tabSummary"><fmt:message key="console.process.config.label.variableList.description"/></div>
<c:forEach var="variable" items="${variableList}" varStatus="rowCounter">
<c:choose>
<c:when test="${rowCounter.count % 2 == 0}">
<c:set var="rowStyle" scope="page" value="even"/>
</c:when>
<c:otherwise>
<c:set var="rowStyle" scope="page" value="odd"/>
</c:otherwise>
</c:choose>
<div class="main-body-row ${rowStyle}" style="min-height: 50px">
<span class="row-content">
${variable.id}<br>
</span>
</div>
</c:forEach>
</div>
</div>
</div>
</div>
<div style="display:none">
<div id="updateInformation" >
<div style="height: 100px; width: 500px; margin:0" class="dialog">
<p>
<fmt:message key="console.process.config.label.update.message"/>
</p>
<div style="text-align:center">
<button onclick="window.location.reload(true)"><fmt:message key="general.method.label.ok"/></button>
<button id="closeInfo"><fmt:message key="general.method.label.cancel"/></button>
</div>
</div>
</div>
</div>
<script>
var image = new Image();
image.src = "${pageContext.request.contextPath}/web/images/xpdl/${process.encodedId}?rnd=" + new Date().valueOf().toString();
$(image).load(function(){
$('#xpdlThumbnail').append(image);
$(image).each(function() {
var maxWidth = 600; // Max width for the image
var maxHeight = 250; // Max height for the image
var ratio = 0; // Used for aspect ratio
var width = $(this).width(); // Current image width
var height = $(this).height(); // Current image height
// Check if the current width is larger than the max
if(width > maxWidth){
ratio = maxWidth / width; // get ratio for scaling image
$(this).css("width", maxWidth); // Set new width
$(this).css("height", height * ratio); // Scale height based on ratio
height = height * ratio; // Reset height to match scaled image
width = width * ratio; // Reset width to match scaled image
}
// Check if current height is larger than max
if(height > maxHeight){
ratio = maxHeight / height; // get ratio for scaling image
$(this).css("height", maxHeight); // Set new height
$(this).css("width", width * ratio); // Scale width based on ratio
width = width * ratio; // Reset width to match scaled image
}
});
$('#xpdlThumbnailLoading').hide();
});
$(document).ready(function() {
/*$('span.row-content[@helpTitle]').cluetip({
splitTitle: '|||',
showTitle: false,
arrows: true,
positionBy: 'mouse',
dropShadow: false,
hoverIntent: false,
sticky: true,
mouseOutClose: true,
closePosition: 'title'}
);*/
<c:if test="${!empty param.activityDefId}">
setTimeout(function() {
var topy = $("#activityForm_${param.activityDefId}").offset().top - 100;
topy = parseInt(topy);
window.scrollTo(0, topy);
}, 100);
</c:if>
<c:if test="${!empty param.participantId}">
setTimeout(function() {
var topy = $("#participant_${param.participantId}").offset().top - 100;
topy = parseInt(topy);
window.scrollTo(0, topy);
}, 100);
</c:if>
});
var tabView = new TabView('processTabView', 'top');
tabView.init();
<c:if test="${!empty param.tab}">
tabView.select('#${param.tab}');
</c:if>
<ui:popupdialog var="popupDialog" src="${pageContext.request.contextPath}/web/form/edit/${form.id}"/>
var reloadCallback = {
success: function(data){
if (data && data.length > 0) {
$("#" + data).css("display", "none");
return;
}
//get current selected tab
var selectedTabId = $('#processTabView .ui-tabs-selected a').attr('href');
selectedTabId = selectedTabId.replace('#', '');
var urlQueryString = document.location.search;
if(urlQueryString == ''){
document.location.href = document.location.href + "?tab=" + selectedTabId;
}else{
if(urlQueryString.indexOf('tab') == -1){
document.location.href = document.location.href + "&tab=" + selectedTabId;
}else{
document.location.href = document.location.href.replace(urlQueryString, '') + "?tab=" + selectedTabId;
}
}
}
}
function closeDialog() {
popupDialog.close();
}
function uploadPackage(){
popupDialog.src = "${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/package/upload";
popupDialog.init();
}
function launchDesigner(){
$("#updateInformation").dialog({modal:true, height:150, width:550, resizable:false, show: 'slide',overlay: {opacity: 0.5, background: "black"},zIndex: 15001});
$("#closeInfo").click(function(){$("#updateInformation").dialog("close")});
<%
String designerwebBaseUrl = "http://" + pageContext.getRequest().getServerName() + ":" + pageContext.getRequest().getServerPort();
if (WorkflowUtil.getSystemSetupValue("designerwebBaseUrl") != null && WorkflowUtil.getSystemSetupValue("designerwebBaseUrl").length() > 0) {
designerwebBaseUrl = WorkflowUtil.getSystemSetupValue("designerwebBaseUrl");
}
if (designerwebBaseUrl.endsWith("/")) {
designerwebBaseUrl = designerwebBaseUrl.substring(0, designerwebBaseUrl.length() - 1);
}
String locale = "en";
if (WorkflowUtil.getSystemSetupValue("systemLocale") != null && WorkflowUtil.getSystemSetupValue("systemLocale").length() > 0) {
locale = WorkflowUtil.getSystemSetupValue("systemLocale");
}
%>
var base = 'http://${pageContext.request.serverName}:${pageContext.request.serverPort}';
var url = base + "${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/package/xpdl";
var path = base + '${pageContext.request.contextPath}';
document.location = '<%= designerwebBaseUrl%>/jwdesigner/designer/webstart.jsp?url=' + encodeURIComponent(url) + '&path=' + encodeURIComponent(path) + '&appId=${appId}&appVersion=${appVersion}&locale=<%= locale%>&username=${username}&hash=${loginHash}';
}
function launchFormBuilder(formId) {
window.open("${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/form/builder/" + formId);
}
function runProcess() {
var url = "${pageContext.request.contextPath}/web/client/app/${appId}/${appVersion}/process/${processIdWithoutVersion}";
popupDialog.src = url;
popupDialog.init();
// window.open(url, "_blank", "");
}
function addEditForm(activityId){
popupDialog.src = "${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/processes/${process.encodedId}/activity/" + escape(activityId) + "/form";
popupDialog.init();
}
function addEditPlugin(activityId){
popupDialog.src = "${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/processes/${process.encodedId}/activity/" + escape(activityId) + "/plugin";
popupDialog.init();
}
function addEditParticipant(participantId){
popupDialog.src = "${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/processes/${process.encodedId}/participant/" + participantId;
popupDialog.init();
}
function activityRemoveForm(activityId){
if (confirm("<fmt:message key="console.process.config.label.mapActivities.removeMapping.confirm"/>")) {
var url = "${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/processes/${process.encodedId}/activity/" + escape(activityId) + "/form/remove";
ConnectionManager.post(url, reloadCallback);
}
}
function activityRemovePlugin(activityId){
if (confirm("<fmt:message key="console.process.config.label.mapTools.removePlugin.confirm"/>")) {
var url = "${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/processes/${process.encodedId}/activity/" + escape(activityId) + "/plugin/remove";
ConnectionManager.post(url, reloadCallback);
}
}
function activityConfigurePlugin(activityId){
popupDialog.src = "${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/processes/${process.encodedId}/activity/" + escape(activityId) + "/plugin/configure";
popupDialog.init();
}
function participantRemoveMapping(participantId){
var removeItem = {
success : function(response) {
$('#participant_'+participantId).html('');
}
}
if (confirm("<fmt:message key="console.process.config.label.mapParticipants.removeMapping.confirm"/>")) {
ConnectionManager.post('${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/processes/${process.encodedId}/participant/' + participantId + '/remove', removeItem, '');
}
}
function participantRemoveMappingSingle(obj, type, participantId, value){
var removeItem = {
success : function(response) {
$(obj).parent().hide('slow');
if($(obj).parent().parent().find('.participant-remove:visible').length == 2){
$(obj).parent().parent().find('.participant-remove:visible').find('img').remove();
}
}
}
if (confirm("<fmt:message key="console.process.config.label.mapParticipants.removeMapping.confirm"/>")) {
ConnectionManager.post('${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/processes/${process.encodedId}/participant/' + participantId + '/remove', removeItem, 'type='+type+'&value='+value);
}
}
function participantConfigurePlugin(participantId){
popupDialog.src = '${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/processes/${process.encodedId}/participant/'+participantId+'/plugin/configure';
popupDialog.init();
}
function showAdvancedInfo(){
$('#advancedView').slideToggle('slow');
$('#showAdvancedInfo').hide();
$('#hideAdvancedInfo').show();
}
function hideAdvancedInfo(){
$('#advancedView').slideToggle('slow');
$('#showAdvancedInfo').show();
$('#hideAdvancedInfo').hide();
}
function showXpdlImage(){
popupDialog.src = "${pageContext.request.contextPath}/web/images/xpdl/${process.encodedId}";
popupDialog.init();
}
var autoCallback = {
success: function() {
// do nothing
}
}
function toggleContinueNextAssignment(processDefId, activityDefId, checkbox){
var params = "auto="+$(checkbox).attr('checked');
ConnectionManager.post('${pageContext.request.contextPath}/web/console/app/${appId}/${appVersion}/processes/' + processDefId + '/activity/' + activityDefId + '/continue', autoCallback, params);
}
</script>
</div>
<script>
Template.init("#menu-apps", "#nav-app-processes");
</script>
<commons:footer />