Skip to main content

Anwendungsdaten manipulieren

2 Aufgaben

10 Min.

Visible to: All users
Anfänger
Pega Platform 8.4
Datenintegration
Deutsch
Prüfen Sie die Version, um sicherzustellen, dass Sie mit dem richtigen Inhalt arbeiten, oder schließen Sie die neueste Version ab.

Szenario

Um sicherzustellen, dass den Kunden nur die Serviceleistungen in Rechnung gestellt werden, die sie erhalten haben, möchte der Programm-Manager, dass die Anwendung eine Liste der vom Dienstleister erbrachten Leistungen anzeigt. In der Liste sollen die Bezeichnungen und die Anzahl der erbrachten Leistungen, der Einzelpreis und die Gesamtkosten jeder Leistung und die Gesamtkosten aller erbrachten Leistungen angezeigt werden. Konfigurieren Sie im Ablauf „Perform service“ die Datentransformation „CopySelectedServices“, um die erbrachten Leistungen von einem Service-Case in einen Assistance Request-Case zu kopieren.

Die folgende Abbildung zeigt die Beziehung der Seitenliste „Selected Services“ im Case-Typ „Assistance Request“ und der Seitenliste „Services“ im Case-Typ „Service“ zum Datentyp „Services offered“.

entity relationship diagram services offered

In der folgenden Tabelle finden Sie die Anmeldedaten, die Sie zur Durchführung der Challenge benötigen.

Rolle Benutzername Kennwort
Application Developer author@gogoroad pega123!

Sie müssen zum Abschließen dieser Challenge Ihre eigene Pega-Instanz starten.

Die Initialisierung kann bis zu 5 Minuten dauern, bitte haben Sie Geduld.

Challenge-Schritte

Genaue Übungsschritte

1 Configure the CopySelectedServices data transform

  1. In Dev Studio, from the navigation pane, click Case types > Service to open the Service case type.
  2. In the Perform service process, click Configure Process.
  3. Click Open process to open the Perform service flow record in the Process Modeler.
  4. In the Process Modeler, right-click the Select services connector and select View Properties to display the Connector properties dialog box.
    Select services connector View properties
  5. In the Connector properties dialog box, in the Set properties area, click Apply data transform to add a data transform to the connector. The dialog updates to display a Data transform field.
  6. In the Data transform field, enter CopySelectedServices to name the data transform.
    connector properties CopySelectedServices data transform
  7. To the right of the Data transform field, click the crosshairs icon to open the Create Data Transform form.
  8. On the Create Data Transform form, click Create and open to display a new data transform record.
  9. Configure the CopySelectedServices data transform.
    1. On the data transform record, from the Action drop-down, select For Each Page In to iterate over the items in a list. A second, indented row labeled 1.1 is displayed on the record.
    2. In the row labeled 1, in the Target field, enter or select .Services to iterate over the items in the Services list.
    3. In the Source column, select the Also use each page as source context check box to use the Services page as the source context to resolve property references.
    4. In the row labeled 1.1, from the Actions drop-down, select When to configure the condition for selecting a row. A third, indented row labeled 1.1.1 is displayed on the record.
    5. In the row labeled 1.1, in the Target field, enter .Quantity>0 to only select rows with a quantity greater than zero.
    6. In the row labeled 1.1.1, from the Actions drop-down, select Append to to append the contents of the selected row to a different list.
    7. In the row labeled 1.1.1, in the Target field, enter pyWorkCover.SelectedServices to copy the contents of the selected row to the Selected services field group in the Assistance request parent case.
    8. In the row labeled 1.1.1, from the Relation drop-down, select current source page to copy the contents of the selected row in the Services field group in the Service case.
      CopySelectedServices data transform definition
    9. On the data transform record, click the Pages & Classes tab to define the pyWorkCover page so that the data transform can resolve the Selected services property reference.
    10. In the Page name field, enter pyWorkCover as the name of the page to define.
    11. In the Class field, enter or select GoGo-GoGoRoad-Work-AssistanceRequest to define the context of the pyWorkCover page as the Assistance Request case type class. 
      CopySelectedServices data transform Pages and Classes tab
    12. Click Save to complete the configuration of the data transform.
  10. Click the open PerformService tab to return to the Perform service flow record.
  11. In the Connector properties dialog box, click Submit to complete the configuration of the Select services connector that runs the CopySelectedServices data transform.
  12. Click Save to complete the configuration of the Perform service flow record.
    Perform service flow

2 Confirm your work

  1. From the Create menu, select New > Assistance Request to create a new case.
  2. On the Create view, click Done to advance the case to the Enter customer information view.
  3. From the Actions drop-down, select Change stage to move the case to a different stage.
  4. From the Next stage drop-down, select Choose a stage. A second drop-down list is displayed to the right that lists the stages defined for the Assistance Request case type.
  5. From the drop-down list of stage names, select Service to advance the case to the Service stage and display the Select services view.
  6. Click Continue to switch the case to the Service stage.
  7. On the Select service provider view, select a service provider and click Submit.
  8. On the Select services view, enter the quantities provided in the following image. Verify that the total cost is USD100.
    Selected services USD100
  9. Click Submit to complete the Select services assignment and resolve the Service case. The Review service summary view is displayed.
    Tipp: You can verify the Service case is set to Resolved-Completed in the Open assignments area.
  10. On the Review service summary view, verify that the Selected services table displays the three rows filled out in the Service case and that the value of the Invoice total field is USD100.
    The Review selected services step, with service data passed from the Service case.
Hinweis: The empty first line in the list is a result of the Selected services list initialization. The empty line is added to the field group list by the pySetFieldDefaults data transform in the AssistanceRequest class. To prevent the empty line from appearing in the list, open the data transform, and delete the line that sets the value of .SelectedServices(1).pyLabel.
Hinweis: In a real-life implementation, ensure that the list of selected services in the Assistance Request caserestricts users from adding or removing items. You can remove the Add item and Delete controls by editing the section rule that displays the list, which is outside the scope of this challenge.


In der folgenden Mission verfügbar:

Wenn Probleme mit den Lerninhalten auftreten, lesen Sie bitte die Pega Academy Support FAQs.

Fanden Sie diesen Inhalt hilfreich?

Möchten Sie uns dabei helfen, diesen Inhalt zu verbessern?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice