Skip to main content
Contributor
Jan 23, 2024 1:18 PM UTC
Solved

Navigate from a workflow ChildStep to another

Hello,

I have a workflow step of type 'Workspace, Certify'. Through a workspace button, I am able to complete/revert the step.

Community3.png

I am wondering If I can navigate to the 'Certify' window automatically upon completing workspace through a business rule, or we can only do so manually ?

Employee - Sage
Jan 23, 2024 3:46 PM UTC

BRApi.Workflow.Status.SetWorkflowStatus(si, wfClusterPK, StepClassificationTypes.Certify, WorkflowStatusTypes.InProcess, "Certify Started", "", "User clicked complete workflow", Guid.Empty)
selectionChangedTaskResult.ChangeSelectionChangedNavigationInDashboard = True
selectionChangedTaskResult.ModifiedSelectionChangedNavigationInfo.SelectionChangedNavigationType = XFSelectionChangedNavigationType.OpenPage
Dim navPath As String = "XFPage=Workflow"
selectionChangedTaskResult.ModifiedSelectionChangedNavigationInfo.SelectionChangedNavigationArgs = navPath

 

6 replies

MikeG
Contributor
Jan 23, 2024 2:50 PM UTC

Hi Keyser_Soze,

I would like to do this also. Haven't had any luck as of yet.  In my setup I have a Server Task of Execute Dashboard Extender Business Rule, that does the WF Complete and Revert tasks.  There's no obvious API in the Extender TaskResult action to change the navigation.  On the button component, I've tried a POV Action of 'Change Workflow' but that does not advance it to step 2 of the WF task (the Certify action). 

Here's hoping someone here on Community has found the secret recipe.

 

Contributor
Jan 23, 2024 3:01 PM UTC

The only workaround I found, for the time being, was to decompose the workflow steps into 2 different Workflows (Workspace & Certify separately).  This way, we can use the 'Button' properties to navigate between windows
I assume you thought of this one too but it does not do the job ... I hope JackLacava comes to the rescue hah

Employee - Sage
Jan 23, 2024 3:46 PM UTC

BRApi.Workflow.Status.SetWorkflowStatus(si, wfClusterPK, StepClassificationTypes.Certify, WorkflowStatusTypes.InProcess, "Certify Started", "", "User clicked complete workflow", Guid.Empty)
selectionChangedTaskResult.ChangeSelectionChangedNavigationInDashboard = True
selectionChangedTaskResult.ModifiedSelectionChangedNavigationInfo.SelectionChangedNavigationType = XFSelectionChangedNavigationType.OpenPage
Dim navPath As String = "XFPage=Workflow"
selectionChangedTaskResult.ModifiedSelectionChangedNavigationInfo.SelectionChangedNavigationArgs = navPath

 

Contributor
Jan 23, 2024 3:50 PM UTC

Just what the doctor ordered, thanks sir ! 
MikeG There goes our problem solved in seconds, haven't tried it yet but it seems logical

Employee - Sage
Jan 23, 2024 5:15 PM UTC

The main trick is to set the next step as InProcess, so the system will see it as "the item I should go to when opening the workflow". Then you trigger navigation and boom.