|Oracle® Communications Order and Service Management Developer's Guide
|PDF · Mobi · ePub|
This appendix provides steps to define a basic automation in Oracle Communications Design Studio, starting with a new cartridge and finishing with triggering the automation in Oracle Communications Order and Service Management (OSM) following deployment of the cartridge to the OSM server. The information is presented in the form of high-level steps. For specific instructions on how to perform each individual step, see the Design Studio Platform Help and the Design Studio Modeling OSM Processes Help.
Note:This appendix assumes that you have read "Using Automation".
The steps presented in this appendix assume that you have the following applications installed:
This section describes creating a new cartridge in Design Studio and compiling the project, prior to defining the automation. This section provides information that is used regardless of the automation example.
The creation of a new cartridge results in the creation of an Order entity of the same name within the cartridge. For example, if you create a new cartridge cartridgeName, an Order entity is created within the cartridge named cartridgeNameOrder. On the Order editor Details tab, three fields must be defined:
Until these fields are defined, the following errors are present for an order:
Order Model Error: Creation task is not defined for order cartridgeNameOrder.
Order Model Error: Default process is not defined for order cartridgeNameOrder.
Order Model Error: No roles have been granted for Creation permissions for this order.
Order Model Error: Order Life-cycle Policy is not defined in workspace.
Order Model Error: Order cartridgeNameOrder has empty Order Template.
Order Model Error: There is no Permission defined for order cartridgeNameOrder.
The following steps walk you through creating a cartridge to resolve these errors:
Create a new cartridge.
Build the project.
Open the Problems view.
You may see the errors listed above.
Create a Role.
You must create a role first because every entity you create requires that permissions be set, which is done by assigning a role.
On the Role editor, select the appropriate permissions.
Save the role.
On the Order Life-cycle Policy editor Permissions tab, set permissions for the order life-cycle policy by assigning a role.
Save the order life-cycle policy.
On the Process editor Permissions tab, set permissions for the process by assigning a role.
Save the process.
On the Manual Task editor Permissions tab, set permissions for the task by assigning a role.
Save the task.
On the Order editor Order Template tab, define an order template.
This can be done by defining elements in the Data Dictionary and adding them to the order template, or by importing an order template. For purposes of understanding a basic automation, you may just want to define a few fields, such as name, address, city, state.
On the Order editor Details tab, set the following fields:
On the Order editor Permissions tab, set permissions for the order by assigning a role.
Save the order.
Build the project.
Upon successful build, the Problems view shows that all errors are resolved.
At this point, you have a cartridge that defines an order within a project that compiles.
This example is using an automated task to trigger the automation, so this section describes the high-level steps for defining an automated task:
Note:An automation can also be triggered by a notification.
Define an automated task.
On the Automated Task editor Permissions tab, set permissions for the process by assigning a role.
Save the automated task.
This section describes the high-level steps for writing a basic custom automation plug-in:
In the cartridgeName/src directory, create a new Java source file.
Write the Java code where the class extends AbstractAutomator.
This automation is being triggered by an automated task, so the Java code can expect the TaskContext object as an input parameter. Code something simple, such as:
Cast the TaskContext object to a local variable
Print out a data value that is available through the TaskContext object. (This example had an order template that defined name, address, city, state, and zip, which would be available through the TaskContext object.)
Complete the task by calling the method on the TaskContext object.
Compile the source file.
The resultant compiled class file now resides in the cartridgeName/out directory.
This section describes the high-level steps for creating a Custom Automation Plug-in that is the Design Studio entity representation of your custom automation plug-in.
Create a Custom Automation Plug-in:
Provide a name for your Custom Automation Plug-in.
Select your custom automation plug-in class name.
In the XML Template field, define the implementation of your custom automation plug-in using the
<implement> element. See Appendix A, "AutomationMap.xml File" for examples of defined
In the cartridgeName/customAutomation directory, create a corresponding schema file that defines the rules for the XML you defined in the XML Template field.
Save the Custom Automation Plug-in.
This section describes the high-level steps for defining the automation, which maps your automated task to your Custom Automation Plug-in.
Open the automated task editor for the automated task you created.
On the Automated Task editor Automation tab, define the automation:
In the Name field, enter a name for your automation.
In the Automation Type list, select your custom automation plug-in.
For this example, let the Event Type default to the choice of Internal Event Receiver.
Save the Automated Task.
This section describes the high-level steps for defining the process, which must include your automated task in order for the task to be initiated and trigger your automation.
Open the Process Editor.
Add your automated task to the process.
For the project to compile, and for your automation to run, your process must define a Start node, your automated task, an End node, and statuses between the three.
Save the process.
After you have completed these steps, you must build the cartridge project. A successful build of the project results in the generation of the automationMap.xml file.
This section describes the high-level steps for deploying the cartridge to the OSM server, including what must be done prior to deployment. For more information, see the Design Studio Help topic about packaging and deploying OSM cartridges.
Create an Environment Design Studio entity, which defines the connection information for the server hosting the OSM environment to which you plan to deploy your cartridge.
Deploy the cartridge to your OSM environment.
The final step is to trigger the automation from within OSM; this can only occur after the cartridge is successfully deployed to the OSM server.
Within OSM, create an order based on the order template that you defined in your cartridge.
Save the order.
This results in the order starting to process. The order process you defined, which includes the automated task you defined, starts processing: First, the creation task runs.
Complete the creation task.
(This example defined the creation task as a manual task, so you must manually complete the creation task.)
When the creation task is completed, the next task defined in the process is created, which is your automated task. The creation of the automated task sets the task state to Received, which triggers your automation to run.