Data flow fails to run from a job scheduler in the System Runtime Context
Resolve issues with running a data flow from a job scheduler that is configured to use the System Runtime Context (SRC).
Condition
A job scheduler that is configured to run in the SRC fails to execute a data flow activity. The server node logs contain an error message that the system could not start the data flow, as in the following example:
Unable to find dataflow rule [PegaCRM-Entity-Contact.LoadRelIntData] com.pega.pegarules.pub.generator.RuleNotFoundException: Failed to find a 'RULE-DECISION-DDF' with the name 'LOADRELINTDATA' that applies to 'PegaCRM-Entity-Contact'. There were 3 rules with this name in the rulebase, but none matched this request. The 3 rules named 'LOADRELINTDATA' defined in the rulebase are: 3 related to applies-to class 'PegaCRM-Entity-Contact', but were defined in rulesets which are not in your rulesetlist: {SA-Artifacts_Branch_RDchanges:01-01-01, SA-Artifacts_Branch_RelInt_Rev1:01-01-01, SA-Artifacts:08-05-01}
Caused by: com.pega.dsm.dnode.api.dataflow.service.DataFlowActivationException: Could not start run DataFlowRunConfig{serviceInstanceName=Batch, runId=, className=PegaCRM-Entity-Contact, ruleName=LoadRelIntData, accessGroup=PRPC:Agents} at com.pega.dsm.dnode.impl.dataflow.task.StartRunTask.startRun(StartRunTask.java:104) ~[d-node.jar:?] at com.pega.dsm.dnode.impl.dataflow.service.DataFlowRunManagerImpl.start(DataFlowRunManagerImpl.java:76) ~[d-node.jar:?]
For more information about viewing logs, see Log files tool.
Cause
Data flows can only run in the context of the access group that is specified in the pyAccessGroup property in the Data-Decision-DDF-RunOptions class, or if this property is not set, the access group of the current thread.
A job scheduler that is configured to run in the SRC uses a different mechanism to determine the context in which to execute an activity. This context is the run-time list of rulesets that is maintained in the SRC. In such cases, the job scheduler does not operate on a single access group, and does not set the access group of the current thread. As a result, the job scheduler might fail to execute a data flow, unless the access group is explicitly passed on to the data flow. To achieve this, add a step to the data flow activity to set the pyAccessGroup property for the data flow, as described in the following procedure.
Solution
- In the navigation pane of Dev Studio, click Records.
- Expand the SysAdmin category, and then click Job Scheduler.
- In the Context field, ensure that Use System Runtime Context is selected.
- Click the Open icon to the right of the Activity field.
- On the Pages & Classes tab, ensure that the
list contains a page with the following parameters:
Page name: RunOptions Class: Data-Decision-DDF-RunOptions - On the Steps tab, add a step to the activity
with the following settings:
- Method: Property-Set
- Step page: RunOptions
- PropertiesName: pyAccessGroup
- PropertiesValue: access group to be used to run the data flow
- Click Save as, and then click Create and open.
- Click Save.
Previous topic Data flows cannot parse JSON records Next topic Data flow runs return errors while writing records to a database data set