Example: Workload assignment for a unit of work when multiple workloads exist
The example in this topic shows how the data server performs workload evaluation to assign the connection to an existing workload.
Evaluation order | Workload name | APPLNAME | SYSTEM
_USER |
SESSION
_USER |
SESSION
_USER GROUP |
SESSION
_USER ROLE |
CURRENT
CLIENT _USERID |
CURRENT
CLIENT _APPLNAME |
CURRENT
CLIENT _WRKSTNNAME |
CURRENT
CLIENT _ACCTNG |
---|---|---|---|---|---|---|---|---|---|---|
1 | EXPENSE REPORT | AppB | TIM | EXPENSE APPROVER | ||||||
2 | REPORTS | AppB | ||||||||
3 | INVENTORYREPORT | AppA | LYNN | ACCOUNTING | TELEMKTR | |||||
4 | SALES REPORT | AppC | KATE | KATE | SALESREP | |||||
5 | AUDIT REPORT | AppA | ACCOUNTING | FINANALYST | ||||||
6 | AUDIT RESULT | LYNN | LYNN | Audit Group |
APPLNAME | SYSTEM
_USER |
SESSION
_USER |
SESSION
_USER GROUP |
SESSION
_USER ROLE |
CURRENT
CLIENT _USERID |
CURRENT
CLIENT _APPLNAME |
CURRENT
CLIENT _WRKSTNNAME |
CURRENT
CLIENT _ACCTNG |
---|---|---|---|---|---|---|---|---|
AppA | LYNN | LYNN | ACCOUNTING | FINANALYST, SALESREP | LYNN | NULL | wrkstn2 | Audit group |
When the first unit of work is submitted, the data server checks each workload in the catalog in ascending evaluation order and stops when it finds a workload whose connection attributes match those supplied by the connection. When it checks the workloads, the data server compares the connection attributes in deterministic order.
Evaluation order | Workload name | APPLNAME | SYSTEM
_USER |
SESSION
_USER |
SESSION
_USER GROUP |
SESSION
_USER ROLE |
CURRENT
CLIENT _USERID |
CURRENT
CLIENT _APPLNAME |
CURRENT
CLIENT _WRKSTNNAME |
CURRENT
CLIENT _ACCTNG |
---|---|---|---|---|---|---|---|---|---|---|
1 | EXPENSEREPORT | AppB | TIM | EXPENSE APPROVER |
AppB
but
the APPLNAME attribute passed by the connection is AppA
,
no match is possible. The data server proceeds to the REPORTS workload,
which is second in the list:
Evaluation order | Workload name | APPLNAME | SYSTEM
_USER |
SESSION
_USER |
SESSION
_USER GROUP |
SESSION
_USER ROLE |
CURRENT
CLIENT _USERID |
CURRENT
CLIENT _APPLNAME |
CURRENT
CLIENT _WRKSTNNAME |
CURRENT
CLIENT _ACCTNG |
---|---|---|---|---|---|---|---|---|---|---|
2 | REPORTS | AppB |
AppB
,
which does not match AppA
. The data server proceeds
to the third workload in the list, INVENTORYREPORT:
Evaluation order | Workload name | APPLNAME | SYSTEM
_USER |
SESSION
_USER |
SESSION
_USER GROUP |
SESSION
_USER ROLE |
CURRENT
CLIENT _USERID |
CURRENT
CLIENT _APPLNAME |
CURRENT
CLIENT _WRKSTNNAME |
CURRENT
CLIENT _ACCTNG |
---|---|---|---|---|---|---|---|---|---|---|
3 | INVENTORYREPORT | AppA | LYNN | ACCOUNTING | TELEMKTR |
- APPLNAME. Both the workload definition and the connection have
a value of
AppA
, so a match occurs. - SYSTEM_USER. Both the workload definition and the connection have
a value of
LYNN
, so a match occurs. - SESSION_USER. The connection passed a value of
LYNN
. Because the SESSION_USER attribute is not set for the workload, any value, including a null value, that is passed by the connection matches. - SESSION_USER GROUP. Both the workload definition and the connection
have a value of
ACCOUNTING
, so a match occurs. - SESSION_USER ROLE. The workload definition specifies the value
TELEMKTR
, but the connection supplied the values ofFINANALYST
andSALESREP
. No match occurs for this attribute.
Evaluation order | Workload name | APPLNAME | SYSTEM
_USER |
SESSION
_USER |
SESSION
_USER GROUP |
SESSION
_USER ROLE |
CURRENT
CLIENT _USERID |
CURRENT
CLIENT _APPLNAME |
CURRENT
CLIENT _WRKSTNNAME |
CURRENT
CLIENT _ACCTNG |
---|---|---|---|---|---|---|---|---|---|---|
4 | SALESREPORT | AppC | KATE | KATE | SALESREP |
AppC
,
no match occurs with the connection (which passed a value of AppA
for
APPLNAME). The data server then proceeds to the fifth workload in
the list, AUDITREPORT:
Evaluation order | Workload name | APPLNAME | SYSTEM
_USER |
SESSION
_USER |
SESSION
_USER GROUP |
SESSION
_USER ROLE |
CURRENT
CLIENT _USERID |
CURRENT
CLIENT _APPLNAME |
CURRENT
CLIENT _WRKSTNNAME |
CURRENT
CLIENT _ACCTNG |
---|---|---|---|---|---|---|---|---|---|---|
5 | AUDITREPORT | AppA | ACCOUNTING | FINANALYST |
- APPLNAME. Both the workload definition and the connection have
a value of
AppA
, so a match occurs. - SYSTEM_USER. The connection passed a value of
LYNN
. Because the SYSTEM_USER attribute is not set for the workload, any value passed by the connection matches. - SESSION_USER. The connection passed a value of
LYNN
. Because the SESSION_USER attribute is not set for the workload, any value passed by the connection matches. - SESSION_USER GROUP. Both the workload and the connection have
a value of
ACCOUNTING
for this attribute, so a match occurs. - SESSION_USER ROLE. Both the workload and the connection have a
value of
FINANALYST
for this attribute, so a match occurs. - CURRENT CLIENT_USERID. Because the CURRENT CLIENT_USERID attribute is not set for the workload, any value passed by the connection matches.
- CURRENT CLIENT_APPLNAME. Because the CURRENT CLIENT_APPLNAME attribute is not set for the workload, any value passed by the connection matches.
- CURRENT CLIENT_WRKSTNNAME. Because the CURRENT CLIENT_WRKSTNNAME attribute is not set for the workload, any value passed by the connection matches.
- CURRENT CLIENT_ACCTNG. Because the CURRENT CLIENT_ACCTNG attribute is not set for the workload, any value passed by the connection matches.
LYNN
does
not have the USAGE privilege on the AUDITREPORT workload. In this
situation, although all of the connection attributes match, this workload
is not associated with the connection. The data server proceeds to
the sixth workload in the evaluation list, AUDITRESULT:
Evaluation order | Workload name | APPLNAME | SYSTEM
_USER |
SESSION
_USER |
SESSION
_USER GROUP |
SESSION
_USER ROLE |
CURRENT
CLIENT _USERID |
CURRENT
CLIENT _APPLNAME |
CURRENT
CLIENT _WRKSTNNAME |
CURRENT
CLIENT _ACCTNG |
---|---|---|---|---|---|---|---|---|---|---|
6 | AUDITRESULT | LYNN | LYNN | Audit Group |
- APPLNAME. Because the APPLNAME attribute is not set for the workload, any value passed by the connection matches.
- SYSTEM_USER. Because the SYSTEM_USER attribute is not set for the workload, any value passed by the connection matches.
- SESSION_USER. Both the workload and the connection have a value
of
LYNN
for this attribute, so a match occurs. - SESSION_USER GROUP. Because the SESSION_USER GROUP attribute is not set for the workload, any value passed by the connection matches.
- SESSION_USER ROLE. Because the SESSION_USER ROLE attribute is not set for the workload, any value passed by the connection matches.
- CURRENT CLIENT_USERID. Both the workload and the connection have
a value of
LYNN
for this attribute, so a match occurs. - CURRENT CLIENT_APPLNAME. Because the CURRENT CLIENT_APPLNAME attribute is not set for the workload, any value passed by the connection matches.
- CURRENT CLIENT_WRKSTNNAME. Because the CURRENT CLIENT_WRKSTNNAME attribute is not set for the workload, any value passed by the connection matches.
- CURRENT CLIENT_ACCTNG. Both the workload and the connection have
a value of
Audit Group
for this attribute, so a match occurs.
After processing all of the connection attributes and finding a
matching workload, the data server checks whether the session user
has the USAGE privilege on the workload. In this situation, assume
that the session user LYNN
has the USAGE privilege
on the AUDITRESULT workload. Because all of the connection attributes
match and the session user has the USAGE privilege, the connection
is assigned to the AUDITRESULT workload.