Support Article

Data flow invoking Activity with ConnectFile step error with NPE



User implemented a simple Data Flow that reads from table via Report Definition and calls activity that writes out results to a File via Connect-File method.
The data decision flow(DDF) when run manually errors out in the Activity:Connect-File step.

The location of the file path is valid as we are seeing the Pega Marketing application already writing data to flat file at that location.

Connect-File step shows Null Pointer exception.

Error Messages

Exception in stage: WriteToFile at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageOutputSubscriber.onError( at com.pega.dsm.dnode.api.dataflow.DataFlowStageProcessor.onError( at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onError( at com.pega.dsm.dnode.api.dataflow.DataFlowExecutor$QueueBasedDataFlowExecutor$3.process( at com.pega.dsm.dnode.api.dataflow.DataFlowExecutor$QueueBasedDataFlowExecutor.runEventLoop( at com.pega.dsm.dnode.api.dataflow.DataFlow$1.emit( at at com.pega.dsm.dnode.impl.dataflow.manager.LocalRun.execute( at com.pega.dsm.dnode.impl.dataflow.manager.LocalRun.lockAndRun( at at java.util.concurrent.Executors$ at at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at com.pega.dsm.dnode.impl.prpc.PrpcThreadFactory$ Caused by: com.pega.dsm.dnode.impl.core.ExceptionWithInputRecord: java.lang.NullPointerException at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onNext( at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onNext( at com.pega.dsm.dnode.api.dataflow.DataFlowExecutor$QueueBasedDataFlowExecutor$2.process( ... 11 more Caused by: java.lang.NullPointerException at com.pegarules.generated.activity.ra_action_invoke_7b7e26e3210d404a258d75fab7c2fcac.step2_circum0( at com.pegarules.generated.activity.ra_action_invoke_7b7e26e3210d404a258d75fab7c2fcac.perform( at com.pega.pegarules.session.internal.mgmt.Executable.doActivity( at com.pegarules.generated.activity.ra_action_writetofile_a80390755d67cf1ba463180245558d87.step3_circum0( at com.pegarules.generated.activity.ra_action_writetofile_a80390755d67cf1ba463180245558d87.perform( at

Steps to Reproduce

1. Create DDF.
2.  Read from Report Def, write to a file via Activity:Connect-File.
3. Create a Connect-File rule.
4. Call the rule in an activity.
5. Run the DDF.

Root Cause

The version of Invoke activity in the Pega Marketing ruleset is sync-ed up with the later version of PRPC and added additional null checks so that it work in the context of non Pega Marketing and Pega Marketing calls to connect-file methods.


As a local change, alter the activity call, do the following: 

1. Create a page called "OverRidePage" of class Embed-Template-FileConfig. 
2. Create empty properties FileName and FilePath on this page. 
3. Call the Connect-File method using OverRidePage as the step page. 

Published November 28, 2016 - Updated December 7, 2016

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.