Skip to main content
Newcomer
April 22, 2025

Quick certification of a Certify Workflow using business rule

  • April 22, 2025
  • 12 replies
  • 87 views

Hello everyone,

Is it possible using a business rule to make a quick certification for a Certify Workflow?

I was abel to complete the Certify Workflow task using business rule but the certification status remains rejected.

Thank you in advance for your help.

Regards,

Antony

12 replies

Member
August 15, 2026

Hi aabirached,

Can you share your portion of code that Certify your workflow?  I had the below code and it’s running forever (end with error).

If isAllWfComplete Then
    'Dim wfParentUnitPk As WorkflowUnitPk = BRApi.Workflow.General.GetWorkflowUnitPk(si, wfProfParent.Name, wfScenario, wfTime)
    Dim wfTopClusterPK As WorkflowUnitClusterPk = BRApi.Workflow.General.GetWorkflowUnitClusterPk(si, wfProfParent.Name, wfScenario, wfTime)
    
    BRApi.Workflow.Status.SetWorkflowStatus(si, wfTopClusterPK, StepClassificationTypes.Certify, WorkflowStatusTypes.Completed, "Auto Certified", "Error: Automate Certified", "Auto Certified", Nothing)
End if

Regards
Seang

Advisor
August 17, 2026

Hi ​@seangly 

Your SetWorkflowStatus execution looks correct.  How are you executing your code? 

This needs to be done via the Component Service or a Dashboard Extender Business Rule; so that you can set this property on the XFSelectionChangedTaskResult object returned e.g. 

' Insert your BRApi to change workflow status here

Dim selectionChangedTaskResult As XFSelectionChangedTaskResult
selectionChangedTaskResult.WorkflowWasChangedByBusinessRule = True
Return selectionChangedTaskResult

Hope this helps

Sam

Member
August 21, 2026

Hi Sam,

I am running it from the Workflow Event Handler.  There is a object that I can also return but not sure if that object can contain the changed.

Regards,
Seang

Member
August 17, 2026

Hi Sam,

I am running it from the Workflow Event Handler.  There is a object that I can also return but not sure if that object can contain the changed.

 

Regards,
Seang