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 :
Customer experience | Sales, Customer Insights,...
Unanswered

Get order of processtages without traversedpath / RetrieveActivePathResponse of BPF

(0) ShareShare
ReportReport
Posted on by 115

I am struggeling with an edge case i guess. 

I wrote a plugin that determines the active processstage of an opportunity. It reads the active process from the "userentityuisettings" table and than gets the processstage from all active BPF revieved by using "RetrieveProcessInstancesRequest". So it work even if i got multiple active processes on an opportunity and switch from one to another in the frontend.

If i delete a processstage in the bpf editor which still holds opportunities, the frontend falls back to the first processstage in the process but it seems that it is not realy activting the first processtage. I want to fallback in c# too but the opportunity itself respectively its businessprocessflowinstance will still show the delted processstage-guid in "processstageid". So i cannot use that. "traversedpath" is an emtpy string and RetrieveActivePathResponse will return an empty collection so i cannot use that too. It seems the only possible way to get the first stage which is shown in the frontend would be to get all processtages of the bpf itself in the order of the process and then grab the first item. But i dont know how to do that. How to achieve that without using "RetrieveActivePathResponse" of a businessprocessflowinstance?


Where is the order information even stored? Or is there a way to retrieve the defaultPath from the BPF not the instance?


EDIT: It seems that the process information itself is located in the workflow table. Column "xaml". How to parse the XAML of a business process flow?

The documentation for the loader shows an example with type <int> but i guess it has to be something workflow specific in this case?

DynamicActivity wf = ActivityXamlServices.Load(new StringReader(serializedAB)) as DynamicActivity;


docs.microsoft.com/.../serializing-workflows-and-activities-to-and-from-xaml

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Syed Aqib Raza Profile Picture

Syed Aqib Raza 96

#2
11manish Profile Picture

11manish 90 Super User 2026 Season 2

#3
ParthPatel249 Profile Picture

ParthPatel249 80

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans