Home > Forum > Actions > Move Workflow giving Error Path ID

Move Workflow giving Error Path ID
0

Hello all,

I know this as been asked in the forum, but I have an issue with the action Move workflow.

I've read the answers for another user, but I think I can't use the example on the https://alterpaths.com/massive-update-of-sub-workflows-in-webcon-bps/ because for my case I have 5 different chains in the Child workflow and each of them as their own Complete and Cancel step.

This was working prior for the cancelled but I'm wondering if this only works if you have one final step (either cancelled or completed).

MVP

Hi Andreia,

the move workflow action doesn't care about the target step, only about the path the workflow should take. So it's not important whether you have one or two final steps, or whether the workflow is moved to the start.

Seeing you screenshot there's one thing I would do immediately. Each of your steps has the "Complete" step and it's hard to see, whether this is the correct one. Therefore I would rename these to STEP_COMPLETE (EstimationProfiling_Complete, HeadOfDepartmentApproval_Complete) and add a translation "Complete", so that you have a user friendly name in the UI but can easily work with it in Designer studio.

This way you can easily see, whether you used the correct path for each step. Alternatively you can activate the advanced mode to see the path ids. If you find an duplicate path id but the when condition has a different step id, than you have found your problem.

Btw. what's the error you get? Something along "Path xx is not available"?
Or is one of your workflow in step "Bid manager review" to the wrong step? There are currently two different path defined for this step.


Best regards,
Daniel

In reply to: Daniel Krüger (Cosmo Consult)

Hi Andreia,

the move workflow action doesn't care about the target step, only about the path the workflow should take. So it's not important whether you have one or two final steps, or whether the workflow is moved to the start.

Seeing you screenshot there's one thing I would do immediately. Each of your steps has the "Complete" step and it's hard to see, whether this is the correct one. Therefore I would rename these to STEP_COMPLETE (EstimationProfiling_Complete, HeadOfDepartmentApproval_Complete) and add a translation "Complete", so that you have a user friendly name in the UI but can easily work with it in Designer studio.

This way you can easily see, whether you used the correct path for each step. Alternatively you can activate the advanced mode to see the path ids. If you find an duplicate path id but the when condition has a different step id, than you have found your problem.

Btw. what's the error you get? Something along "Path xx is not available"?
Or is one of your workflow in step "Bid manager review" to the wrong step? There are currently two different path defined for this step.


Best regards,
Daniel

Hi Daniel,

Thank you for your suggestion, I will try to do it.

Yesterday I've made a test using the query
Select WFD_ID, PATH_ID from WFElements
join WFAvaiblePaths on WFD_STPID = PATH_STPID
join WFSteps on WFD_STPID = STP_ID
where PATH_Name in ( 'Complete', 'Submit Estimation') --Replace your's path name here
and WFD_DTYPEID in ({DT:120}) --Replace your's form types variables

and I got the error: Document is in incorrect step. Attempt of passing through forbidden path with id 1933 to step with id 1008.

But path and step are correct.
I'm going to change the query for the previous version with your suggestion and try again.

Do you think it might be because some of sub workflows might be closed already?

Thank you for your kind help!

MVP
In reply to: Andreia Correia

Hi Daniel,

Thank you for your suggestion, I will try to do it.

Yesterday I've made a test using the query
Select WFD_ID, PATH_ID from WFElements
join WFAvaiblePaths on WFD_STPID = PATH_STPID
join WFSteps on WFD_STPID = STP_ID
where PATH_Name in ( 'Complete', 'Submit Estimation') --Replace your's path name here
and WFD_DTYPEID in ({DT:120}) --Replace your's form types variables

and I got the error: Document is in incorrect step. Attempt of passing through forbidden path with id 1933 to step with id 1008.

But path and step are correct.
I'm going to change the query for the previous version with your suggestion and try again.

Do you think it might be because some of sub workflows might be closed already?

Thank you for your kind help!

Hi Andreia,

the query looks fine to me, although I don't see a reason for join WFSteps on WFD_STPID = STP_ID as it's not used. What's missing though is your where condition with the WFD_WFDID = INSTANCEID
Currently you would move all workflow instances with this form type regardless of their parent workflow.

Select WFD_ID, PATH_ID from WFElements
join WFAvaiblePaths on WFD_STPID = PATH_STPID
--join WFSteps on WFD_STPID = STP_ID
where PATH_Name in ( 'Complete', 'Submit Estimation') --Replace your's path name here
and WFD_DTYPEID in ({DT:120}) --Replace your's form types variables

I now remember, that I used something similar in the past and it did work out. There also shouldn't be a problem with any closed subworkflows. After all their ids won't come up, if they don't have such a path.
Can you check for which workflow instance, the path should have been executed?
One other thing you can check is, whether there is any availability restriction on the path. If this would hide the path with this from the user, you won't be able to use the path in a move action either.

Best regards,
Daniel