Working with Service Actions, Atomic Actions, and Action Processors

When working with service actions, atomic actions, and action processors, see the following topics:

About Service Action, Atomic Action, and Action Processor Relationships

When modeling services, you define the relationship among service actions, action processors, and atomic actions. In Activation Network cartridges, you link these entities in a 1:1:1 relationship. In Activation Service cartridges, you link these entities in a 1:1:many or in a 1:many:many relationship.

Note:

In most cases, you will not use the service models created for Activation Network cartridges in customer specific solutions. For Activation Network cartridges, these entities mainly provide a complete service model that can be used to test the cartridge action processors upon cartridge delivery.

See the following topics:

About Activation Network Cartridge Relationships

You can use the Cartridge Generation tool to generate required service actions, action processors, and atomic actions for any combination of action and entity and to map the entities in the appropriate 1:1:1 relationship. See "Generating Framework Models" for information about the Cartridge Generation tool.

About Activation Service Cartridge Relationships

You can use the Cartridge Generation tool only to generate service actions, as the Cartridge Generation tool cannot determine which atomic actions (one or possibly more) must be spawned for each service action. You create new atomic actions and action processors or select these entities from imported Activation Network cartridge projects. You then map each service action to several atomic actions, each of which need to be mapped to one or more action processors (1:1:many or 1:many:many relationship).

Note:

An atomic action from an imported cartridge is already mapped to one action processor. If you reuse the atomic action from the cartridge, do not change this mapping and do not map additional action processors to the atomic action. An atomic action that you create is not yet linked to other entities (service actions and action processors) and therefore always needs to be mapped. To link action processors to atomic actions, and to link atomic actions to service actions, drag an entity from the Studio Projects view to the mapping tab in the editor of the entity to which you want to link. For example, select an action processor from a cartridge project in your Studio Projects view, then drag the action to the Action Processor Mapping tab in the editor of the appropriate atomic action. Similarly, you can drag atomic actions to the Atomic Action tab of a Service Action editor.

About Action Processors

For every action processor you must define a processor as the implementation that performs the work. You can use a classic Java implementation or a state table implementation. However, the recommended approach is to implement using Java with code generation. This method provides code that would normally have to be written by developers.

Related Topics

Loading XML String Parameter into XML Related Technologies

Loading XML String Parameter into XML Related Technologies

The autogenerated code produces content in string format for all parameter types including the XML run-time parameter type. However, some network elements require different XML technologies such as document object model (DOM), simple API for XML (SAX), XML beans, and so on. You can create Java code to perform this conversion.

For example, the following sample code loads an XML string parameter into a XML DOM parameter:

public Document buildDocumentFromString(String xmlString)
throws Exception
{
try
{
StringReader stringReader = new StringReader(xmlString);
 
SAXBuilder builder = new SAXBuilder();
 
Diagnosis.diag(1, this, "Building document for :\n" + xmlString);
Document doc = builder.build(stringReader);
return doc;
}
catch (Exception e) {
String exceptionMessage = "Exception caught : " + e.toString();
Diagnosis.diag(1, this, exceptionMessage);
throw new Exception("XML Error" + exceptionMessage);
}
}

Related Topics

About Action Processors

Creating Service Actions, Atomic Actions, and Action Processors

You can create atomic actions, service actions, and action processors when modeling services for an Activation Cartridge project.

Note:

Follow the steps in this procedure to create entities for Activation Service cartridges. After you create the entities, you must link the entities manually. Entities for Activation Network cartridges are usually created and linked with the Cartridge Generation tool.

To create a Service Action, Atomic Action, or Action Processor entity:

  1. From the Studio menu, select Show Design Perspective.

  2. From the Studio menu, select New, select Activation, then select the action entity.

    The Studio Model Entity wizard appears.

    Note:

    The vendor, technology, software load fields of the wizards are non-editable for entities of Activation Network cartridges, but are writable for those of Activation Service cartridges. Activation Service cartridges may contain different types of service models, some of which do not identify a specific vendor, technology, or software-load attribute to indicate that they may be used to activate services on equipment from multiple vendors.
  3. Select the applicable project.

  4. Enter an action or select a previously defined action from the list (for example, ADD, MOD, DEL, or QUERY).

  5. Enter a name for the entity (for example, SUBSCRIBER, GSM-SUBSCRIBER, ROUTE, TRUNK, or LINE).

    An updated name and a location name appears in non-editable fields based on the information in the Vendor, Technology, Software Load, Action, and Entity fields.

  6. (Optional) Select a location for the entity.

    By default, Design Studio saves the entity to your default workspace location. You can enter a folder name in the Folder field or select a location different from the system-provided default. To select a different location:

    1. Deselect the Use recommended name and location check box.

    2. Click the Folder field Browse button.

    3. Navigate to the directory in which to save the entity.

    4. Click OK.

  7. Click Finish.

    The new action entity appears in the Project folder in the Studio Projects view.

Note:

You must correct any problem markers on any entities before you deploy the cartridge project. See the Problems view for a short description of existing problems. For best results, set the Problem view filter to On selected element and its children to view problems in their full context.

If problem markers seem invalid (for example, if they continue to reappear after you fix the problem in the configuration), you can usually remove these problems by selecting Project, Clean from the main menu. Select one or all listed projects and click OK. Oracle Communications Design Studio discards all build problems and build states of the selected projects and rebuilds the projects from scratch.

Related Topics

About Activation Network Cartridge Projects

About Activation Service Cartridge Projects

Generating Framework Models

Modeling ASAP Services

Creating Activation Run-Time Type Parameters in the Data Dictionary

You create activation run-time type parameters that can be used in the linked entities in their respective editors (you can also do this before linking the entities).

Note:

If you want to use the automatically generated code (see "Defining Action Processor Properties") and if you want the code to include content that support parameters, you must first create the parameters and associate them to atomic actions (see "Defining Atomic Action Properties") before generating the code.

For more information about activation parameters, see ASAP Cartridge Development Guide.

Design Studio supports the following:

Creating a Scalar Parameter

Scalar parameters are conventional name-value pair parameters.

To create a mandatory, optional, or indexed scalar parameter:

  1. From the Studio menu, select Show Design Perspective.

  2. Click the tab for the Dictionary view.

  3. Right click in the Dictionary view and select Add Simple Schema Element.

    The Create Data Schema Element wizard appears.

  4. Enter the following:

    1. In the Entity field, enter the name of the project to which you want to add a scalar parameter.

    2. In the Name field, enter an element name.

    3. In the Display Name field, enter a display name. The Data Schema editor supports multiple languages for this field. The field adjacent to Display Name displays your language. You can define a Display Name field value for any language you select from the list. For more information, see Oracle Communications Design Studio Help.

    4. In the Multiplicity field, select one of the following:

      • Required: This attribute makes the parameter mandatory.

      • Optional: This attribute makes the parameter optional.

      • Range: Any ranged parameter with a Minimum value greater than 0 is considered a mandatory ASAP parameter. Any ranged parameter with a Minimum value of 0 is considered an optional ASAP parameter.

  5. Click Finish.

    The new parameter appears in the Dictionary view. You may need to expand the schema for your cartridge to see it.

  6. Double-click the new parameter to open the Data Schema editor with that parameter selected.

  7. Click the Activation subtab.

  8. From the Runtime type list, select SCALAR.

  9. (Optional) Select Indexed to index the parameter.

Related Topics

Creating Service Actions, Atomic Actions, and Action Processors

Configuring Service Action, Atomic Action, and Action Processor Properties

Modeling ASAP Services

Atomic Action Editor

Creating a Compound Parameter

