You are viewing limited content. For full access, please sign in.

Question

Question

Forms - Find User Tasks/Processes a specific account is assigned to

asked on December 19, 2024 Show version history

If a user leaves a position or the company, how do we find the tasks they might be assigned to in the entire organization's Forms processes? Not tasks currently assigned to them, but user tasks where they are assigned to take an action in the future.

This is in an on-prem system but the same question applies to cloud as well.

0 0

Replies

replied on December 20, 2024

Someone may be able to help with a db query for self-hosted, but in general I am looking at a better way to manage/administer processes and tasks within an account. A similar request was made here
https://answers.laserfiche.com/questions/219107/Feature-Request-Automated-Task-Delegation#219113

1 0
replied on May 22
-- Using parameters with DECLARE (for ad-hoc queries in SSMS)
DECLARE @userName NVARCHAR(100) = 'someUsername'
DECLARE @isStepDeleted BIT = 0
DECLARE @isProcessActivated BIT = 1

SELECT 
    s.process_id,
    bp.name AS process_name,
    s.step_id,
    s.name AS step_name,
    s.step_type,
    CASE 
        WHEN s.definition_json LIKE '%"dn":"' + @userName + '"%' THEN @userName
        ELSE 'Team assignment'
    END AS assigned_to
FROM 
    cf_bp_steps s
JOIN 
    cf_bp_processes p ON s.process_id = p.process_id
JOIN 
    cf_business_processes bp ON p.bp_id = bp.bp_id
WHERE 
    s.is_deleted = @isStepDeleted
    --AND s.step_type = 'userTask'
    AND (
        s.definition_json LIKE '%"dn":"' + @userName + '"%'
    )
    AND bp.is_activated = @isProcessActivated
ORDER BY 
    s.process_id, s.step_id;

I just came up with this today. It grabs service tasks as well as user tasks.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.