Child pages
  • Using Eclipse as an alternative admin UI
Skip to end of metadata
Go to start of metadata

OpenIDM 2.x does not have an administrative user interface (UI). As an alternative you can setup Eclipse to assist you is all the common tasks you have to perform during an OpenIDM deployment.

Here is a summary of the tools that you'll need:

  1. Eclipse IDE for Java EE Developers
    This package includes:
    1. Data Tools Platform

    2. Eclipse Git Team Provider

    3. Eclipse Java Development Tools

    4. Eclipse Java EE Developer Tools

    5. JavaScript Development Tools

    6. Maven Integration for Eclipse

    7. Mylyn Task List

    8. Eclipse Plug-in Development Environment

    9. Remote System Explorer

    10. Eclipse XML Editors and Tools

  2. Subversion
  3. Groovy
  4. JSON Editor
  5. Activiti Designer Plugin
  6. JSF Web Page Editor (Just the WPE, not the whole JSF tool set)

This workspace allows you to do virtually anything you may need like:

  • Checkout, view, edit and compile the OpenIDM source code
  • View and edit JSON, Groovy and JavaScript configuration files
  • Build workflow processes, including a WYSIWYG HTML Editor for the forms*
  • Build custom UIs

*There are currently no less than three ways to include forms in your Activiti workflows.

  1. Use the standard Activiti form properties and have them automatically rendered in a generic fashion by our UI

  2. Explicitly define a custom page to render it (and add other functionality), by embedding in the process definition (which ends up as ugly, hard to edit XML escaped HTML code)

  3. Explicitly define a custom page to render it (and add other functionality), by using a 'form' defined in the UI artifacts, referenced via the formKey. This uses the regular UI templates/function libraries we have built, so it is very powerful and we provide some good high level functions and patterns to add fields etc, but with power also comes an amount of complexity.

Each method has advantages and disadvantages.
Activiti Forms
Quick and easy for simple use cases
No HTML form is required, form is rendered n the fly from the Activiti defined form fields
Limited to Activiti form schema, for example, there is no password form field type, so passwords appear in clear test instead of bullets
Limited functionality since there is no HTML form, there can be no JavaScript code to hook into product features
Easy to embed in BPMN XML with custom builder now and part of default behavior in v3.0
JavaScript code can be used to access product features like realtime password strength evaluation
In v2.x, default behavior is to require XML escaped HTML which is ugly and hard to read and modify
Deepest integration into the OpenIDM UI Framework
Lets forms be defined outside the Activiti BPMN XML file
Deepest integration into the OpenIDM UI Framework
Must know our UI framework (JQuery, Backbone, Mustache)

Create Custom Builder
I have written a custom Eclipse Project Builder script that simplifies option 2 above. To use this custom builder do the following:
  1. Start with an Activiti BPMN XML file (which can be auto generated by the Activiti Designer Plugin or you can start with a copy of an existing one)
  2. Make sure the file name ends in *.bpmn and not bpmn20.xml
  3. Replace the XML escaped HTML code with anchors like %PROCFORM% or %TASKFORM$:

            <activiti:formProperty id="_formGenerationTemplate" type="string" default="%PROCFORM%"></activiti:formProperty>

  4. Create *.proc.html and *.task.html web form files (you can copy and unescape the form from a sample file)

  5. To make a new *.bpmn20.xml file, just run the custom builder (Projects -> Build Project, when prompted, double click the *.bpmn file). 

    The custom builder called which calls, replaces the anchors with properly escaped HTML code, and creates a new *.bpmn20.xml file.

To create the custom builder in Eclipse:

  1. Download the necessary shell scripts. (Warning, there is different code in for MacOS and Linux. You may have to comment/uncomment accordingly)
  2. Unzip and place the scripts in an OpenIDM directory like /opt/openidm/samples/workflow/workflow
  3. In Eclipse, go to Project -> Properties
  4. Click "Builders" on the left pane.
  5. Click "New" button
  6. Select "Program"
  7. Under "location", enter the path to the script
  8. Under "Working Directory", enter the path to the directory with the *.bpmn, *.proc.html and *.task.html file
  9. Click the "Varinables" button
  10. Select "file_prompt" (no arguments are required)
  11. Click OK
  12. Name the Builder whatever you like
  13. Click OK

  • No labels