Explaining Data Objects

Objective

After completing this lesson, you will be able to explain data objects

Process Data

A process can be defined as a specific order of events and activities that aim for a certain goal. This data is stored in the process context. These events and activities have strictly defined inputs and outputs and are connected in a process and eventually produce a value. The process context is the sum of all data objects including the roles information.

The process context is represented by a data structure defined in an XSD file. To add the process context and import all the data types that are needed, you import an XSD file. The XSD file defines the data types that you can assign to data objects. The data objects are used to define input and output data, which is mapped to an activity in the process mode. To track the data changes, you must define the input and output mapping. The mapping in the process composer does not support all data types. The XSD file defines the data types assigned to data objects.

Overview of Data Types

ElementUsage
Elements typed as xsd:anySimpleType.Not supported
xsd:anyIgnored
xsd:anyAttributeIgnored
xsd:choiceTreated as xsd:sequence.
xsd:allTreated as xsd:sequence.
Occurrence constraints on xsd:choice, xsd:sequence, xsd:all.Treated as minOccurs=1, maxOccurs=1.
Occurrence constraints on xsd:element.Treated as single value for minOccurs <= 1 and maxOccurs = 1, otherwise treated as list with arbitrary number of entries.
Constraining facetsBehavior undefined, may get enforced/ignored by the underlying (SDO) data representation.
Mixed contentTreated as complex structure without simple content.
Default values for elements/attributesIgnored
Element substitution groupsNot supported
Complex structure without contained fieldsNot supported

Each process is provided with a predefined data structure called ProcessInstanceAttributes. It contains the following read-only data objects.

Process Instance Attributes, Data Structure:

  • ProcessInstanceId that holds the ID of the process instance, which is acquired at runtime automatically.

  • ProcessInitiator that stores data about the user who started the process.

To Access the Process Management Tool

To view the Process Instance ID and Process Initiator, access the Process Management Tool.

Use the following high level procedure:

Steps

  1. Log in to SAP NetWeaver Administrator.

  2. Choose the Operations tab.

  3. Choose the Process and Task option.

  4. Choose Manage Processes.

Result

Both data objects are visible in the mapping editor and below the Context node in the expression editor.

XSD File Creation

XSD files contain the structure of the data contained within a data object. To change the default data type settings, you need to create or import an XSD file. XSD files are created using the Composite Designer perspective and using the function Data TypeNew.

Graphical Editor Functions are

  • Use the function Add element to create data types, elements, and attributes.

  • Use the function Set Multiplicity to define the multiplicity of elements (1..1, 1..n, 0..1 and 0..n).

You can import existing XSD files from the SAP NetWeaver Developer Studio (NWDS) Process Development perspective using the Import tool.

XSD File Import Steps are:

  1. In the SAP NWDS Process Development perspective, choose FileImport.

  2. In the dialog box that appears, expand Web Services, and choose XSD. Choose Next.

  3. Choose Browse to define an output folder for the XSD source file. Choose OK.

  4. From the Available XSD sources, choose Remote Function/File System, then choose Next.

  5. Choose an XSD file to import.

    To do so, choose Browse, then navigate to choose the applicable XSD file. Alternatively, enter a URL from which to import the file.

  6. Choose Finish.

    The XSD file appears in your project in the Process ModelingData TypesXSD Files. Also, the XSD source file appears in the output folder you defined.

XSD Files and Data Objects

After you create or import an XSD file, you need to associate it with a data object.

The high level procedure for editing an XSD file is as follows:

  1. Expand Process Modeling, then expand Data Types and XSD Files.
  2. In the context menu of an XSD file, choose Open.

  3. In the context menu of Elements (on the Design tab), choose Add Element.

  4. Under Elements, choose an element and define its properties.

  5. In the context menu of Types (on the Design tab), choose Add Complex Type or Add Simple Type.

  6. Under Types, choose a type and define its properties.

The XSD File Editing Guidelines are:

  • Make sure that your process is opened for editing in the Process Composer.

  • To create a new data object, choose the Data Object entry in the Artifacts section of the Palette and click the modeling surface.

  • To change the name of the data object, proceed to the Properties view and open the General tab.

The figure, XSD File and Data Object (BPMN: Artifact), highlights the XSD file (on the left side), and the Data Object (on the right side).

Assignment of XSD Files to Data Objects

A data object is a type of artifact that allows you to store process related data. It provides additional information in the process you model. A key point is that the data object manages the process context. The output of one activity is the input information for a subsequent activity in the process. The process context enables the sharing of data throughout a business process and makes that data available to all flow objects.

The data object is linked to a data type or data structure. You can create the XSD directly in NWDS, imported from the Enterprise Service Repository (ESR) or from a local file system.

When the process needs to call an external Web service, you will need to import the WSDL from the Service Interface in the ESR. When the process calls a Web service it will be via Advance Adapter Engine Extended (AEX). Here the AEX will act as the enterprise service bus.

To make an executable process out of the process modeled, you need to add the business logic. The process steps represented by events and activities are still without content. The flow objects need to feed on data.

Summary of the XSD File Usage:

  1. The process context is the sum of all data objects including the roles information.

  2. In a process, data is being changed and transported by events and activities. This data is stored in the process context.

  3. The process context is represented by a data structure defined in an XSD file. To add the process context and import all the data types needed you import an XSD file.

  4. The XSD file defines the data types you assign to data objects.

  5. You use data objects to define input and output data, which you map to an activity in the process you model.

  6. To track the data changes you need to define the input and output mapping. The process context is the sum of all data objects including the roles information.

Log in to track your progress & complete quizzes