To create a compound parameter:

  1. From the Studio menu, select Show Design Perspective.

  2. Click the tab for the Dictionary view.

  3. Right click in the Dictionary view and select Add Structured Schema Element.

    The Create Data Schema Structure wizard appears.

  4. Enter the following:

    1. In the Entity field, enter the name of the project to which you want to add a scalar parameter.

    2. In the Name field, enter an element name.

    3. In the Display Name field, enter a display name. The Data Schema editor supports multiple languages for this field. The field adjacent to Display Name displays your language. You can define a Display Name field value for any language you select from the list. For more information, see the Oracle Communications Design Studio Help.

    4. In the Multiplicity field, select one of the following:

      • Required: This attribute makes the parameter mandatory.

      • Optional: This attribute makes the parameter optional.

      • Range: Any ranged parameter with a Minimum value greater than 0 is considered a mandatory ASAP parameter. Any ranged parameter with a Minimum value of 0 is considered an optional ASAP parameter.

  5. Click Finish.

    The new parameter appears in the Dictionary view. You may need to expand the schema for your cartridge to see it.

  6. Double-click the new parameter to open the Data Schema editor with that parameter selected.

  7. Click the Activation subtab.

  8. From the Runtime type list, select COMPOUND.

    Note:

    All child elements inherit the Activation tab attributes from the base compound element.
  9. (Optional) Select Indexed to index the parameter.

  10. Right click the new parameter in the Dictionary view and select Add Simple Child Schema Element.

    The Create Data Schema Element wizard appears.

    Note:

    Compound parameters do not support structured child schema elements.
  11. Enter the following:

    1. In the Name field, enter an element name.

    2. In the Display Name field, enter a display name. The Data Schema editor supports multiple languages for this field. The field adjacent to Display Name displays your language. You can define a Display Name field value for any language you select from the list. For more information, see the Oracle Communications Design Studio Help.

    3. In the Multiplicity field, select one of the following:

      • Required: This attribute makes the parameter mandatory.

      • Optional: This attribute makes the parameter optional.

      • Range: Any ranged parameter with a Minimum value greater than 0 is considered a mandatory ASAP parameter. Any ranged parameter with a Minimum value of 0 is considered an optional ASAP parameter.

  12. Click Finish.

  13. Repeat steps 10 to 12 for any additional parameters to be included in the compound parameter.

Related Topics

Creating Service Actions, Atomic Actions, and Action Processors

Configuring Service Action, Atomic Action, and Action Processor Properties

Modeling ASAP Services

Atomic Action Editor

Creating an XML Parameter

To create an XML parameter:

  1. From the Studio menu, select Show Design Perspective.

  2. Click the tab for the Dictionary view.

  3. Right click in the Dictionary view and select Add Simple Schema Element.

    The Create Data Schema Element wizard appears.

  4. Enter the following:

    1. In the Entity field, enter the name of the project to which you want to add a scalar parameter.

    2. In the Name field, enter an element name.

    3. In the Display Name field, enter a display name. The Data Schema editor supports multiple languages for this field. The field adjacent to Display Name displays your language. You can define a Display Name field value for any language you select from the list. For more information, see the Oracle Communications Design Studio Help.

    4. In the Multiplicity field, select one of the following:

      • Required: This attribute makes the parameter mandatory.

      • Optional: This attribute makes the parameter optional.

      • Range: Any ranged parameter with a Minimum value greater than 0 is considered a mandatory ASAP parameter. Any ranged parameter with a Minimum value of 0 is considered an optional ASAP parameter.

  5. Click Finish.

    The new parameter appears in the Dictionary view. You may need to expand the schema for your cartridge to see it.

  6. Double-click the new parameter to open the Data Schema editor with that parameter selected.

  7. Click the Activation subtab.

  8. From the Runtime type list, select XML.

Related Topics

Creating Service Actions, Atomic Actions, and Action Processors

Configuring Service Action, Atomic Action, and Action Processor Properties

Modeling ASAP Services

Atomic Action Editor

Creating an XPATH Parameter

To create an XPATH parameter:

  1. From the Studio menu, select Show Design Perspective.

  2. Click the tab for the Dictionary view.

  3. Right click in the Dictionary view and select Add Simple Schema Element.

    The Create Data Schema Element wizard appears.

  4. Enter the following:

    1. In the Entity field, enter the name of the project to which you want to add a scalar parameter.

    2. In the Name field, enter an element name.

    3. In the Display Name field, enter a display name. The Data Schema editor supports multiple languages for this field. The field adjacent to Display Name displays your language. You can define a Display Name field value for any language you select from the list. For more information, see the Oracle Communications Design Studio Help.

    4. In the Multiplicity field, select one of the following:

      • Required: This attribute makes the parameter mandatory.

      • Optional: This attribute makes the parameter optional.

      • Range: Any ranged parameter with a Minimum value greater than 0 is considered a mandatory ASAP parameter. Any ranged parameter with a Minimum value of 0 is considered an optional ASAP parameter.

  5. Click Finish.

    The new parameter appears in the Dictionary view. You may need to expand the schema for your cartridge to see it.

  6. Double-click the new parameter to open the Data Schema editor with that parameter selected.

  7. Click the Activation subtab.

  8. From the Runtime type list, select XPATH.

  9. (Optional) Select Indexed to index the parameter.

  10. In the Dependent XML field create or select a dependent XML. This attribute displays the path of the XML file that defines the parameter. This field is available only for the XPATH run-time type parameter.

Related Topics

Creating Service Actions, Atomic Actions, and Action Processors

Configuring Service Action, Atomic Action, and Action Processor Properties

Modeling ASAP Services

Atomic Action Editor

Grouping Scalar Parameters using Structured Elements

You can group ASAP scalar parameters using a structured data element. A structured data element is a container that holds ASAP parameters. The following scalar groups are defined using two levels of structured data elements:

Structure element1
     Structure element2
              Scalar1
              Scalar2
Structure element3
     Structure element4
              Scalar3
              Scalar4

For example, these structured data elements might be defined as:

Person
     Name
         First_name
         Last_name
Place
     Address
         Number
         Street

The structured data elements used in Design Studio are converted into individual ASAP scalar parameters by absorbing the structured data element names into the scalar parameter name. The previous example would appear as follows:

Person_Name_First_name
Person_Name_Last_name
Place_Address_Number
Place_Address_Street

The default character used to separate the elements in the ASAP parameter names is the underscore (_). You can change this character. See "Activation Preferences Page" for more information.

To group scalar parameters:

  1. From the Studio menu, select Show Design Perspective.

  2. Click the tab for the Dictionary view.

  3. Right click in the Dictionary view and select Add Structured Schema Element.

    The Create Data Schema Structure wizard appears.

  4. Enter the following:

    1. In the Entity field, enter the name of the project to which you want to add a scalar parameter.

    2. In the Name field, enter an element name.

    3. In the Display Name field, enter a display name. The Data Schema editor supports multiple languages for this field. The field adjacent to Display Name displays your language. You can define a Display Name field value for any language you select from the list. For more information, see the Oracle Communications Design Studio Help.

    4. In the Multiplicity field, select one of the following:

      • Required: This attribute makes the parameter mandatory.

      • Optional: This attribute makes the parameter optional.

      • Range: Any ranged parameter with a Minimum value greater than 0 is considered a mandatory ASAP parameter. Any ranged parameter with a Minimum value of 0 is considered an optional ASAP parameter.

  5. Click Finish.

    The new parameter appears in the Dictionary view. You may need to expand the schema for your cartridge to see it.

  6. Double-click the new parameter to open the Data Schema editor with that parameter selected.

  7. Click the Activation subtab.

  8. From the Runtime type list, select SCALARS.

  9. Right click the new parameter in the Dictionary view and select one of the following:

    • Add Simple Child Schema Element: Select this attribute if you want to immediately define xml or scalar parameters within the first structured element. If you select this option, go to step 10.

    • Add Structured Child Schema Element: Select this attribute if you want additional structured child schema elements below the first structured element. If you select this option, repeat steps 4 to 9.

  10. Enter the following:

    1. In the Name field, enter an element name.

    2. In the Display Name field, enter a display name. The Data Schema editor supports multiple languages for this field. The field adjacent to Display Name displays your language. You can define a Display Name field value for any language you select from the list. For more information, see the Oracle Communications Design Studio Help.

    3. In the Multiplicity field, select one of the following:

      • Required: This attribute makes the parameter mandatory.

      • Optional: This attribute makes the parameter optional.

      • Range: Any ranged parameter with a Minimum value greater than 0 is considered a mandatory ASAP parameter. Any ranged parameter with a Minimum value of 0 is considered an optional ASAP parameter.

  11. Click Finish.

  12. Repeat steps 10 to 11 for any additional parameters to be included in the scalar or XML parameter group.

