Question
· Dec 1, 2015

How do i clear the Ensemble Workflow Tasklist

Hello-

I am working on an Ensemble demonstration that involves workflow.  Over the course of testing I have cleared out the Ensemble message store several times.  This has left several workflow tasks that no longer can be assigned, accepted or rejected.

How do I clear the Workflow Tasklist which is found by going to Ensemble -> Manage -> Workflow -> Workflow Tasks in the Ensemble Management Portal?

Thanks in advance

Ken

Discussion (1)1
Log in or sign up to continue

This suggestion solved my problem.

 

WorkflowPurge

            s c=0

            &sql(DECLARE tieCursor CURSOR FOR

            SELECT

            ID into :ID

            FROM EnsLib_Workflow.TaskResponse)    

            &sql(OPEN tieCursor)

            FOR

            {

                        &sql(FETCH tieCursor)

                        Quit:SQLCODE

                        w !,ID

                        s c=$G(c)+1

                        s tTask=##class(EnsLib.Workflow.TaskResponse).%OpenId(ID)

                        set tSC = ##class(EnsLib.Workflow.Engine).CompleteTask(tTask)

                       

            }

            &sql(CLOSE tieCursor)