Development steps
While it is possible to do some of this work in App Studio, the approach discussed here is based on a Dev Studio experience. App Studio hides some development details, like class names and rulesets, to present a development environment that can focus on case types and business processes, but for this exercise we need full control over those details.
Creating persistent datastore
Create a persistent data type and supporting rules for the new entity.
Creating data type ancestor
Add an abstract data class to the implementation layer to leverage the Enterprise Class Structure pattern and provide extension points for reusable rules common to the Entity implementation layer data types.
- To create a new class, click Create > SysAdmin > Class.
- In the Label field, enter Entity.
- In the Class Name box, enter or select PGPImp-DemoPGP-Data-Entity.
- Click Create and open.
- In the Select class type list, select Abstract.
- In the Settings section, in the Created in version box, enter or select the current version.
- In the Class inheritance section, in the Parent class (Directed) box, enter or select PegaPS-Data-Entity.
- Click Save.
Creating data type
Create the new Item data type and supporting rules.
- In the navigation pane of Dev Studio, click Data types.
- Click Options > Add data type.
- In the Add Data Type dialog box, click New Data Type.
- In the Label field, enter Item.
- In the Description field, enter an appropriate description for the class.
- Expand Advanced section.
- In the Parent class box, enter or select PGPImp-DemoPGP-Data-Entity.
- Click Submit to create the new data type and open it for editing
- On the Data model tab, use the Add field button to add properties the
Item data type
- Add a property named EntityID of type Text.
- Add a property pyID of type Text.
- Continue adding properties as desired to define the Item data type.
- Save the data type.
- Switch to the Sources tab and click Create a local source.
- Click Submit to create a local source for the Item data type.
- Save the data type.
- Switch to the Views tab and create the UI for the new data type.
- Click Create new view name the view ItemDetail with
Applies-To of PGPImp-DemoPGP-Data-Entity-Item.
- Place all the fields from the Item data type.
- Click Submit to save the view.
- Click Create new view name the view ItemDetailRO with Applies-To of
PGPImp-DemoPGP-Data-Entity-Item.
- Place all the relevant properties from the Item data type, with the Presentation -> Edit Options set to Read-Only.
- Click Submit to save the view.
- Save the Data type.
Extending the Work Ancestor Class
Add a Page property to the implementation layer work ancestor of type PGPImp-DemoPGP-Data-Entity-Item to hold an Item instance during case management processes. The new embedded page will hold (contain) an instance of the new data class embedded on the work.
- To add a new property, click Create > Data Model > Property.
- In the Label field, enter Item.
- In the Apply to box, enter, or select PGPImp-DemoPGP-Work.
- Click Create and open.
- On the General tab, in the Property type section, click Change.
- Click Single Page.
- In the Page definitionbox, enter or select PGPImp-DemoPGP-Data-Entity-Item.
- Click Save.
Creating Case Types
Manage or curate an entity data class (Data- class) in an independent data store (database table) by the Add, Update, View and Search case types (Work- classes).
- Creating Abstract Support Work Classes
- When a new implementation layer is generated by the New Application Wizard it only creates descendants for the selected concrete classes. Manually add the missing abstract work classes to leverage the Enterprise Class Structure pattern and provide extension points for reusable rules common to the Entity and Item implementation layer work types.
- To create a new class, click Create > SysAdmin > Class.
- In the Label field, enter Entity.
- In the Class Name box, enter or select PGPImp-DemoPGP-Work-Entity.
- Click Create and open.
- In the Select class type list, select Abstract.
- In the Settings section, in the Created in version box, enter or select the current version.
- In the Class inheritance section, in the Parent class (Directed) box, enter or select PegaPS-Work-Entity.
- Click Save.
- Click Create > SysAdmin > Class.
- In the Label field, enter Entity Item.
- In the Class Name box, enter or select PGPImp-DemoPGP-Work-Entity-Item.
- Click Create and open.
- In the Select class type list, select Abstract.
- In the Settings section, in the Created in version box, enter or select the current version.
- In the Class inheritance section, in the Parent class (Directed) box, enter or select PGPImp-DemoPGP-Work-Entity.
- Click Save.
- Creating Management Case Types
- Manage or curate an entity data class (Data- class) in an independent data store (database table) by the Add, Update, View and Search case types (Work- classes).
- In the navigation pane of Dev Studio, click Casetypes.
- Click Add a case type.
- In the Name field, enter a name for the case type.
- Optional: To change the inheritance model for this case type, expand the Advanced Settings section, update the Derives from (Directed) and Derives from (Pattern) inheritance settings, and then provide rulesets and ruleset versions.
- Click Submit.
- The lists of ancestor classes to choose from may not show recently added abstract classes unless you have logged out since they were added or otherwise reset the cache.
- Creating the Add Case Type
- In PGP the Add case type for Entities collects data from the operator in a Page embedded on the work class. At an appropriate step in the case life cycle a PGP Persist component is placed which writes out the data from the embedded page on the work to a persistent data class using the persistence configuration from the Database Table rule for the embedded page’s class.
- In the navigation pane of Dev Studio, click Casetypes.
- Click Add a case type.
- In the Name field, enter Add.
- Expand the Advanced Settings section.
- In the Derives from (Directed) box, enter or select PGPImp-DemoPGP-Work-Entity-Item as the directed ancestor.
- In the Derives from (Pattern) box, enter or select PGPImp-DemoPGP-Work-Entity-Item as the patterned ancestor.
- Click Submit.
- Create a workflow for the case type.
- On the Workflow tab, click Life cycle.
- In the default Create stage, click FORM STEP to add a Collect Information step.
- Enter Capture Item Details as the name for the step.
- Click Configure view.
- In the View Configuration add the Item field as a field group.
- Select ItemDetail from the View dropdown to use it as the View for the Item field group.
- Add a new Review stage.
- On the Workflow tab, click Life cycle.
- In the default Create stage, click FORM STEP to add a Collect Information step.
- Enter Review Item Details as the name for the step.
- Click Configure view.
- Use +STEP to add a Collection Information step under the Review stage named Review Item Details.
- From the step parameters panel (right) click Configure the View.
- In the View Configuration add the Item field as a field group.
- Select ItemDetailRO from the View dropdown to use it as the View for the Item field group.
- Use +STEP -> …More -> Processes and select Persist object.
- From the step parameters panel (right) configure the Persist
object component.
- For Type use Entity
- For Property use “item” (double quotes are significant)
- Change the case type rule label for PGPImp-DemoPGP-Work-Entity-Item-Add from Add to Add item.
- Save the Case.
- Creating the Update Case Type
- In PGP the Update case type for Entities solicits changes to the entity data from the operator and captures these changes in a Page or Page List embedded on the work class. At an appropriate step in the case life cycle a PGP Persist component is placed which writes out the data from the embedded page on the work to a persistent data class using the persistence configuration from the Database Table rule for the embedded page’s class.
- In the navigation pane of Dev Studio, click Casetypes.
- Click Add a case type.
- In the Name field, enter Update.
- Expand the Advanced Settings section.
- In the Derives from (Directed) box, enter or select PGPImp-DemoPGP-Work-Entity-Item as the directed ancestor.
- In the Derives from (Pattern) box, enter or select PGPImp-DemoPGP-Work-Entity-Item as the patterned ancestor.
- Click Submit.
- Create a Workflow for the case type.
- On the Workflow tab, click Life cycle.
- In the default Create stage, click FORM STEP to add a Collect Information step.
- Enter Edit Item Details as the name for the step.
- Click Configure view.
- In the View Configuration add the Item field as a field group.
- Select ItemDetail from the View dropdown to use it as the View for the Item field group.
- Click Submit to save the view.
- Create a new Review stage.
- Click +STAGE to add a stage and enter Review.
- Click +STEP > Collect information and name it Review Item Details.
- From the step parameters panel (right) click Configure the View
- In the View Configuration add the Item field as a field group
- Select ItemDetailRO from the View dropdown to use it as the View for the Item field group.
- Click Submit to save the view.
- Click +STEP > More > Processes > Persist Object.
- From the step parameters panel (right) configure the Persist object component.
- For Type use Entity
- For Property use “.Item” (double quotes are significant)
- Change the case type rule label for PGPImp-DemoPGP-Work-Entity-Item-Update from Update to Update item.
- Save the case.
- Edit the pyDefault data transform rule for the Update work type to
set the initial values on the .Item page from lookup data page.
- Switch to the Parameters tab and add a parameter named EntityID of type String
- Add a Set action to the transform definition.
- Use .Item as the Target.
- Use D_Item[pyID:Param.EntityID] as the Source.
- Save the data transform.
- Creating the View Case Type
- In PGP the View case type for Entities shows a comprehensive snapshot of an entity instance’s data.
- In the navigation pane of Dev Studio, click Casetypes.
- Click Add a case type.
- In the Name field, enter View.
- Expand the Advanced Settings section.
- In the Derives from (Directed) box, enter or select PGPImp-DemoPGP-Work-Entity-Item as the directed ancestor.
- In the Derives from (Pattern) box, enter or select PGPImp-DemoPGP-Work-Entity-Item as the patterned ancestor.
- Click Submit.
- Create a Workflow for the case type.
- In the name field of the Create stage, enter or select PegaPS-Work-Entity view from the list of available stage processes.
- Change the case type rule label for PGPImp-DemoPGP-Work-Entity-Item-View from View to View item.
- Click Save.
- Save the PegaPS.Details section as
PGPImp-DemoPGP-Work-Entity-Item-View.Details.
- Include the section PGPImp-DemoPGP-Data-Entity-Item.Details using the Item property as the page context.
- Save the section.
- Edit the pyDefault data transform rule for the View
work type to set the initial values on the.Item page from
lookup data page.
- Switch to the Parameters tab and add a parameter named EntityID of type String.
- Add a Set action to the transform definition.
- Use Item as the Target.
- Use D_Item[pyID:Param.EntityID] as the Source.
- Save the data transform.
- Creating the Search Case Type
- In PGP the Search case type collects filter criteria from the user and retrieves a list of matching entities which may then be selected for further processing.
- In the navigation pane of Dev Studio, click Casetypes.
- Click Add a case type.
- In the Name field, enter Search.
- Expand the Advanced Settings section.
- In the Derives from (Directed) box, enter or select PGPImp-DemoPGP-Work-Entity-Item as the directed ancestor.
- In the Derives from (Pattern) box, enter or select PGPImp-DemoPGP-Work-Entity-Item as the patterned ancestor.
- Click Submit.
- In the Stage Name field for the Create stage use the smart-prompt to select the PegaPS-Work.Search stage from the list of available stages.
- Override/Save As the PegaPS-Work.Search section as PGPImp-DemoPGP-Work-Entity-Item-Search.Search.
- Edit the PGPImp-DemoPGP-Work-Entity-Item-Search.Search section.
- Use Structural > Embedded Section to include the section
PegaPS-Data.Search in the dynamic layout.
- For Page context choose Use clipboard page.
- For Class enter PGPImp-DemoPGP-Data-Entity-Item.
- For Clipboard page select Item from the list.
- For Section choose by name and select Search from the list.
- For PARAMETER ShowSearchType set Value to nothing.
- Click Submit.
- Save the section.
- Override/SaveAs the PegaPS-Data.SearchCriteria section as
PGPImp-DemoPGP-Data-Entity-Item.SearchCriteria.
- Add the key properties for PGPImp-DemoPGP-Data-Entity-Item to this section.
- Save the section.
- Override/SaveAs the PegaPS-Data.SearchResults section as PGPImp-DemoPGP-Data-Entity-Item.SearchResults.
- Edit the PGPImp-DemoPGP-Data-Entity-Item.SearchResults section.
- Use Structural > Table to add a table layout to the section and Configure the
table.
- For Source choose Data page.
- For Data page select D_ItemList from the list.
- For Parameters check Pass the parameter page.
- Submit.
- Save the section.
Enabling for App Studio
Socialize the new rules with the dev environment so that they work with, for example, smart-prompting.
- Use views and design templates to construct the user interface.
- Manage the new Entity’s rules in Relevant Records so that appropriate choices will appear in the App Studio smart prompts.
- For appropriate case types set the Show in ‘New’ menu checkbox under Settings -> General to enable the case type to appear on +Create nav.
Previous topic New entity overview Next topic Rule inventory