cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

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

RandyJones
19-Tanzanite

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

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.

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

8 REPLIES 8
DmitryC
14-Alexandrite
(To:RandyJones)

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

RandyJones
19-Tanzanite
(To:DmitryC)

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:

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

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

RandyJones
19-Tanzanite
(To:Priyanka)

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

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

RandyJones
19-Tanzanite
(To:dritter-3)


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

Announcements


Top Tags