Related Topics

Creating Service Actions, Atomic Actions, and Action Processors

Configuring Service Action, Atomic Action, and Action Processor Properties

Modeling ASAP Services

Atomic Action Editor

Configuring Service Action, Atomic Action, and Action Processor Properties

You define the properties of service actions, atomic actions, and action processors in their respective editors.

See the following topics:

Note:

If you create compound parameters, Oracle recommends that you define the members for every compound parameter. This is beneficial once the code is generated during implementation. Ensure your parameters are valid Java parameters. See ASAP Cartridge Development Guide for more information.

Defining Service Action Properties

To define service action properties:

  1. In the Studio Projects view, double-click a service action entity.

    The Service Action editor appears.

  2. In the Description field, enter a description.

  3. Click the Atomic Action(s) tab.

    The Atomic Action(s) tab enables you to map an atomic action to a service action. Depending on the cartridge model, you can map more than one atomic action to one service action.

  4. Click Add.

    The Atomic Action Selection dialog box appears.

  5. Select an atomic action to which you want to map the service action.

    In the Service Action Details area, a new row with default values appears.

  6. Click the row and edit the values in the Atomic Action Conditions area.

  7. Click the Properties tab and define the properties for the service action.

  8. In the Level field, enter the sequence level for the service action in the work order.

  9. Select or enter values for Service Action Completion Event and Service Action Failure Event.

    When the service action completes or fails, the respective event is returned.

  10. (Optional) To configure rollback for a service action, do the following:

    1. Select the Rollback check box.

    2. In the Atomic Actions tab, click in the Rollback Point column for the atomic action that you want to set as Point of No Return (PNR).

    3. From the list, select a rollback value.

    Notes:

    • A PNR can be specified only if the service action has rollback enabled with the Rollback check box selected in the Properties tab.

    • If rollback is enabled but not configured in the Atomic Action(s) tab, the default behavior is a complete rollback of all atomic actions in a failed work order.

  11. Click the Parameters tab to see the mapping of a service action and an atomic action. The details of the atomic action are based on the parameters defined on the Atomic Action editor.

  12. Click the Command Overview tab to see the details of the atomic action and service actions.

  13. Select File, then select Save.

Related Topics

Creating Activation Run-Time Type Parameters in the Data Dictionary

Service Action Editor

Defining Atomic Action Properties

To define atomic action properties:

  1. In the Studio Projects view, double-click an atomic action entity.

    The Atomic Action editor appears.

  2. In the Description field, enter a description for the editor.

  3. In the Details tab, select a routing support.

  4. In the Parameters tab, the mandatory parameters for the routing support are automatically added, depending on the routing support you selected, to the Parameters area. In the Activation tab, the Service Action Label and Atomic Action Label are automatically defined for these routing parameters.

    For example, in the Details tab if you select Dynamic Routing, in the Parameter Details area, you can enter the data restrictions and other details for the parameter.

  5. Right-click in the parameters area and select one of the following:

    • If you want to add a scalar, XML, or XPATH run-time parameter, select Select Simple Data Element and add a parameter from the activation data dictionary.

    • If you want to add a grouping of scalar parameters or a compound parameter, select Select Structured Data Element and add a parameter from the activation data dictionary.

    See "Creating Activation Run-Time Type Parameters in the Data Dictionary" for more information about activation run-time parameters.

  6. In the Mappings tab, you can map an atomic action to an action processor.

  7. (Optional) Click the Add button and map an atomic action to any of the existing action processors.

    The Action Processor Selection Dialog dialog box appears. You can add an action processor from the list of existing action processors in workspace.

  8. (Optional) On the Action Processor Selection Dialog dialog box, click the New button to create a new action processor.

    The Action Processor Wizard appears. You can fill the appropriate fields of this wizard to create a new action processor entity.

  9. (Optional) You can do the following:

    • Click the Clone button to create a copy of the selected action processor.

    • Click the Open button to open the selected action processor.

    • Click the Remove button to remove the selected action processor.

  10. In the Details tab, in the Detailed Information area, provide one or more atomic action properties.

  11. (Optional) To configure an atomic action for rollback, do the following:

    1. Click Select.

      The Rollback Atomic Service Selection dialog box appears.

    2. Select an atomic action for rollback and click OK.

  12. Select File, then select Save.

