Skip to main content
20-Turquoise
October 12, 2022
Solved

Workflow "Process Manager" no longer works after update from 12.0.2.7 to 12.0.2.8.

  • October 12, 2022
  • 4 replies
  • 3205 views

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.

 

process_manager.png

 

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.

Best answer by RandyJones

I have discovered what the issue is. PTC changed codebase/apps/processmanager/processmanagergraph.jsp.  I have attached  processmanager.7z that contains 3 files:

  • processmanagergraph.jsp-12.0.2.7.txt
    • processmanagergraph.jsp from 12.0.2.7
  • processmanagergraph.jsp.12.0.2.8.txt
    • processmanagergraph.jsp from 12.0.2.8
  • processmanagergraph.jsp.fixed-12.0.2.8.txt
    • my fixed version of processmanagergraph.jsp from 12.0.2.8
    • This is NOT an official PTC fix. This is simply what I have done...

 

 

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...

4 replies

14-Alexandrite
October 13, 2022

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:

DmitryC_0-1665631376698.png

 

 

 

Kind regards,

Dmitry

20-Turquoise
October 13, 2022

Dmitry: Thanks for the confirmation.

RandyJones20-TurquoiseAuthorAnswer
20-Turquoise
October 13, 2022

I have discovered what the issue is. PTC changed codebase/apps/processmanager/processmanagergraph.jsp.  I have attached  processmanager.7z that contains 3 files:

  • processmanagergraph.jsp-12.0.2.7.txt
    • processmanagergraph.jsp from 12.0.2.7
  • processmanagergraph.jsp.12.0.2.8.txt
    • processmanagergraph.jsp from 12.0.2.8
  • processmanagergraph.jsp.fixed-12.0.2.8.txt
    • my fixed version of processmanagergraph.jsp from 12.0.2.8
    • This is NOT an official PTC fix. This is simply what I have done...

 

 

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...

20-Turquoise
October 19, 2022

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.

18-Opal
November 18, 2022

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

20-Turquoise
November 18, 2022

Awesome! This is not yet "news" to the case I have open on this.

13-Aquamarine
May 23, 2023

FYI:

The issue should be fixed OOTB with CPS 12.0.2.10

See https://www.ptc.com/en/support/article/CS380318

20-Turquoise
May 23, 2023

@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.