Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
I have just updated Windchill from 12.0.2.7 to 12.0.2.8 and the workflow Process Manager no longer works. Doing a RMB > Open Process Manager opens the Process Manager as expected however the top pane shows "Error: Invalid Process Reference" instead of the work flow. The bottom pane shows the activities as expected.
Is there anybody else that has done this update and can confirm if you have this same issue or not?
I have opened a case with PTC yesterday but have not heard back yet from them.
Solved! Go to Solution.
I have discovered what the issue is. PTC changed codebase/apps/processmanager/processmanagergraph.jsp. I have attached processmanager.7z that contains 3 files:
It looks like they are attempting to add oid type validation. Basically PTC has added the following in 12.0.2.8:
Locale locale=SessionHelper.getLocale();
Pattern p1 = Pattern.compile("^OR:+wt.workflow.engine.WfProcess+:[0-9]{1,9}+$");//. represents single character
Pattern p2 = Pattern.compile("^OR:+wt.workflow.engine.WfBlock+:[0-9]{1,9}+$");
String oid = request.getParameter("oid");
boolean b = p1.matcher(oid).matches() || p2.matcher(oid).matches();
if(!b){
throw new WTException(new WTMessage("wt.workflow.work.ProcessManagerResource", ProcessManagerResource.PROC_INVALID_PROC_REF,null).getLocalizedMessage(locale));
}
So they are attempting to match something like this: "OR:wt.workflow.engine.WfProcess:2445483671"
They problem is they are only allowing 9 digits for the id and we are up to 10. The 2445483671 (an actual id from our system) is 10 digits long.
Didn't we already have this same issue for y2k?
Their regex also matches this OR:::::::::::::::::wtXorkflow.engine.WfProcessssssssss:244548367 because they have a '+' after the first colon, they have unescaped '.', and they have a '+' after "WfProcess".
In processmanagergraph.jsp.fixed-12.0.2.8.txt you can see I changed the Patterns to this:
// fixed patterns
// Note the '+' after "[0-9]" to match any number of digits
// Note the escaped '.' with "\\." to force a match on '.'
// Note the removal of the '+' after the ':' and the WfProcess|WfBlock
Pattern p1 = Pattern.compile("^OR:wt\\.workflow\\.engine\\.WfProcess:[0-9]+$");//. represents single character
Pattern p2 = Pattern.compile("^OR:wt\\.workflow\\.engine\\.WfBlock:[0-9]+$");
// PTC's y2k patterns
Pattern p1 = Pattern.compile("^OR:+wt.workflow.engine.WfProcess+:[0-9]{1,9}+$");//. represents single character
Pattern p2 = Pattern.compile("^OR:+wt.workflow.engine.WfBlock+:[0-9]{1,9}+$");
So if your Windchill system still has ida2a2's 9 digits or less then the update to 12.0.2.8 (or I assume probably 12.1.1.2 upcoming) will not be an issue. However if you are like us with more than 9 digits then the update will break your Process Manager.
Edit: Fixed a typo...
Hi Randy,
I've just patched our test server from 12.0.2.5 to 12.0.2.8 and the process manager works fine for me:
Kind regards,
Dmitry
Dmitry: Thanks for the confirmation.
I have discovered what the issue is. PTC changed codebase/apps/processmanager/processmanagergraph.jsp. I have attached processmanager.7z that contains 3 files:
It looks like they are attempting to add oid type validation. Basically PTC has added the following in 12.0.2.8:
Locale locale=SessionHelper.getLocale();
Pattern p1 = Pattern.compile("^OR:+wt.workflow.engine.WfProcess+:[0-9]{1,9}+$");//. represents single character
Pattern p2 = Pattern.compile("^OR:+wt.workflow.engine.WfBlock+:[0-9]{1,9}+$");
String oid = request.getParameter("oid");
boolean b = p1.matcher(oid).matches() || p2.matcher(oid).matches();
if(!b){
throw new WTException(new WTMessage("wt.workflow.work.ProcessManagerResource", ProcessManagerResource.PROC_INVALID_PROC_REF,null).getLocalizedMessage(locale));
}
So they are attempting to match something like this: "OR:wt.workflow.engine.WfProcess:2445483671"
They problem is they are only allowing 9 digits for the id and we are up to 10. The 2445483671 (an actual id from our system) is 10 digits long.
Didn't we already have this same issue for y2k?
Their regex also matches this OR:::::::::::::::::wtXorkflow.engine.WfProcessssssssss:244548367 because they have a '+' after the first colon, they have unescaped '.', and they have a '+' after "WfProcess".
In processmanagergraph.jsp.fixed-12.0.2.8.txt you can see I changed the Patterns to this:
// fixed patterns
// Note the '+' after "[0-9]" to match any number of digits
// Note the escaped '.' with "\\." to force a match on '.'
// Note the removal of the '+' after the ':' and the WfProcess|WfBlock
Pattern p1 = Pattern.compile("^OR:wt\\.workflow\\.engine\\.WfProcess:[0-9]+$");//. represents single character
Pattern p2 = Pattern.compile("^OR:wt\\.workflow\\.engine\\.WfBlock:[0-9]+$");
// PTC's y2k patterns
Pattern p1 = Pattern.compile("^OR:+wt.workflow.engine.WfProcess+:[0-9]{1,9}+$");//. represents single character
Pattern p2 = Pattern.compile("^OR:+wt.workflow.engine.WfBlock+:[0-9]{1,9}+$");
So if your Windchill system still has ida2a2's 9 digits or less then the update to 12.0.2.8 (or I assume probably 12.1.1.2 upcoming) will not be an issue. However if you are like us with more than 9 digits then the update will break your Process Manager.
Edit: Fixed a typo...
The same issue exists in 12.1.1.2. I have a 12.1.1.1 test system that I just updated to 12.1.1.2 and it has the same issue. The 12.1.1.2 processmanagergraph.jsp has the same changes as 12.0.2.8.
SPR 14189721 is reported for 12.0.2.x and fix will be targeted in upcoming CPS.
Workaround suggested by PTC:
***************************************************
FROM :
12Pattern p1 = Pattern.compile("^OR:+wt.workflow.engine.WfProcess+:[0-9]{1,9}+$");//. represents single character
13Pattern p2 = Pattern.compile("^OR:+wt.workflow.engine.WfBlock+:[0-9]{1,9}+$");
TO :
12Pattern p1 = Pattern.compile("^OR:+wt.workflow.engine.WfProcess+:\\d+$");//. represents single character
13Pattern p2 = Pattern.compile("^OR:+wt.workflow.engine.WfBlock+:\\d+$");
***************************************************
Thanks & Regards
Awesome! This is not yet "news" to the case I have open on this.
FYI:
The issue should be fixed OOTB with CPS 12.0.2.10
@dritter-3 wrote:
FYI:
The issue should be fixed OOTB with CPS 12.0.2.10
See https://www.ptc.com/en/support/article/CS380318
Fixed OOTB in 12.1.2.1 also.