web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

When WorkflowWorkItemQueueCustomProvider class will get triggered

(0) ShareShare
ReportReport
Posted on by 170

Hi there,

I'm working on a bug in case sync integration, where the outbound API is called in WorkflowWorkItemQueueCustomProvider extension class and i tried all the ways by debugging but i'm not getting when this class will get called actually after clicking on submit button of workflow it has call but it is not calling this and in this class they are passing queue names dynamically which are there in work item queues, can someone please help on when this class will get called.

I have the same question (0)
  • Suggested answer
    huijij Profile Picture
    19,811 on at

    Hi sir,

    Did you checked the methods in the WorkflowWorkItemQueueCustomProvider class and are you trying to call one of them? Could you please elaborate on your business requirements?

    760105.png

  • Ganesh Potnuru Profile Picture
    170 on at

    Hi huijij ,

    Yes I'm trying to call resolve method but I'm not getting on what action that method will get triggered.

  • Suggested answer
    GirishS Profile Picture
    27,833 Moderator on at

    resolve method is called from the SysWorkflowQueueProvilder >> resolveQueue (Refer to line number 60).

    Actually, WorkflowWorkItemQueueCustomProvider  implements WorkflowQueueProvider  interface. So, the method declaration is available in interface and its definition is given in WorkflowWorkItemQueueCustomProvider.

    This resolve method is called from interface class which is WorkflowQueueProvider.

    Thanks,

    Girish S.

  • Ganesh Potnuru Profile Picture
    170 on at

    [extensionof(ClassStr(WorkflowWorkItemQueueCustomProvider))]
    final class WorkflowWorkItemQueueCustomProvider_Extension
    {
    
        public Name queueIdToQueueName(WorkflowQueueId _queueId)
        {
            WorkflowWorkItemQueue workItemQueue;
    
            next queueIdToQueueName(_queueId);
    
            if(workItemQueue.FOCECaseActionOnCE == NoYes::Yes)
            {
                info("Reassign to new workitem que");
            }
            return workItemQueue.Name;
        }
        public Name resolve( WorkflowContext _context,
                             WorkflowQueueToken _queueToken)
        {
            WorkflowWorkItemQueueExpression     queueExpression;
            WorkflowWorkItemQueue               workItemQueue,WorkflowWorkItemQueue_1;
            WorkflowWorkItemQueueExpressionDef  queueExpressionDefinition;
            ExpressionTable                     expression;
            ExpressionResultType                result;
            Name                                queueName;
            SysDictWorkflowType                 workflowType;
            className                           workflowDocument;
            SysWorkflowTable                    sysWorkflowTable;
            CaseDetailbase                      caseDetailBase,caseDetailBaseupd;
    
            sysWorkflowTable = SysWorkflowTable::find(_context.parmWorkflowCorrelationId());
            next resolve(_context,_queueToken);
    
            select caseDetailBase where caseDetailBase.RecId == _context.parmRecId();       
            
            workflowType = SysDictWorkflowType::newTypeName(sysWorkflowTable.TemplateName);
          
            workflowDocument = workflowType.document();
    
            while select EvaluationOrder, Expression, WorkflowWorkItemQueue from queueExpression
                order by EvaluationOrder
                join Status, Name, RecId  from  workItemQueue
                    where   queueExpression.WorkflowWorkItemQueue == workItemQueue.RecId
                        &&  workItemQueue.Status == WorkflowWorkitemQueueStatus::Active
                        &&  workItemQueue.WorkitemType == workflowDocument
                join RecId, ExpressionId from expression
                    where queueExpression.Expression == expression.RecId
            {
                result = Expression::evaluate(_context.parmCompanyId(),_context.parmTableId(),
                                                _context.parmRecId(),expression.ExpressionId);
    
                if (result == ExpressionResultType::True)
                {
                    queueName = workItemQueue.Name;
                    break;
                }
            }
    
            if(queueName)
            {
                changecompany(curExt())
                {
                    select WorkflowWorkItemQueue_1 where WorkflowWorkItemQueue_1.Name == queueName;
                    if(WorkflowWorkItemQueue_1.FOCECaseActionOnCE == NoYes::Yes && !caseDetailBase.CeCaseId)
                    { 
                        
                            //send case detil to CE and update the casedetail form action on field value to CE
                            FOCEOutboundIntegration FOCEOutboundIntegration = new FOCEOutboundIntegration();
                            FOCEOutboundIntegration.assignjsonValues(caseDetailBase,"In process");
                            // update action on field value to CE
                            ttsbegin;
                            select forUpdate  caseDetailBaseupd where caseDetailBaseupd.RecId == _context.parmRecId();
                            if(caseDetailBaseupd)
                            {
                                caseDetailBaseupd.ActionOn = ActionOn::CE;                           
                                caseDetailBaseupd.update();
                            }
                            ttscommit;  
                        
                    }
                }
            }
    
            if (!queueName)
            {
                select RecId, DefaultQueue from queueExpressionDefinition
                    where queueExpressionDefinition.WorkitemType == workflowDocument
                        && queueExpressionDefinition.DefaultQueue != 0;
    
                if (queueExpressionDefinition.RecId)
                {
                    queueName = WorkflowWorkItemQueue::find(queueExpressionDefinition.DefaultQueue).Name;
                }
            }
         
    
            return queueName;
        }
        }

    Hi Girish,

    Can you please tell me when WorkflowWorkItemQueueCustomProvider  willl get triggered, i have followed the above steps but still it is not getting triggered,

    Actually this development is a case sync integration development, so whenever a case is created in F&O and submit workflow then the earlier developer triggering the api to send this to CE in WorkflowWorkItemQueueCustomProvider  class but this class itself is not calling after i'm submitting the workflow.

    Basically in the above code in line number 52 they are calling api to tirigger outbound to CE but this class and resolve itself is not triggering after workflow submission.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 509 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 375

#3
Adis Profile Picture

Adis 268 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans