Skip to content

Instantly share code, notes, and snippets.

View aviriel's full-sized avatar

Oksana Kurysheva aviriel

View GitHub Profile
// Get office site name and container with registries, change the name of the site to yours
var site = siteService.getSite('office');
var cont = site.getContainer('dataLists');
// Print titles for all registries
for each( list in cont.children )
print( list.properties.title );
// Get office site name and container with registries, change the name of the site to yours
var site = siteService.getSite('office');
var cont = site.getContainer('dataLists');
// Specify source registry (srcList) and target registry (dstList), select the number of the registry looking at the output of the last script (numbering starts with 0)
var srcList = cont.children[0];
var dstList = cont.children[1];
// Print selected registries names. srcList is a registry of alvexdt:agreement type, dstList is a registry of alvexcourse_docs:document_partner_agreement type
print( "Source: " + srcList.properties.title );
// Get office site name and container with registries, change the name of the site to yours
var site = siteService.getSite('office');
var cont = site.getContainer('dataLists');
// Specify source registry (srcList) and target registry (dstList), select the number of the registry looking at the output of the last script (numbering starts with 0)
var srcList = cont.children[0];
var dstList = cont.children[1];
// Copy all documents from srcList to dstList
for each( item in srcList.children )
<type name="alvexcourse:approveTask">
<parent>bpm:workflowTask</parent>
</type>
<type name="alvexcourse:approveTask">
<!-- Заменяем родителя нашего типа задачи с bpm:workflowTask на bpm:activitiOutcomeTask -->
<parent>bpm:activitiOutcomeTask</parent>
<!-- Создаем новое свойство, накладывая на него ограничение со списком допустимых результатов выполнения задачи -->
<properties>
<property name="alvexcourse:okOutcome">
<type>d:text</type>
<default>OK</default>
<constraints>
<constraint type="LIST" name="alvexcourse:okOutcomeConstraint">
listconstraint.alvexcourse_okOutcomeConstraint.OK = Approve document
listconstraint.alvexcourse_okOutcomeConstraint.OK = Согласовать документ
<show id="alvexcourse:okOutcome" />
<field id="alvexcourse:okOutcome" set="response">
<control template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl" />
</field>
workflowtask.outcome.OK = Document approved