Skip to content

Instantly share code, notes, and snippets.

View aviriel's full-sized avatar

Oksana Kurysheva aviriel

View GitHub Profile
var cont = site.getContainer('dataLists');
var list = cont.children[0];
var office = task.getVariableLocal('atw20_office');
var site = siteService.getSite(office);
<config evaluator="task-type" condition="atw20:approvedTask">
<forms>
<form>
<field-visibility>
<show id="atw20:office"/>
</field-visibility>
<appearance>
<set id="office"/>
<field id="atw20:office" set="office" label-id="alvex-tutorial-workflow.label.office" mandatory="true">
<control template="/office-site-chooser.ftl"/>
<property name="atw20:office">
<type>d:text</type>
</property>
var site = siteService.getSite('Имя_сайта');
for each(document in bpm_package.children) {
newtitle = document.properties["cm:title"] + " (в обработке)";
document.properties["cm:title"] = newtitle;
document.save();
}
if(task.getVariableLocal('atw20_reviewOutcome') == 'Approve') {
var newApprovedCount = atw20_approveCount + 1;
execution.setVariable('atw20_approveCount', newApprovedCount);
}
var userName = reviewer.properties.firstName + ' ' + reviewer.properties.lastName;
var comments = execution.getVariable('atw20_comments_global');
var new_comment = new String( task.getVariableLocal('bpm_comment') );
comments += ",{" + userName + "|"
+ task.getVariableLocal('atw20_reviewOutcome')
+ "|" + new_comment + "}";
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 7);
task.dueDate = futureDate;
if (bpm_workflowDueDate != undefined)
task.dueDate = bpm_workflowDueDate;
execution.setVariable('atw20_comments_global', "");
execution.setVariable('atw20_approveCount', 0);>