forked from AOT-Technologies/forms-flow-ai-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtenantbased_taskassignment.html
33 lines (33 loc) · 1.97 KB
/
tenantbased_taskassignment.html
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
<article class="docs-article">
<section class="docs-section" id="taskvariables">
<div>
<h1 id="camunda-bpm-tenant-based-task-assignment">Camunda BPM: Tenant-based task
assignment</h1>
<hr>
<p>In a tenant-based environment, the user task is assigned to the tenant's
reviewer/approver group. An example process is provided below that demonstrates how
a user task is assigned using a process variable.</p>
<h3 id="example-process">Example process</h3>
<p>The candidateGroups attribute in the user task is associated to a process variable
using {$candidateGroup}. This allows us to let the task assignment depend on the
output of variable "candidateGroup".</p>
<p><img src="./assets/images/user-task.png" alt="User-Task - Snapshot" height="500"
width="1000"></p><br>
<p>Inline script is added to the sequence flow before the user task to determine
candidate group.</p>
<p><img src="./assets/images/task-assignment-script.png"
alt="User-Task-assignment - Snapshot" height="500" width="1000">
</p><br>
<p>The script uses the process variable "tenantKey" to determine the candidate
group.</p>
<pre><code class="hljs"> tenantKey = execution.getVariable(<span class="hljs-string">"tenantKey"</span>);
<span class="hljs-keyword">if</span> (tenantKey){
<span class="hljs-attr">candidateGroup</span> = tenantKey + <span class="hljs-string">"-formsflow-reviewer"</span>;
}
<span class="hljs-keyword">else</span>{
<span class="hljs-attr">candidateGroup</span> = <span class="hljs-string">"formsflow/formsflow-reviewer"</span>;
}
execution.setVariable(<span class="hljs-string">"candidateGroup"</span>, candidateGroup);
</code></pre>
</div>
<script>hljs.initHighlighting();</script>