Example: Workload assignment when workload attributes have multiple values
The example in this topic shows how the data server performs workload assignment. In this example, some of the workload definitions permit more than one value for a connection attribute.
Evaluation order | Workload name
|
APPLNAME | SYSTEM
_USER |
SESSION
_USER |
SESSION
_USER GROUP |
SESSION
_USER ROLE |
CURRENT
CLIENT _USERID |
CURRENT
CLIENT _APPLNAME |
CURREN
CLIENT _WRKSTNNAME |
CURRENT
CLIENT _ACCTNG |
---|---|---|---|---|---|---|---|---|---|---|
1 | ITEMINQ | KYLE, GEORGE | RETAIL, SALES | |||||||
2 | DAILY TRANS REPORT | AppC | KYLE, CAROL | SALES, ACCOUNTING | ||||||
3 | SALES SUMMARY | AppA, AppB | ACCOUNTANT, FINANALYST |
APPLNAME | SYSTEM
_USER |
SESSION
_USER |
SESSION
_USER GROUP |
SESSION
_USER ROLE |
CURRENT
CLIENT _USERID |
CURRENT
CLIENT _APPLNAME |
CURREN
CLIENT _WRKSTNNAME |
CURRENT
CLIENT _ACCTNG |
---|---|---|---|---|---|---|---|---|
AppC | LINDA | KYLE | SALES | ACCOUNTANT | LINDA | NULL | NULL | Business Account |
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 |
CURREN
CLIENT _WRKSTNNAME |
CURRENT
CLIENT _ACCTNG |
---|---|---|---|---|---|---|---|---|---|---|
1 | ITEMINQ | KYLE, GEORGE | RETAIL, SALES |
- APPLNAME. Because the APPLNAME attribute is not set for the workload, any value, including a null value, that is passed by the connection matches.
- SYSTEM_USER. The connection passed a value of
LINDA
. However, the ITEMNO workload values areKYLE
andGEORGE
. 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 |
CURREN
CLIENT _WRKSTNNAME |
CURRENT
CLIENT _ACCTNG |
---|---|---|---|---|---|---|---|---|---|---|
2 | DAILYTRANSREPORT | AppC | KYLE, CAROL | SALES, ACCOUNTING |
- APPLNAME. Both the workload definition and the connection have
a value of
AppC
, so a match occurs. - SYSTEM_USER. Because the SYSTEM_USER attribute is not set for the workload, any value, including a null value, that is passed by the connection matches.
- SESSION_USER. The SESSION_USER value passed on the connection
is
KYLE
, which is a match with one of the workload SESSION_USER values. If the connection had passedCAROL
, this would also be a match because bothKYLE
andCAROL
are specified as part of the DAILYTRANSREPORT workload definition. - SESSION_USER GROUP. The SESSION_USER GROUP value passed on the
connection is
SALES
, which matches theSALES
value specified for the workload SESSION_USER GROUP attribute. If the connection had passedACCOUNTING
, this would also be a match because bothSALES
andACCOUNTING
are specified in the workload definition. - 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. 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_WRKSTNNAME attribute is not set for the workload, any value passed by the connection matches.
After processing all of the connection attributes and finding a
matching workload for the connection, the data server checks whether
the session user has the USAGE privilege on the workload. In this
situation, assume that the session user KYLE
has
the USAGE privilege on the DAILYTRANSREPORT workload. Because all
connection attributes match and the session user has the USAGE privilege,
the connection is assigned to the DAILYTRANSREPORT workload.