Using Eclipse to Create and Edit Process Definitions
Redwood Server interfaces with eclipse to allow you to author process definitions with all the benefits of an integrated development environment. Redwood Server has been tested with the Eclipse IDE for Java EE Developers.
You can import the following types of objects:
- Applications which have any of the following three object types
- Libraries
- RedwoodScript Process Definitions and any process definition that has an Action
- Triggers
Eclipse can export and import objects to and from the central Redwood Server or CAR files. Note that the CAR files generated by eclipse cannot auto-upload by a double-click.
Editing Code
RedwoodScript process definition and trigger objects are located under <project>/src/java/<partition>/com.redwood.scheduler.custom/<object_type>_<name>.java/<object_type>_<name>/execute()
. Process Definition actions are located under <project>/src/java/<partition>/com.redwood.scheduler.custom/<object_type>_<name><action_type>.java/<object_type>_<name><action_type>/execute()
. The stub code is located under <project>/src/stub/<partition>/com.redwood.scheduler.custom/<object_type>_<name>[<action_name>].java/<object_type>_<name>[<action_name>]//{<child_classes>/<java_objects>|<java_objects>}
.
Libraries are located under <project>/src/library/<partition>/Custom_<name_suffix>/java/com.redwood.scheduler.custom/<class_name>.java/<class_names>/{<child_classes>/<java_objects>|<java_objects>}
.
The objects are also available under <project>/src/
including XML representations of these objects.
To edit RedwoodScript code of trigger GLOBAL.TriggerTest
imported into project Example
, for example, you navigate to Example/src/java/GLOBAL/com.redwood.scheduler.custom/Trigger_TriggerTest.java/Trigger_TriggerTest
and open the execute()
method.
Note that the stub code (process definition and trigger objects, only) is generated and not exported. All changes should be made to the <project>/src/java/<partition>/.
.. code, the only exception to this is when you add or remove process definition parameters or edit the XML. The XML must be adapted for process definition parameters, besides, new parameters must also be declared in the stub. Due to the complexity of XML, Redwood strongly recommends you create parameters in the central Redwood Server if you are not experienced with XML syntax.
tip
If you remove parameters from the XML, ensure you remove or adapt any constraints using the parameters in the XML and remove the parameter declarations from the stub.
Prerequisites
- The full URL to the central Redwood Server
- Credentials of a user with sufficient privileges to View and Edit the objects you intend to import, sufficient privileges to import and export the objects in question.
- A functional installation of eclipse version Juno 4.2 or higher
Procedure
Installing and Configuring the Plugin
note
The following instructions use Eclipse IDE for Java EE Developers Mars 4.5.1, if you use a different version, the procedure might differ slightly.
- Open eclipse, close the Welcome screen by choosing Workbench on the top right-hand side.
- Navigate to File > New > Project and select Java Project and choose Next.
- Enter a project name, such as
Redwood
and choose Finish. Choose Yes to display the project. - Navigate to Help > Install New Software and fill
https://download.redwood.com/eclipse-plugin/
into the Work with field; choose Add to add the repository to your eclipse configuration. Fill a name for the repository in the Name field and choose Ok. - Check Scheduler and choose Next, choose Finish to install the Redwood Server eclipse features. Note that you might be presented with certificates that you have to trust; in this case, select the certificate and choose Ok. Choose Yes to restart eclipse.
- Once eclipse has restarted, navigate to Window > Preferences, choose Scheduler, choose Add; fill in a Name, select Redwood Server, fill in the URL to your central Redwood Server such as
http://pr1.example.com:53000/redwood
, fill in the username and password of a privileged user. - Choose Scheduler from the context-menu of your project and select Scheduler project, fill the name you specified in the previous step for the central Redwood Server, and select a version.
Retrieve JavaDocs
The java documentation for version 9.2.9 can be found downloaded here.
Import Redwood Server Objects from Central Redwood Server
- In eclipse, select Import from the context-menu of your project, expand Scheduler and select Scheduler Files, choose Next.
- In this overview, you select to either import objects from a central Redwood Server instance (default) or a CAR file. Locate the object(s) you wish to import and select them. If there are too many in the list, fill in part of the name of the object you want to import into the Select an item to open field, locate and select the object(s) to import; repeat as necessary until all objects you intend to import have beens elected.
- Choose Finish. Note that at this point, if you already previously imported any of the objects and modified them, you will be presented with a dialog where you can select whether you want to overwrite previously imported objects or not alongside an option to keep both. If you decide to keep both, the imported object will be stored in a new file with a
.new
suffix.
Export the Object to the Central Redwood Server
- In eclipse, select Export from the context-menu of your project.
- Expand Scheduler and select Scheduler Files and click Next.
- Select the Destination central Redwood Server and the object(s) to export; choose Finish.
Export to a CAR File
- In eclipse, select Export from the context-menu of your project.
- Expand Scheduler and select Scheduler Files and click Next.
- Select the CAR file, choose Browse to locate the directory where you wish to save the file, fill a name into the File name, and the object(s) to export; choose Finish.
Redwood Script eclipse