manualMatch.bpmn20.xml revision a60d77aaed3324cd783f4e648fedfecd54f8e551
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
xmlns:activiti="http://activiti.org/bpmn"
xsi:schemaLocation="
<process id="manualMatch" name="Manual Linking Workflow">
<startEvent id="start" />
<sequenceFlow sourceRef="start" targetRef="readUserData"/>
<scriptTask id="readUserData" scriptFormat="groovy">
<script>
correlationQueryParams = [query : [Equals: [field : 'userName',values : [sourceuser.userName]]]]
possibleTargets = ['__ignore' : 'Ignore']
for (user in results.result) {
possibleTargets.put(user.uid, user.userName + ' (' + user.uid + ' - ' + user.familyName + ', ' + user.givenName + ')')
}
</script>
</scriptTask>
<sequenceFlow sourceRef="readUserData" targetRef="matchAccounts"/>
<userTask id="matchAccounts" name="Manual Linking Task" activiti:assignee="systemadmin">
<extensionElements>
<activiti:formProperty id="_formGenerationTemplate"
type="string" default="
<style>
#targetLinking fieldset {
margin-top: 0;
}
#targetLinking .group-field {
float: left !important;
width: 100%;
}
#targetLinking .field label {
text-align: left;
}
#targetLinking .field input,#targetLinking .field select {
clear: both;
}
#targetLinking .field .validation-message {
clear: none !important;
margin-left: 20px !important;
float: left !important;
}
</style>
<h2 class="header">Source Account Details</h2>
<fieldset>
<div class="fields">
<div class="field">
<label>UserName</label>
<input type="text" value="{{variables.sourceuser.userName}}" readonly/>
</div>
<div class="field">
<label>Family Name</label>
<input type="text" value="{{variables.sourceuser.familyName}}" readonly/>
</div>
<div class="field">
<label>Given Name</label>
<input type="text" value="{{variables.sourceuser.givenName}}" readonly/>
</div>
<div class="field">
<label>Email</label>
<input type="text" value="{{variables.sourceuser.email}}" readonly/>
</div>
<div class="field">
<label>Department</label>
<input type="text" value="{{variables.sourceuser.department}}" readonly/>
</div>
<div class="field">
<label class="light">{{t "Possible targets"}}</label>
{{select variables.possibleTargets "target" "0" "" " data-validator='required' "}}
<span class="ok" style="">✔</span>
<div class="validation-message"></div>
</div>
</div>
</fieldset>
<script>
{{#if assignee}}
v.bindValidators($('#targetLinking form'), "managed/user/", function () {
v.validateAllFields($('#targetLinking form'));
});
});
{{/if}}
</script>" />
</extensionElements>
</userTask>
<sequenceFlow sourceRef="matchAccounts" targetRef="linkAccount"/>
<scriptTask id="linkAccount" scriptFormat="groovy">
<script>
if ("__ignore" != target) {
params.put('_action', 'performAction')
params.put('reconId', reconId)
params.put('mapping', mapping)
params.put('action', 'link')
params.put('sourceId', sourceId)
params.put('targetId', target)
openidm.action('sync', params)
}
</script>
</scriptTask>
<sequenceFlow sourceRef="linkAccount" targetRef="end"/>
<endEvent id="end"/>
</process>
</definitions>