Try OpenEdge Now
skip to main content
Application Developer's Guide
Developing BPM Workflow adapters : Using system adapters : Using the PAKUpdateDS adapter

Using the PAKUpdateDS adapter

Use the PAKUpdateDS Adapter to save user-entered dataslot information from an incomplete Web application. The PAKUpdateDS Adapter is always related to a Business Process Portal and BPM Designer interaction.
During application development, you can use the PAKUpdateDS system adapter to save the process state during run time without completing the workstep. Use the PAKUpdateDS Adapter when you have an application that is long-lived and you want to save information added up to the location where the PAKUpdateDS is placed (for instance, a specific workstep) in the application process.
An online survey is an example of a long Web application during which it may be necessary to save the process instance state during run-time. There may be many options and choices, and users may not be able to complete the entire process at one time. You can insert the PAKUpdateDS Adapter to save the information entered by the user up to that point. Although the PAKUpdateDS Adapter saves the data you have entered, it does not save the flow and you must proceed through the saved options and choices to arrive at the point where the PAKUpdateDS Adapter was inserted.
To use the PAKUpdateDS Adapter to save information entered into dataslots in an incomplete Web application:
1. Add an Adapter workstep in the process template as an alternative step at the point where you want to save all preceding information.
Figure 16. Defining the PAKUpdateDS Adapter Workstep
2. Define the adapter properties (right image, Figure 16).
a. Type a name in the Name box.
b. Enter the Java class name for the adapter. For the PAKUpdateDS, enter com.savvion.BPM Workflow.beans.PAKUpdateDS in the Class box.
The Method box is not enabled. You are only able to use the commit method for BPM Workflow adapters.
c. Make sure the Generate Java code checkbox is not selected. System adapters should not generate a Java file when the adapter workstep is run.
d. Click OK to add the adapter workstep. Open the Properties view for this workstep, where the adapter you have added is shown as the performer of the workstep.
3. As shown in Figure 17, make sure that the Activity workstep—in this example, "Question 6"—that represents the point where data is to be saved, has two connectors from it: one to the main flow of the process; the other to the PAKUpdateDS adapter.
Figure 17. Defining the connectors
4. Double-click the connector to the PAKUpdateDS adapter workstep, to open its Link Properties dialog box (upper-right image, Figure 17). Select "Submit button" option from the Type list, and type a name in the Label box—in this case, "Save."
5. Double-click the connector to the main flow of the process, to open its Link Properties dialog box (lower-right image, Figure 17). Define the connector as a Submit button connector type and type a label name—in this case, "Continue."
6. You have now added two buttons to the interface page:
*A Save button that connects to the PAKUpdateDS adapter. In the example, where the adapter output is to an End workstep, you can define the adapter as a Save and Exit mechanism, saving data entered up to that point and exiting to BP Server. Alternatively, you can set the adapter output back to the process, in which case it acts as a Save and Continue mechanism, which means that you have saved the data entered so far, and remain at that location in the process.
*A Continue button that proceeds with the workflow, without saving any data.
7. Click the Dataslots tab in the adapter’s Properties view. Click Add and then select the dataslots that you require from the Select Dataslots dialog box. Make sure that dataslots selected for this system adapter are input dataslots. The connecting of dataslots to required system adapter properties is performed internally.
The information entered in the selected dataslots is saved up to the point where you inserted the PAKUpdateDS adapter. This information is saved, even though the Web Application has not been completed.
As explained in the above example, the PAKUpdateDS adapter workstep has now been added to the process diagram. Business Process Server now displays buttons labeled "Save" and "Continue" on the "Question 6" workstep interface. If the user clicks Save, then the PAKUpdateDS Adapter saves the state of all mapped dataslots up to that point. If the user clicks Continue, then the user simply continues in the process.