select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity businessAdministrator
where
t.archived = 0 and
businessAdministrator.id = :userId and
businessAdministrator in elements ( t.peopleAssignments.businessAdministrators ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity excludedOwners
where
t.archived = 0 and
excludedOwners.id = :userId and
excludedOwners in elements ( t.peopleAssignments.excludedOwners ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.taskData.actualOwner
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity potentialOwners
where
t.archived = 0 and
potentialOwners.id = :userId and
potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.taskData.actualOwner
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity potentialOwners
where
t.archived = 0 and
potentialOwners.id = :userId and
potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.status in (:status) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.taskData.actualOwner
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity potentialOwners
where
t.archived = 0 and
( potentialOwners.id = :userId or potentialOwners.id in (:groupIds) ) and
potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.taskData.actualOwner
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity potentialOwners
where
t.archived = 0 and
( potentialOwners.id = :userId or potentialOwners.id in (:groupIds) ) and
potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.status in (:status) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.taskData.actualOwner
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity potentialOwners
where
t.archived = 0 and
potentialOwners.id = :groupId and
potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.taskData.actualOwner
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity potentialOwners
where
t.archived = 0 and
( potentialOwners.id = :userId or potentialOwners.id in (:groupIds) ) and
potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.status in (:status) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.taskData.actualOwner
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity potentialOwners
where
t.archived = 0 and
t.taskData.parentId = :parentId and
potentialOwners.id = :userId and
potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name
where
t.archived = 0 and
t.taskData.parentId = :parentId and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity recipients
where
t.archived = 0 and
recipients.id = :userId and
recipients in elements ( t.peopleAssignments.recipients ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity taskInitiator
where
t.archived = 0 and
taskInitiator.id = :userId and
taskInitiator = t.peopleAssignments.taskInitiator and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name,
OrganizationalEntity taskStakeholder
where
t.archived = 0 and
taskStakeholder.id = :userId and
taskStakeholder in elements ( t.peopleAssignments.taskStakeholders ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name
where
t.archived = 0 and
t.taskData.actualOwner.id = :userId and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name
where
t.archived = 0 and
t.taskData.status = :status and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name
where
t.archived = 0 and
t.taskData.status = :status and
t.taskData.processInstanceId = :processId and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name
where
t.archived = 0 and
t.taskData.status = :status and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.expirationTime is null
and
t.taskData.activationTime < :since
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name
where
t.archived = 1 and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
t.taskData.actualOwner,
t.taskData.createdBy,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime,
t.taskData.processId,
t.taskData.processSessionId)
from
Task t
left join t.taskData.createdBy
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name
where
t.taskData.actualOwner.id = :userId and
t.taskData.status in (:status) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.expirationTime is null
select
new org.jbpm.task.query.DeadlineSummary(
t.id,
d.id,
d.date)
from
Task t,
Deadline d
where
t.archived = 0 and
(d in elements( t.deadlines.startDeadlines ) or d in elements( t.deadlines.endDeadlines ) ) and
d.escalated = 0
order by
d.date
select
t
from
Task t
where
t.archived = 0 and
t.taskData.workItemId = :workItemId