Manage a ProDataGraph through the update cycle
Print
- Last Updated: July 22, 2025
- 3 minute read
- OpenEdge
- Version 12.2
- Documentation
ProDataGraph provides built-in support for
tracking updates with its ProChangeSummary
object. This object keeps track of what rows are changed (modified, added,
or deleted) in the ProDataGraph and also
keeps track of the original versions of modified or deleted rows so you can
compare those rows against the current rows. For more information on the
ProChangesSummary object, see ProChangeSummary class. In the procedure that follows, this and other OpenEdge support
facilitates management of the ProDataSet update cycle in a Java Open Client
application. To manage a ProDataGraph through an
update cycle:
-
Receive your working
ProDataGraphas anOUTPUTparameter of the application service. For more information, see Pass a ProDataGraph as OUTPUT.Note: While the actual parameter passing mode is application service dependent, anOUTPUTparameter is typical for an OERA-compliant application. -
Make changes to the
ProDataGraphon the client, as follows:- For information on finding rows in a ProDataGraph, see Find a row in a ProDataGraph.
- For information on modifying rows, see Add data to a ProDataGraph
- For information on adding rows, see Add a row to a ProDataGraph.
- For information on deleting rows, see Delete a row from a ProDataGraph.
Note: Because the application service sees the changes in its input ProDataSet using before-tables, all temp-tables subject to update are defined on the application server using theBEFORE-TABLEoption. To verify that a temp-table whose data you plan to update is defined with this option, you can check thebooleanvalue returned from thegetBImageFlag()method on theProDataObjectMetaDatathat corresponds to this temp-table. If the value istrue, you can update the correspondingProDataObjectcollection and the application service can handle the updates. -
Return the
ProChangeSummaryobject from your workingProDataGraphusing the followingProDataGraphmethod:Syntax
ProChangeSummary getProChangeSummary() -
Extract a separate changes-only
ProDataGraphfrom your workingProDataGraphusing the followingProChangeSummarymethod:Syntax
ProDataGraph getChanges() -
Pass the changes-only
ProDataGraphback to the application service using anINPUT-OUTPUTparameter. This allows the results to be passed back to the client in the same parameter.Note: While the actual parameter passing mode is application service dependent, anINPUT-OUTPUTparameter is typical for an OERA-compliant application. -
Process the results from the application
service in the output of the changes-only
ProDataGraphthat you passed to the application server in Step 5. ThisProDataGraphnow contains any additional changes, including errors, returned from the application server, as follows:- Handle any errors that might be
returned for each
ProDataObjectas well as theProDataGraphas a whole. For more information on checking errors, see Check for errors. - Check the final changes in the
output changes-only
ProDataGraphusing the methods of itsProChangeSummaryobject. For more information, see ProChangeSummary class. Compare the changed rows to the corresponding row in your working outputProDataGraph. Update the original row and add or delete additional required rows as described in Step 2.
- Handle any errors that might be
returned for each
-
Once you have merged all final changes into
your working
ProDataGraphin Step 6, use the following method to accept all changes in theProDataGraph:Syntax
void acceptChanges()This clears out the list of changes in the
ProChangeSummaryof yourProDataGraph, allowing it to accept more changes. -
Delete the changes-only
ProDataGraphfrom Step 5 and Step 6. -
Update any UI appropriately for your updated
working
ProDataGraph. -
You can now accept more changes to the working
ProDataGraph, as in Step 2, restarting the update cycle, again.