Let’s rule the business process (Part 2)

By | June 26, 2017

As promised, here is the second part of the “let’s rule the business process.. ” post.

There is an unmanaged solution you can download here:

http://www.itaintboring.com/downloads/Forums/Forums_1_0_0_0.zip

That solution includes a custom entity, a business process, a business process entity, and two workflows. Basically, there is everything you need to try it yourself.

 

There are a couple of error messages which can tell us some details about the internals of the business processes:

 

To move to the next stage, complete the required steps

Business Process Error
To move to the next stage, complete the required steps. If you contact support, please provide the technical details.

This one was fully expected – it happens when there are required steps which had not been completed before I tried moving the process to the next stage.

 

Transition to stage … is not in the process active path

Business Process Error
Invalid stage transition. Transition to stage … is not in the process active path. If you contact support, please provide the technical details.

This error happened when I tried to sort of jump the stage. Instead of moving the process to the next stage, I tried to skip one of them. As you can see, Dynamics has some internal validation mechanism to prevent this from happening.

That’s, pretty much, it.. One other note: those errors are happening exactly in this order. Required steps will be validated first, and, then, once everything is good there, active path will be validated as well.

2 thoughts on “Let’s rule the business process (Part 2)

  1. Nandan

    Hi Alex,
    Thanks for the post.
    Is it mandatory to set all the required fields of a stage when we are moving to next stage programatically ? Is this a new requirement in Dynamics 365 ? When using the previous versions/updates we were able to move the stage without setting the mandatory fields, but now system throwing error “To move to the next stage, complete the required steps”

    Reply
    1. Alex Shlega Post author

      Hi Nandan,

      it seems it’s always been like this, but I may be mistaken.. For example, if you have a checkbox there which is meant to identify the completion of required activities (for that stage), and if it’s a required checkbox, you should not be able to move to the next stage till you’ve selected the checkbox.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *