Introduction:
WebSphere process Server has Predefined database views are provided for business-process and human-task objects. Use these views when you query reference data for these objects.
When you use the predefined views, you do not need to explicitly add join predicates for view columns, these constructs are added automatically for you. You can use the generic query function of the service API (BusinessFlowManagerService or HumanTaskManagerService) to query this data. You can also use the corresponding method of the HumanTaskManagerDelegate API or your predefined queries provided by your implementations of the ExecutableQuery interface.
Overview:
The following views are defined in the WPS for Business Process and Humantasks.
Ø ACTIVITY view
Ø ACTIVITY_ATTRIBUTE view
Ø ACTIVITY_SERVICE view
Ø APPLICATION_COMP view
Ø ESCALATION view
Ø ESCALATION_CPROP view
Ø ESCALATION_DESC view
Ø PROCESS_ATTRIBUTE view
Ø PROCESS_INSTANCE view
Ø PROCESS_TEMPLATE view
Ø QUERY_PROPERTY view
Ø TASK view
Ø TASK_CPROP view
Ø TASK_DESC view
Ø TASK_TEMPL view
Ø TASK_TEMPL_CPROP view
Ø TASK_TEMPL_DESC view
Ø WORK_ITEM view
ACTIVITY view:
Use this predefined database view for quire on activities, like Invok, Assign, Snippet,
etc. The DataBase lookup is like below.
Table 1. Columns in the ACTIVITY view | ||
Column name | Type | Comments |
PIID | ID | The process instance ID. |
AIID | ID | The activity instance ID. |
PTID | ID | The process template ID. |
ATID | ID | The activity template ID. |
KIND | Integer | The kind of activity. Possible values are: KIND_INVOKE (21) KIND_RECEIVE (23) KIND_REPLY (24) KIND_THROW (25) KIND_RETHROW (46) KIND_TERMINATE (26) KIND_WAIT (27) KIND_COMPENSATE (29) KIND_SEQUENCE (30) KIND_EMPTY (3) KIND_SWITCH (32) KIND_WHILE (34) KIND_PICK (36) KIND_FLOW (38) KIND_SCOPE (40) KIND_SCRIPT (42) KIND_STAFF (43) KIND_ASSIGN (44) KIND_CUSTOM (45) KIND_FOR_EACH_PARALLEL (49) KIND_FOR_EACH_SERIAL (47) |
COMPLETED | Timestamp | The time the activity is completed. |
ACTIVATED | Timestamp | The time the activity is activated. |
FIRST_ACTIVATED | Timestamp | The time at which the activity was activated for the first time. |
STARTED | Timestamp | The time the activity is started. |
STATE | Integer | The state of the activity. Possible values are: STATE_INACTIVE (1) STATE_READY (2) STATE_RUNNING (3) STATE_PROCESSING_UNDO (14) STATE_SKIPPED (4) STATE_FINISHED (5) STATE_FAILED (6) STATE_TERMINATED (7) STATE_CLAIMED (8) STATE_TERMINATING (9) STATE_FAILING (10) STATE_WAITING (11) STATE_EXPIRED (12) STATE_STOPPED (13) |
OWNER | String | Principal ID of the owner. |
DESCRIPTION | String | If the activity template description contains placeholders, this column contains the description of the activity instance with the placeholders resolved. |
TEMPLATE_NAME | String | Name of the associated activity template. |
TEMPLATE_DESCR | String | Description of the associated activity template. |
BUSINESS_RELEVANCE | Boolean | Specifies whether the activity is business relevant. Possible values are: TRUE The activity is business relevant. You can view the activity status in Business Process Choreographer Explorer. FALSE The activity is not business relevant. |
EXPIRES | Timestamp | The date and time when the activity is due to expire. If the activity has expired, the date and time when this event occurred. |
ACTIVITY_ATTRIBUTE view
Use this predefined database view for queries on custom properties for activities.
Table 2. Columns in the ACTIVITY_ATTRIBUTE view | ||
Column name | Type | Comments |
AIID | ID | The ID of the activity instance that has a custom property. |
NAME | String | The name of the custom property. |
VALUE | String | The value of the custom property. |
ACTIVITY_SERVICE view
Use this predefined database view for queries on activity services.
Table 3. Columns in the ACTIVITY_SERVICE view | ||
Column name | Type | Comments |
EIID | ID | The ID of the event instance. |
AIID | ID | The ID of the activity waiting for the event. |
PIID | ID | The ID of the process instance that contains the event. |
VTID | ID | The ID of the service template that describes the event. |
PORT_TYPE | String | The name of the port type. |
NAME_SPACE_URI | String | The URI of the namespace. |
OPERATION | String | The operation name of the service. |
APPLICATION_COMP view
Use this predefined database view to query the application component ID and default settings for tasks.
Table 4. Columns in the APPLICATION_COMP view | ||
Column name | Type | Comments |
ACOID | String | The ID of the application component. |
BUSINESS_RELEVANCE | Boolean | The default task business-relevance policy of the component. This value can be overwritten by a definition in the task template or the task. The attribute affects logging to the audit trail. Possible values are: TRUE The task is business relevant and it is audited. FALSE The task is not business relevant and it is not audited. |
NAME | String | Name of the application component. |
SUPPORT_AUTOCLAIM | Boolean | The default automatic-claim policy of the component. If this attribute is set to TRUE, the task can be automatically claimed if a single user is the potential owner. This value can be overwritten by a definition in the task template or task. |
SUPPORT_CLAIM_SUSP | Boolean | The default setting of the component that determines whether suspended tasks can be claimed. If this attribute is set to TRUE, suspended tasks can be claimed. This value can be overwritten by a definition in the task template or the task. |
SUPPORT_DELEGATION | Boolean | The default task delegation policy of the component. If this attribute is set to TRUE, the work item assignments for the task can be modified. This means that work items can be created, deleted, or transferred. |
SUPPORT_ FOLLOW_ON | Boolean | The default follow-on task policy of the component. If this attribute is set to TRUE, follow-on tasks can be created for tasks. This value can be overwritten by a definition in the task template or the task. |
SUPPORT_ SUB_TASK | Boolean | The default sub task policy of the component. If this attribute is set to TRUE, sub tasks can be created for tasks. This value can be overwritten by a definition in the task template or the task. |
ESCALATION view
Use this predefined database view to query data for escalations.
Table 5. Columns in the ESCALATION view | ||
Column name | Type | Comments |
ESIID | String | The ID of the escalation instance. |
ACTION | Integer | The action triggered by the escalation. Possible values are: ACTION_CREATE_WORK_ITEM (1) Creates a work item for each escalation receiver. ACTION_SEND_EMAIL (2) Sends an e-mail to each escalation receiver. ACTION_CREATE_EVENT (3) Creates and publishes an event. |
ACTIVATION_STATE | Integer | An escalation instance is created if the corresponding task reaches one of the following states: ACTIVATION_STATE_READY (2) Specifies that the human or participating task is ready to be claimed. ACTIVATION_STATE_RUNNING (3) Specifies that the originating task is started and running. ACTIVATION_STATE_CLAIMED (8) Specifies that the task is claimed. ACTIVATION_STATE_WAITING_FOR_SUBTASK (20) Specifies that the task is waiting for the completion of subtasks. |
ACTIVATION_TIME | Timestamp | The time when the escalation is activated. |
AT_LEAST_EXP_STATE | Integer | The state of the task that is expected by the escalation. If a timeout occurs, the task state is compared with the value of this attribute. Possible values are: AT_LEAST_EXPECTED_STATE_CLAIMED (8) Specifies that the task is claimed. AT_LEAST_EXPECTED_STATE_ENDED (20) Specifies that the task is in a final state (FINISHED, FAILED, TERMINATED or EXPIRED). AT_LEAST_EXPECTED_STATE_SUBTASKS_COMPLETED (21) Specifies that all of the subtasks of the task are complete. |
ESTID | String | The ID of the corresponding escalation template. |
FIRST_ESIID | String | The ID of the first escalation in the chain. |
INCREASE_PRIORITY | Integer | Indicates how the task priority will be increased. Possible values are: INCREASE_PRIORITY_NO (1) The task priority is not increased. INCREASE_PRIORITY_ONCE (2) The task priority is increased once by one. INCREASE_PRIORITY_REPEATED (3) The task priority is increased by one each time the escalation repeats. |
NAME | String | The name of the escalation. |
STATE | Integer | The state of the escalation. Possible values are: STATE_INACTIVE (1) STATE_WAITING (2) STATE_ESCALATED (3) STATE_SUPERFLUOUS (4) |
TKIID | String | The task instance ID to which the escalation belongs. |
ESCALATION_CPROP view
Use this predefined database view to query custom properties for escalations.
Table 6. Columns in the ESCALATION_CPROP view | ||
Column name | Type | Comments |
ESIID | String | The escalation ID. |
NAME | String | The name of the property. |
DATA_TYPE | String | The type of the class for non-string custom properties. |
STRING_VALUE | String | The value for custom properties of type String. |
ESCALATION_DESC view
Use this predefined database view to query multilingual descriptive data for escalations.
Table 7. Columns in the ESCALATION_DESC view | ||
Column name | Type | Comments |
ESIID | String | The escalation ID. |
LOCALE | String | The name of the locale associated with the description or display name. |
DESCRIPTION | String | A description of the task template. |
DISPLAY_NAME | String | The descriptive name of the escalation. |
PROCESS_ATTRIBUTE view
Use this predefined database view for queries on custom properties for processes.
Table 8. Columns in the PROCESS_ATTRIBUTE view | ||
Column name | Type | Comments |
PIID | ID | The ID of the process instance that has a custom property. |
NAME | String | The name of the custom property. |
VALUE | String | The value of the custom property. |
PROCESS_INSTANCE view
Use this predefined database view for queries on process instances.
Table 09. Columns in the PROCESS_INSTANCE view | ||
Column name | Type | Comments |
PTID | ID | The process template ID. |
PIID | ID | The process instance ID. |
NAME | String | The name of the process instance. |
STATE | Integer | The state of the process instance. Possible values are: STATE_READY (1) STATE_RUNNING (2) STATE_FINISHED (3) STATE_COMPENSATING (4) STATE_INDOUBT (10) STATE_FAILED (5) STATE_TERMINATED (6) STATE_COMPENSATED (7) STATE_COMPENSATION_FAILED (12) STATE_TERMINATING (8) STATE_FAILING (9) STATE_SUSPENDED (11) |
CREATED | Timestamp | The time the process instance is created. |
STARTED | Timestamp | The time the process instance started. |
COMPLETED | Timestamp | The time the process instance completed. |
PARENT_NAME | String | The name of the parent process instance. |
TOP_LEVEL_NAME | String | The name of the top-level process instance. If there is no top-level process instance, this is the name of the current process instance. |
STARTER | String | The principal ID of the starter of the process instance. |
DESCRIPTION | String | If the description of the process template contains placeholders, this column contains the description of the process instance with the placeholders resolved. |
TEMPLATE_NAME | String | The name of the associated process template. |
TEMPLATE_DESCR | String | Description of the associated process template. |
PROCESS_TEMPLATE view
Use this predefined database view for queries on process templates.
Table 10. Columns in the PROCESS_TEMPLATE view | ||
Column name | Type | Comments |
PTID | ID | The process template ID. |
NAME | String | The name of the process template. |
VALID_FROM | Timestamp | The time from when the process template can be instantiated. |
TARGET_NAMESPACE | String | The target namespace of the process template. |
APPLICATION_NAME | String | The name of the enterprise application to which the process template belongs. |
VERSION | String | User-defined version. |
CREATED | Timestamp | The time the process template is created in the database. |
STATE | Integer | Specifies whether the process template is available to create process instances. Possible values are: STATE_STARTED (1) STATE_STOPPED (2) |
EXECUTION_MODE | Integer | Specifies how process instances that are derived from this process template can be run. Possible values are: EXECUTION_MODE_MICROFLOW (1) EXECUTION_MODE_LONG_RUNNING (2) |
DESCRIPTION | String | Description of the process template. |
COMP_SPHERE | Integer | Specifies the compensation behavior of instances of microflows in the process template; either an existing compensation sphere is joined or a compensation sphere is created. Possible values are: COMP_SPHERE_REQUIRED (2) COMP_SPHERE_REQUIRES_NEW (3) COMP_SPHERE_SUPPORTS (4) COMP_SPHERE_NOT_SUPPORTED (1) |
QUERY_PROPERTY view
Use this predefined database view for queries on process-level variables.
Table 11. Columns in the QUERY_PROPERTY view | ||
Column name | Type | Comments |
PIID | ID | The process instance ID. |
VARIABLE_NAME | String | The name of the process-level variable. |
NAME | String | The name of the query property. |
NAMESPACE | String | The namespace of the query property. |
GENERIC_VALUE | String | A string representation for property types that do not map to one of the defined types: STRING_VALUE, NUMBER_VALUE, DECIMAL_VALUE, or TIMESTAMP_VALUE. |
STRING_VALUE | String | If a property type is mapped to a string type, this is the value of the string. |
NUMBER_VALUE | Integer | If a property type is mapped to an integer type, this is the value of the integer. |
DECIMAL_VALUE | Decimal | If a property type is mapped to a floating point type, this is the value of the decimal. |
TIMESTAMP_VALUE | Timestamp | If a property type is mapped to a timestamp type, this is the value of the timestamp. |
TASK view
Use this predefined database view for queries on task objects.
Table 12. Columns in the TASK view | ||
Column name | Type | Comments |
TKIID | ID | The ID of the task instance. |
ACTIVATED | Timestamp | The time when the task was activated. |
APPLIC_DEFAULTS_ID | ID | The ID of the application component that specifies the defaults for the task. |
APPLIC_NAME | String | The name of the enterprise application to which the task belongs. |
BUSINESS_RELEVANCE | Boolean | Specifies whether the task is business relevant. The attribute affects logging to the audit trail. Possible values are: TRUE The task is business relevant and it is audited. FALSE The task is not business relevant and it is not audited. |
COMPLETED | Timestamp | The time when the task completed. |
CONTAINMENT_CTX_ID | ID | The containment context for this task. This attribute determines the life cycle of the task. When the containment context of a task is deleted, the task is also deleted. |
CTX_AUTHORIZATION | Integer | Allows the task owner to access the task context. Possible values are: AUTH_NONE No authorization rights for the associated context object. AUTH_READER Operations on the associated context object require reader authority, for example, reading the properties of a process instance. |
DUE | Timestamp | The time when the task is due. |
EXPIRES | Timestamp | The date when the task expires. |
FIRST_ACTIVATED | Timestamp | The time when the task was activated for the first time. |
FOLLOW_ON_TKIID | ID | The ID of the instance of the follow-on task. |
HIERARCHY_POSITION | Integer | Possible values are: HIERARCHY_POSITION_TOP_TASK (0) The top-level task in the task hierarchy. HIERARCHY_POSITION_SUB_TASK (1) The task is a subtask in the task hierarchy. HIERARCHY_POSITION_FOLLOW_ON_TASK (2) The task is a follow-on task in the task hierarchy. |
IS_AD_HOC | Boolean | Indicates whether this task was created dynamically at runtime or from a task template. |
IS_ESCALATED | Boolean | Indicates whether an escalation of this task has occurred. |
IS_INLINE | Boolean | Indicates whether the task is an inline task in a business process. |
IS_WAIT_FOR_SUB_TK | Boolean | Indicates whether the parent task is waiting for a subtask to reach an end state. |
KIND | Integer | The kind of task. Possible values are: KIND_HUMAN (101) States that the task is created and processed by a human. KIND_WPC_STAFF_ACTIVITY (102) States that the task is a human task that is a staff activity of a WebSphere Business Integration Server Foundation, version 5 business process. KIND_ORIGINATING (103) States that the task supports person-to-computer interactions, which enables people to create, initiate, and start services. KIND_PARTICIPATING (105) States that the task supports computer-to-person interactions, which enable a person to implement a service. KIND_ADMINISTRATIVE (106) States that the task is an administrative task. |
LAST_MODIFIED | Timestamp | The time when the task was last modified. |
LAST_STATE_CHANGE | Timestamp | The time when the state of the task was last modified. |
NAME | String | The name of the task. |
NAME_SPACE | String | The namespace that is used to categorize the task. |
ORIGINATOR | String | The principal ID of the task originator. |
OWNER | String | The principal ID of the task owner. |
PARENT_CONTEXT_ID | String | The parent context for this task. This attribute provides a key to the corresponding context in the calling application component. The parent context is set by the application component that creates the task. |
PRIORITY | Integer | The priority of the task. |
STARTED | Timestamp | The time when the task was started (STATE_RUNNING, STATE_CLAIMED). |
STARTER | String | The principal ID of the task starter. |
STATE | Integer | The state of the task. Possible values are: STATE_READY (2) States that the task is ready to be claimed. STATE_RUNNING (3) States that the task is started and running. STATE_FINISHED (5) States that the task finished successfully. STATE_FAILED (6) States that the task did not finish successfully. STATE_TERMINATED (7) States that the task has been terminated because of an external or internal request. STATE_CLAIMED (8) States that the task is claimed. STATE_EXPIRED (12) States that the task ended because it exceeded its specified duration. STATE_FORWARDED (101) States that task completed with a follow-on task. |
SUPPORT_AUTOCLAIM | Boolean | Indicates whether this task is claimed automatically if it is assigned to a single user. |
SUPPORT_CLAIM_SUSP | Boolean | Indicates whether this task can be claimed if it is suspended. |
SUPPORT_DELEGATION | Boolean | Indicates whether this task supports work delegation through creating, deleting, or transferring work items. |
SUPPORT_FOLLOW_ON | Boolean | Indicates whether this task supports the creation of follow-on tasks. |
SUPPORT_SUB_TASK | Boolean | Indicates whether this task supports the creation of subtasks. |
SUSPENDED | Boolean | Indicates whether the task is suspended. |
TKTID | ID | The task template ID. |
TOP_TKIID | ID | The top parent task instance ID if this is a subtask. |
TYPE | String | The type used to categorize the task. |
TASK_CPROP view
Use this predefined database view to query custom properties for task objects.
Table 13. Columns in the TASK_CPROP view | ||
Column name | Type | Comments |
TKIID | String | The task instance ID. |
NAME | String | The name of the property. |
DATA_TYPE | String | The type of the class for non-string custom properties. |
STRING_VALUE | String | The value for custom properties of type String. |
TASK_DESC view
Use this predefined database view to query multilingual descriptive data for task objects.
Table 14. Column in the TASK_DESC view | ||
Column name | Type | Comments |
TKIID | String | The task instance ID. |
LOCALE | String | The name of the locale associated with the description or display name. |
DESCRIPTION | String | A description of the task. |
DISPLAY_NAME | String | The descriptive name of the task. |
TASK_TEMPL view
This predefined database view holds data that you can use to instantiate tasks.
Table 15. Columns in the TASK_TEMPL view | ||
Column name | Type | Comments |
TKTID | String | The task template ID. |
VALID_FROM | Timestamp | The time when the task template becomes available for instantiation. |
APPLIC_DEFAULTS_ID | String | The ID of the application component that specifies the defaults for the task template. |
APPLIC_NAME | String | The name of the enterprise application to which the task template belongs. |
BUSINESS_RELEVANCE | Boolean | Specifies whether the task template is business relevant. The attribute affects logging to the audit trail. Possible values are: TRUE The task is business relevant and it is audited. FALSE The task is not business relevant and it is not audited. |
CONTAINMENT_CTX_ID | ID | The containment context for this task template. This attribute determines the life cycle of the task template. When a containment context is deleted, the task template is also deleted. |
CTX_AUTHORIZATION | Integer | Allows the task owner to access the task context. Possible values are: AUTH_NONE No authorization rights for the associated context object. AUTH_READER Operations on the associated context object require reader authority, for example, reading the properties of a process instance. |
IS_AD_HOC | Boolean | Indicates whether this task template was created dynamically at runtime or when the task was deployed as part of an EAR file. |
IS_INLINE | Boolean | Indicates whether this task template is modeled as a task within a business process. |
KIND | Integer | The kind of tasks that are derived from this task template. Possible values are: KIND_HUMAN (101) Specifies that the task is created and processed by a human. KIND_ORIGINATING (103) Specifies that a human can assign a task to a computer. In this case, a human invokes an automated service. KIND_PARTICIPATING (105) Specifies that a service component (such as a business process) assigns a task to a human. KIND_ADMINISTRATIVE (106) Specifies that the task is an administrative task. |
NAME | String | The name of the task template. |
NAMESPACE | String | The namespace that is used to categorize the task template. |
PRIORITY | Integer | The priority of the task template. |
STATE | Integer | The state of the task template. Possible values are: STATE_STARTED (1) Specifies that the task template is available for creating task instances. STATE_STOPPED (2) Specifies that the task template is stopped. Task instances cannot be created from the task template in this state. |
SUPPORT_AUTOCLAIM | Boolean | Indicates whether tasks derived from this task template can be claimed automatically if they are assigned to a single user. |
SUPPORT_CLAIM_SUSP | Boolean | Indicates whether tasks derived from this task template can be claimed if they are suspended. |
SUPPORT_DELEGATION | Boolean | Indicates whether tasks derived from this task template support work delegation using creation, deletion, or transfer of work items. |
SUPPORT_FOLLOW_ON | Boolean | Indicates whether the task template supports the creation of follow-on tasks. |
SUPPORT_SUB_TASK | Boolean | Indicates whether the task template supports the creation of subtasks. |
TYPE | String | The type used to categorize the task template. |
TASK_TEMPL_CPROP view
Use this predefined database view to query custom properties for task templates.
Table 16. Columns in the TASK_TEMPL_CPROP view | ||
Column name | Type | Comments |
TKTID | String | The task template ID. |
NAME | String | The name of the property. |
DATA_TYPE | String | The type of the class for non-string custom properties. |
STRING_VALUE | String | The value for custom properties of type String. |
TASK_TEMPL_DESC view
Use this predefined database view to query multilingual descriptive data for task template objects.
Table 17. Columns in the TASK_TEMPL_DESC view | ||
Column name | Type | Comments |
TKTID | String | The task template ID. |
LOCALE | String | The name of the locale associated with the description or display name. |
DESCRIPTION | String | A description of the task template. |
DISPLAY_NAME | String | The descriptive name of the task template. |
WORK_ITEM view
Use this predefined database view for queries on work items and authorization data for process, tasks, and escalations.
Table 18. Columns in the WORK_ITEM view | ||
Column name | Type | Comments |
WIID | ID | The work item ID. |
OWNER_ID | String | The principal ID of the owner. |
GROUP_NAME | String | The name of the associated group worklist. |
EVERYBODY | Boolean | Specifies whether everybody owns this work item. |
OBJECT_TYPE | Integer | The type of the associated object. Possible values are: OBJECT_TYPE_ACTIVITY (1) Specifies that the work item was created for an activity. OBJECT_TYPE_PROCESS_INSTANCE (3) Specifies that the work item was created for a process instance. OBJECT_TYPE_TASK_INSTANCE (5) Specifies that the work item was created for a task. OBJECT_TYPE_TASK_TEMPLATE (6) Specifies that the work item was created for a task template. OBJECT_TYPE_ESCALATION_INSTANCE (7) Specifies that the work item was created for an escalation instance. OBJECT_TYPE_APPLICATION_COMPONENT (9) Specifies that the work item was created for an application component. |
OBJECT_ID | ID | The ID of the associated object, for example, the associated process or task. |
ASSOC_OBJECT_TYPE | Integer | The type of the object referenced by the ASSOC_OID attribute, for example, task, process, or external objects. Use the values for the OBJECT_TYPE attribute. |
ASSOC_OID | ID | The ID of the object associated object with the work item. For example, the process instance ID (PIID) of the process instance containing the activity instance for which this work item was created. |
REASON | Integer | The reason for the assignment of the work item. Possible values are: REASON_POTENTIAL_STARTER (5) REASON_POTENTIAL_INSTANCE_CREATOR (11) REASON_POTENTIAL_STARTER (1) REASON_EDITOR (2) REASON_READER (3) REASON_ORIGINATOR (9) REASON_OWNER (4) REASON_STARTER (6) REASON_ESCALATION_RECEIVER (10) REASON_ADMINISTRATOR (7) |
CREATION_TIME | Timestamp | The date and time when the work item was created. |
Conclusion:
This article illustrated Business Process and Human Task Objects Data Base view in WebSphere Process Server. By understanding this views we can retrieve the Business Process and Human Task details using BusinessProcessHome API’s and HumanTaskManager API’s. We will see in coming articals, how we are going to use this view for develop client applications for Business Process and Human Tasks.
Downloads:
Document Name | Description | Size | Download |
DB View in WPS | DB Views of BPEL & Humal Task Objects In WPS | 225 KB |