Data Transform throws a Runtime exception when checked-in, works when checked-out

Hi,

I have an Activity ACT1 on Work class, which calls a Data Transform DT1, on the same context. This DT works on design time, but throws a runtime exception when running.

At some point, I realised that, when I check it out, DT1 work0, but fails when checked in. It throws a runtime exception, this is what I see in the tracer:

Failed to compile generated Java com.pegarules.generated.model.ra_model_checkquestionnairesoutcome_03073eb13c02a250facbf3e5a5572c8b: ----------
1. ERROR in /com/pegarules/generated/model/ra_model_checkquestionnairesoutcome_03073eb13c02a250facbf3e5a5572c8b.java (at line 81)
	actionProlog(pz_CurrentTraceInfo,"4", "For Each Page In", null, pz_2);
	                                                                ^^^^
pz_2 cannot be resolved to a variable
----------
2. ERROR in /com/pegarules/generated/model/ra_model_checkquestionnairesoutcome_03073eb13c02a250facbf3e5a5572c8b.java (at line 118)
	actionEpilog(pz_CurrentTraceInfo,"4", "For Each Page In", null, pz_2);
	                                                                ^^^^
pz_2 cannot be resolved to a variable
----------
2 problems (2 errors)
Compile failed.

This is what I see in the logs:

Failed to compile rule: /com/pegarules/generated/model/ra_model_checkquestionnairesoutcome_03073eb13c02a250facbf3e5a5572c8b.java 
The rule which attempted to use a non-accessible jar during rule compilation is: "com.pegarules.generated.model.ra_model_checkquestionnairesoutcome_03073eb13c02a250facbf3e5a5572c8b". Please see error above for non-accessible jar information. 
Failed to compile com.pegarules.generated.model.ra_model_checkquestionnairesoutcome_03073eb13c02a250facbf3e5a5572c8b, pzInsKey = RULE-OBJ-MODEL <Work class> CHECKQUESTIONNAIRESOUTCOME #20250425T071052.585 GMT; see class's compile log file. 
FirstUseAssemblerException

I saw this error in post: DataTransform is NOT executing when the Rule is Checked in | Support Center

But the solution link is no longer accessible: https://community1.pega.com/support-articles/page-set-data-transform-does-not-work-when-rule-checked

The exception occurs on a For each. The properties configured on the For Each are on a separate branch, lower / more generic than the branch containing this DT1 (so being on a separate branch should not be a problem). The branch ruleset of DT1 appears higher than the branch of the property on the Ruleset list.

I am sorry, but this makes no sense.

Thanks,

Filipe

Hi @Filipe Lopes,

Tried to replicate the issue you are getting. I created 2 branches, Branch1 contains a pagelist while Branch2 contains the DT which is looping this pagelist.

Branch1 is at bottom is stack while Branch2 is at top.

Im also able to get same error.

I guess while you have DT is private edit i.e. DT is in your personal Ruleset it is somehow able to pick the pagelist from the lower branch but when you dont have it in your private ruleset its not able to get the pagelist.

DT is working when I save that pagelist in same branch i.e. Branch2.

As you said it doesn’t make sense but could you once try saving that pagelist in same branch and check.

@im-ankit Thank you, the issue is that the branch with the property has already 266 rules, this is a new feature / component like, and the new branch is about further improvements, because we did not want to keep the other branch open forever and growing still.

New branch already contains around 80 rules.

As a work-around, sure I’ll try your solution, but I think maybe we should raise this as a Product issue then, because this is supposed to work!

@im-ankit I have changed the Data Transform to the same branch as the Pagelist Property, and it worked then.

I have raised an incident, this is not consistent behavior, in my opinion. You could have a Set, Update Page on a Page list defined on a separate branch, it’s just the For Each that throws an Exception. That seems like a defect in the Product.

Hi @Filipe Lopes,

Glad it worked, I think this issue is unique to branch ruleset development only. If i am replicating same in normal application ruleset it seems to be working fine.

As you said the inconsistency must be because of some issue in product.

Let us know if you get any reply on that incident, I am sure it will be helpful to others as well.

Thanks, Ankit

@im-ankit Thank you, i marked your suggestion as accepted solution, but this is like a Work-around, nevertheless really helpful.