You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.
2
+
The *autoscript-dbc* project provides DBC support for deploying automation scripts that contain the `configScript` metadata used by the VSCode Maximo Script Deploy extension, which is found [here](https://marketplace.visualstudio.com/items?itemName=sharptree.maximo-script-deploy).
3
3
4
4
# Getting Started
5
-
TODO: Guide users through getting your code up and running on their own system. In this section you can talk about:
6
-
1. Installation process
7
-
2. Software dependencies
8
-
3. Latest releases
9
-
4. API references
10
-
11
-
# Build and Test
12
-
TODO: Describe and show how to build your code and run the tests.
13
-
14
-
# Contribute
15
-
TODO: Explain how other users and developers can contribute to make your code better.
16
-
17
-
If you want to learn more about creating good readme files then refer the following [guidelines](https://docs.microsoft.com/en-us/azure/devops/repos/git/create-a-readme?view=azure-devops). You can also seek inspiration from the below readme files:
18
-
-[ASP.NET Core](https://github.com/aspnet/Home)
19
-
-[Visual Studio Code](https://github.com/Microsoft/vscode)
To use the *autoscript-dbc* extension, copy the compiled classes to the [SMP_HOME]/maximo/tools/maximo/classes directory, for example `/opt/IBM/SMP/maximo/tools/maximo/classes` (unix) or `C:\IBM\SMP\maximo\tools\maximo\classes` (windows).
8
+
9
+
The classes can be found in the build/classes/java/main folder of this project after calling the gradle assemble task or can be obtained in the zip and tar files provided under this project's GitHub Releases.
10
+
11
+
Copy the script.dtd from the project to the [SMP_HOME]/maximo/tools/maximo directory, for example `/opt/IBM/SMP/maximo/tools/maximo` (unix) or `C:\IBM\SMP\maximo\tools\maximo` (windows).
12
+
13
+
## Update Product XML
14
+
The *autoscript-dbc* relies on injecting new DBC statements into the statement processor. To enable these new statements, add `<calloutclass>io.sharptree.maximo.dbmanage.AutoScriptExtCallout</calloutclass>` to your project's product XML as shown in the example below.
## Use add_update_autoscript and remove_autoscript
35
+
With the product XML file updated the `add_update_autoscript` and `remove_autoscript` statements are now available.
36
+
37
+
The `add_update_autoscript` requires a `path` and a `language` attribute. The `path` attribute is either a relative path from the DBC script file location or an absolute file path. The `language` attribute is either the literal value, `javascript` or `python`.
38
+
39
+
Below is an example DBC script using both a relative and absolute path.
> Note that it is required that the automation script source files contain the `scriptConfig` variable that is used by the VSCode Maximo Script Deploy extension. If this is not present the script will be unable to deploy.
58
+
59
+
The `remove_autoscript` requires the `name` attribute. This is the name of the automation script to remove from the target system.
60
+
61
+
Below is an example DBC script that removes an automation script named `EXAMPLESCRIP`
To build the *autoscript-dbc* project, you will need the Maximo `businessobjects.jar` and the Maximo tools classes. The `businessobjects.jar` file can be obtained by unzipping the `maximo.ear` file and copying the file.
78
+
79
+
The Maximo tools classes are not provided as a jar file and therefore must be created. Open a terminal (unix) or command (windows) window and navigate to the [SMP_HOME]/maximo/tools/maximo/classes folder. Run the following command.
80
+
```shell
81
+
jar cf maximo-tools.jar *
82
+
```
83
+
Copy the `businessobjects.jar` and `maximo-tools.jar` to the project's `libs` directory.
84
+
85
+
## Gradle assembleDist
86
+
To build the project run the gradle `assembleDist` task.
0 commit comments