Related Topics

Atomic Action Editor

Defining Action Processor Properties

The steps for defining action processor properties depend on the type of action processor you want to use.

Do one of the following:

Defining properties for the CLI Code Generation Action Processor

This procedure assumes you have completed the following tasks:

  • Created and fully configured an atomic action that includes the required parameters. You must associate the atomic action to this action processor.

  • Configured the CLI command structure for all CLI commands associated with the project. For more information, see the topic on configuring the CLI command structure in Oracle Communications ASAP Cartridge Development Guide.

  • Configured the CLI command request messages that the program sends to the NE or EMS. For more information, see the topic on creating and configuring atomic actions in Oracle Communications ASAP Cartridge Development Guide.

  • Configured the CLI command response message to define how the program determines user defined exit types in CLI response messages from the NE or EMS. For more information, see the topic on creating and configuring atomic actions in Oracle Communications ASAP Cartridge Development Guide.

To configure properties for the CLI Code Generation Action Processor:

  1. In the Studio Projects view, double-click an action processor entity.

    The Action Processor editor appears.

  2. In the Description field, enter a description.

  3. From the Type list, select CLI Code Generation.

  4. Click New.

    Design Studio automatically generates Java code.

    The Class field points to the auto-generated proxy Java file.

    The Method field points to the execute method within the processor Java file.

    For information about the auto-generated Java files and code and the areas where you must additional business logic, see ASAP Cartridge Development Guide.

Related Topics

Defining Action Processor Properties

Defining properties for the Java Action Processor (with Code Generation)

This procedure assumes you have completed the following tasks:

  • Created and fully configured an atomic action that includes the required parameters. You must associate the atomic action to this action processor.

To configure properties for the Java Action Processor with code generation:

  1. In the Studio Projects view, double-click an action processor entity.

    The Action Processor editor appears.

  2. In the Description field, enter a description.

  3. From the Type list, select Java Action Processor (with Code Generation).

  4. Click New.

    The Studio Activation Java Implementation Wizard appears.

  5. In the Package field, enter a valid package name or use the default package name. The default package name uses the vendor, technology, software version, entity, and action that you selected when creating the action processor.

  6. In the Name field, enter a name that appears in many of the auto-generated Java files and the classes they contain. The default name is a combination of the action and the entity.

  7. Click Finish.

    Design Studio automatically generates the Java code.

    The Class field points to the auto-generated proxy Java file.

    The Method field points to the execute method within the processor Java file.

    For information about the auto-generated Java code and where you must add business logic, see ASAP Cartridge Development Guide.

  8. Select File, then select Save.

Related Topics

Defining Action Processor Properties

Defining Java Action Processor (Without Code Generation)

This procedure assumes you have completed the following tasks:

  • You have created the methods and classes that you want to associate with the action processor. For information about the writing Java code from scratch, see Oracle Communications ASAP Cartridge Development Guide.

To define properties a Java action processor without code generation:

  1. In the Studio Projects view, double-click an action processor entity.

    The Action Processor editor appears.

  2. In the Description field, enter a description.

  3. From the Type list, select Java Action Processor.

  4. In the Class field, enter the class name of the Java class.

  5. In the Method field, click select.

    The Select Java Implementation dialog appears.

  6. Select a method from the Matching Items list and click OK.

  7. Select File, then select Save.

Related Topics

Defining Action Processor Properties

Defining State Table (Without Code Generation)

To define properties for a state table:

  1. In the Studio Projects view, double-click an action processor entity.

    The Action Processor editor appears.

  2. In the Description field, enter a description.

  3. From the Type list, select State Table.

  4. In the State Table field, enter a state table name or use the default state table name.

  5. In the Program field, enter a program name or use the default program name.

  6. Click New.

    A new state table appears with the program name listed on the first line.

  7. Write the state table code, save and close the file. For more information about writing state table code, see Oracle Communications ASAP Developer's Guide.

  8. Go back to Action Processor editor and the Select File, then select Save.

Related Topics

Defining Action Processor Properties