Java Compatibility and Licensing

Installation and Configuration

Processes

Forms

API Programming

Java Compatibility and Licensing

How about Oracles new Licensing and Support Terms concerning Java?

Oracle changed its policy concerning Java licensing and support and the release cycle considerately.
Since those license terms may be somewhat changing, we refer you to the original documents, but nevertheless will summarize the situation as follows:

With the end of January 2019, Java8 switched to EOL for installations without a support contract.
Current installations of Java8 may continue to use the last Java8 version, but updates are only available to paying customers.
A new Oracle Java version will come out every six month. The versions will be short-lived, but every 2–3 years, a Long Term Support (LTS) version of Java will be released. The previous LTS was Java 11.
The current LTS is Java 17 (released in 2021). The next one is Java 21 scheduled for Q4, 2023.

Beginning with Java 11, usage of older versions in production may require a commercial license from Oracle. Installations can continue to freely utilize Java for test, development and demo purposes.

As a consequence, if you are interested in support for your Java platform, you can buy licenses/support from Oracle or switch to an alternative implementation.

Numerous alternative and free (also in production) builds of Java 8 and Java 11, and Java 17 are available (e.g. from openjdk.org and adoptium.net).

What about compatibility between @enterprise and Java Versions?

  • @enterprise 8.0 (EOL Dec. 2018):
    – compatible with Java 1.5 to (1.)8
    – no further Java Versions are supported
  • @enterprise 9.0 (EOL Dec. 2023)
    – compatible with Oracle Java versions 1.7 and 1.8 as well as OpenJDK 1.8
    – no further Java versions are supported
  • @enterprise 10.0
    – compatible with Oracle Java 1.8 as well as OpenJDK 1.8
    – compatible with the current LTS Java Version (Java 11)
    – no compatibility assurance for non-LTS Java versions
  • @enterprise 11.0
    – compatible with Oracle Java 17 as well as OpenJDK 17
    – future LTS versions (21) will also be targeted
    – no compatibility assurance for non-LTS Java versions

Installation and Configuration

I would like to run two @enterprise-server on one computer with two IP-addresses. They should be reachable over the same port. Where do I have to enter the IP-address in @enterprise?

The default-behavior of multiple network-interfaces: the HTTP-server runs on all interfaces. With the parameter

	http.ip-address

in the file ep.conf file (in the var directory) you can restrict the interfaces by entering an IP-address, where the server should run.

I have problems with @enterprise when using IPv6. What can I do?

To try to avoid those problems, the property

-Djava.net.preferIPv4Stack=true

forces the use of IPv4 only. It can beat the startip of the JVM.

I have entered an Authorization Class in @enterprise which is located in an application. After upgrading @enterprise I cannot login anymore. How can I resolve this problem?

If the upgrade has changed some essential @enterprise tables, the application loader is not able to load the application anymore. The only way to resolve this problem is to set the default authorization class

com.groiss.org.PasswdAuth

or put the application authorization class into the system class path.

I want to use the DEBUG functionality of Eclipse for @enterprise. Which steps are necessary?

For the @enterprise 10.0 you have to set the following debug parameters in ep.bat or ep.sh:

-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=<port-number>,suspend=n

After starting the server with these parameters, it is possible to open the function Debug Configurations… in Eclipse which allows selecting the project, the host and the port (<port-number> defined in ep.bat or ep.sh for the older versions or in the epstart.bat or epstart.sh for the @enterprise 11.0). If the debug profile has been created and the server is running, you are able to start the Debug mode.

For the @enterprise 11.0 you have to add following parameters to varjavaargs file in the var folder of the @enterprise installation:

-Xdebug
Xrunjdwp:server=y,transport=dt_socket,address=<port-number>,suspend=n

I would like to edit some standard default strings to different phrases. Is there a way to override specific strings with my own phrasing?

For this purpose use the function New language in resource editor. If the desired language option is not available, you have to define it in section Configuration/Localization with parameter List of locales. This new column appears in the resource editor spreadsheet and is editable. When saving the spreadsheet a new file Strings_XX.properties on the file system will be created (file is located in <ep_root>/classes/com/dec/avw/resource). Do not edit this file directly, use the resource editor!

Finally, assign the appropriate language to the users. If no appropriate translation is found in the overwritten language file, the default translation is used.

Why I get an error when ep.dbmonitor.use.melody property is set?

If this parameter is checked, the database connections will be monitored and displayed in @enterprise Server monitor (provided that JavaMelody has been activated at all). Please note that in this case, you might have to copy the DB driver jar file to the base/lib directory.

Processes

If you create a new process in a new application, is it necessary to restart the server?

The worklist cache structures do not recognize the new application automatically. You have to restart the server or click „Refresh Org. structures“ in the Worklist-Cache Admin Page.

I would like to design a process which starts from User A and goes to User B.

If User B approves it, it will end, otherwise User A will get it.
It looks like:


application SoftwareDev;
begin
none CRRequest(Form1) "SoftwareChangeRequest";
loop
none CRRequestDefinition(Form1);
none CRReqDefApprove(Form1);
exit when Form1.A="Approve";
end;
end


The problem is the data storage. Every iteration should be recorded in a new row while users can overwrite what they have entered in the previous iteration. How is it possible to do this?

There is no straightforward solution for this problem, but it would be possible with „subforms“. In each iteration an additional subform can be generated (either manually or by preprocessing) where the agent can add his comments. But making the „older“ lines read-only and only the current line read-write would require some additional code.

Multiple agents per step can be specified in the process definition. Do they receive the task in parallel?

Multiple agents for a task are handled as a sequence: when the first agent finishes in the task, it is transferred to the next one, etc. The only difference to an explicitly modeled sequence is that the postcondition is executed only after the last agent has finished the task.

I have modelled a new process, where I am the actor of the first step or a role which I have. Although this process is not visible in the list of executable processes. What should I do to see this process in the list?

The first step must be an interactive task where

  • the agent is a user or
  • the agent is a role, optionally with an org.unit.

You can start the process if you are the specified user, or if you have the specified role. If an org.unit is given, you must have the role in this org.unit.
If the role is a global role, you must have a home role assigned. The org.unit of the home role is used as the org.unit of the process instance.

I have a running process where no activity instance is active, idle or waiting. How can I recover from this situation?

First of all, such a situation is impossible if everything works correct. But it can happen, for example if there are errors in the application code (system steps, etc.) combined with commits in this code. To repair, select the last interactive step of this process whereas XX is the process instance id:

select OID from avw_stepinstance where type=20 and id='XX' and started >= 
(select max(started) from avw_stepinstance where type=20 and id='XX');

Make this step active whereas OID is the result from the previous query:

update avw_stepinstance set status=5, finished=null where oid = OID;

I have a problem with the method notifyUser included in @enterprise application-class. If a new process appears in the personal worklist of a user, the method will not be called. What can I do?

There are several points which should be checked:

  • The method does not overwrite the com.groiss.wf.DefaultApplicationAdapter.
  • Email-notification of a user is not activated.
  • The user has no email address.
  • The user must not be the thread-user, i.e. the user will not get a notification, if he sends a activity to himself.

If a process editor is started with localhost, some exceptions occur in Java Console when using a function. What is wrong?

Some combinations of Java plugin, browser and/or OS version can result in exceptions (e.g. AccessControlException) when using process editor with localhost. A solution for this problem is to start the Process Editor with the hostname instead of localhost.

Forms

Is there any document to understand the usage of new XHTML forms? I studied the documents but I need more help.

First you need an XHTML document. See http://www.w3.org/MarkUp for details. If you load such a file you have to enter the position in the class path of the server. If a parser error occurs (very likely) the parser messages are useful to fix problems. After successful loading of the file you can modify it in the file system and changes in layout, etc. should be visible immediately in every reference to the form (processes, DMS-folders). But if you add fields, you still have to use the replace-HTML function.

Is it possible to use MS FrontPage for the creation of XHTML forms for @enterprise?

Yes, it’s possible. You should:

  • Open the HTML form file in MS FrontPage.
  • Right click over the form in design mode and „Apply XML formatting rules“.
  • Remove any from the code or write the following line on the top of your XHTML form:
     <!DOCTYPE html 
    [ <!--ENTITY % HTMLlat1 SYSTEM "conf/xhtml-lat1.ent"--> %HTMLlat1; ]>
  • In the <form method=“get“ enctype=“application/x-www-form-urlencoded“> tag you should add an attribute id=“form1″. e.g.: <form id=“form1″>

Is it possible to have forms without direct connection to processes? I need a table editor for resource data or master data.

The document management can be conveniently used for this purpose. The formtype must be „Usable in DMS“ by activating the checkbox when the formtype is created. Then you are able to add forms of this type to any folder and edit them.

I have a subform and I want to change the window size. Is there any way to affect the size of the window when the button "New table entry" will be activated?

You can change the window size in the settings of the form. There are two input fields for Width and Height where you can enter a window size (e.g. W: 300, H: 400).

Which modes are available for opening and displaying of forms?

The mode defines how the subforms are edited and is an attribute of the <tablefield> HTML-Tag. Two modes are available:

  • subform: The main form contains a table where each line contains a link to a detail mask. An „Add“ button is placed under the table. This mode is the default.
  • editable: The main form contains the button „Edit Table“. It opens a new window, which allows to edit all lines of the table. You can add and delete lines in this window, too. This mode is useful to edit small tables with only a few columns.

I have a form and a subform and I would like to fade out a column of the subform in the table of the superordinate form. How can I do this?

If you add or modify a form in @enterprise, the header of the column (fieldname) in the table definition must be empty. After saving these settings, the column is not visible anymore in the superordinate form.

I have a problem with buttons in my subform and value list. It seems they simply don't work. What is wrong?

This problem happens when @enterprise runs on some versions of Tomcat 8.5.xx.

To solve this problem perform the following steps:

1. stop your Tomcat
2. open file server.xml in the conf directory of your Tomcat
3. for each active Connector add the following property:

relaxedQueryChars=’^{}[]|“‚

e.g.

<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
relaxedQueryChars='^{}[]|"' />

4. restart your Tomcat

API Programming

Is it possible to change the agent of an activity instance during run-time?

Yes, it’s possible:

  • via the user interface, e.g. in the process history
  • via the API by using the com.groiss.wf.WfEngine interface

Is it possible to set the subject of a process to a combination of form fields, like the following example: SoftwareProduct.name + SoftwareProduct.displayName.

@enterprise offers the following possibilities:

  • Use the field „Subject“ on process definition mask in tab „General“.
  • You have to write a program, for example a FormEventHandler with an onUpdate() method like this:
    public void beforeUpdate(DMSForm product) throws Exception {
    WfEngine e = ServiceLocator.getWfEngine();
    ProcessInstance pi = e.getProcess(product);
    if (pi != null) {
    e.setSubjectToString(pi, product.getField("name") + " " +
    product.getField("displayName"));
    }
    }

How can I defer the execution of future acitivity instances up to a certain point in time? I do not want to use the suspension list.

This is one solution:

  1. Use a specific user or role „waiter“ with a specific task „wait“:
    …. aUser aTask(aForm); waiter wait(); …
  2. Put a preprocessing method on task „wait“. The method should set the duedate of the activity-instance.
  3. Define an escalation-object on task „wait“. The escalation-object should call a Java method which finishes the step. A sample method:
     import com.groiss.org.User;
    import org.slf4j.Logger; import org.slf4j.LoggerFactory;
    import com.groiss.wf.*;
    public class EscalationTest { static final Logger logger = LoggerFactory.getLogger(EscalationTest.class); public void exec() throws Exception { logger.info("Execute escalation"); WfEngine e = ServiceLocator.getWfEngine(); User sysadm = OrgData.getInstance().getById(User.class, "sysadm"); ActivityInstance ai = e.getContext(); e.setAgent(ai, sysadm); e.finish(ai); } }

Is it possible to use something like [FormName.FieldDeptID]!RoleName as an agent specification? I want to set the agent for an activity to the Department-Manager role of a department. The department name is defined in a formfield.

You have to change the department in a Java method like this:

   WfEngine e = ServiceLocator.getWfEngine();
ActivityInstance ai = e.getContext();
ProcessInstance pi = ai.getProcessInstance();
DMSForm f = e.getForm(pi, "formname");
OrgUnit ou = OrgData.getInstance().getById(OrgUnit.class,(String)f.getField("deptfield"));
e.setOrgUnit(pi, ou);
/*
the piece of code can be used as preprocessing for a step
to set the department.Change the line
e.setOrgUnit(pi, ou);
e.setOrgUnit(ai, ou);
to set only the department of the step, not the whole process.
*/

I have created a form and I am using the class [com.dev.avw.appl.formSoftware_1] in a Java Script. But I am afraid when the next version of the form is produced, my program will get a problem.

The form class is only a container of the available fields. A new form class version is created seldom. Most of the changes in a form class can be done by the addition of fields, then the class is recompiled and the version is not changed.

Can I customize the number of log files?

The easiest way is to use the appropriate parameter on configuration mask Logging in @enterprise administration (section Configuration).

Another way is to define a timer that restarts the logger, for example to get a new log file every day. You can write your own logger class that keeps more or less files than the standard number of 10. See the examples LogTimer and ZipLogger in the Application Development Guide.

How can I initialize a form when it is inserted?

Write a FormEventHandler or XHTMLFormEventHandler and implement the beforeInsert() method, for example:

  public class MyformHandler implements XHTMLFormEventHandler <DMSForm>{ 
     @Override
     public void beforeInsert(DMSForm f) throws Exception { 
         f.setField("fieldName","fieldValue");
     }
 }

What are the concrete numbers behind the ActivityInstance status and type constants?

The method getStatus() returns one of the following:

  • STARTED = 0;
  • SUSPENDED = 1;
  • FINISHED = 2;
  • ABORTED = 4;
  • ACTIVE = 5;
  • WAITING = 6;
  • COMPENSATED = 7;

The method getType() returns one of the following:

  • BEGIN = 1;
  • END = 2;
  • IF = 3;
  • ELSIF = 4;
  • LOOP = 5;
  • EXIT_WHEN = 6;
  • WHILE = 7;
  • PAR = 8;
  • ANDJOIN = 9;
  • ORJOIN = 10;
  • CHOICE = 11;
  • CHOICE_BRANCH = 12;
  • GOTO = 13;
  • TASK = 20;
  • SYSTEM_TASK = 21;
  • PROCESS = 22;
  • BRANCH = 23;
  • END_BRANCH = 24;
  • SYSTEM_INTERN = 25;
  • SYSTEM_WAIT = 26;
  • PARFOR = 27;
  • ENDFOR = 28;
  • BATCH = 29;

See the APIdoc for further description of the states and types.

How does the structure of a process instance look like and which methods return the correct nodes?

The structure of a process instance is as follows:

activityInstance -> [ parfor_1 .. -> [subprocess_1 …->]] main_process

The relation shown as arrow is a parent relation between activity instances. The getParent() method returns the target of this relation. The method getProcessInstance() returns the next activity instance with type PROCESS (not parfor) that can be found when calling getParent() repeatedly. The method getMainProcess() returns the root of the activity instance tree.
For detailed information please refer to chapter Methods for process instances in handbook Application Development Guide.

GUI Customization

Does @enterprise provide secure communication?

Yes, @enterprise provides an SSL Implementation for HTTP, POP, IMAP and RMI. Further information can be found in the Installation Guide.

Why does @enterprise throw an exception when clicking on certificate management?

To manage your certificates, it is necessary to define a Java key store in the configuration. Passwords for the key store and for the servers private key have to be chosen there. The passwords must have a length of at least 6 characters and are not allowed to include special characters.

How to get an official certificate?

First of all, you have to generate a key pair. This key pair is a self-signed certificate, too. To get an official signed certificate, download the certification request and send it to a certificate authority. As response you will get an official signed certificate. Import this certificate into the @enterprise key store. Ensure that you define the same alias as the key pair has.

How to import certificate chains?

To import a certificate chain, append the signing certificates at the bottom of your certificate. For an example, if you get a certificate C0 which is signed by Certificate Authority CA1 with its certificate C1 which is signed by CA2 with C2 and so on, you have to import the certificate as a chain like this : C0 C1 C2 C3… Cn.

Why does @enterprise refuse to accept the client certificates of the clients?

@enterprise can be configured to request and check client certificates, which have to be signed by trusted certification authorities. To add the certificate of a trusted organization, use the import function and choose the „Certificate of a trusted organization“ option.

Search

How is it possible to assign extended search rights to a user or a role?

You need the right „Statistics“. You can assign this right to a user or a role.

I have created an extended search and saved it as a stored query. This query consists of one parameter, it asks for an employee name (from the SelectList) and shows information about his Leave Requests. Then I gave permission to all users to run this query. Now every user can get his Leave Request reports, but he can also view reports of other users. How can I add a filter condition which says that the LeaveRequestFormField is equal to the logged-in user?

For some fields (Process-Agent and Task Agent) it is possible to select “ = Task:Agent at execution“ as condition. In your case it would be necessary to add a „user-defined“ condition to the query. It looks like:

form_vacation_1.employee=&USER

where „vacation“ is the id of the form, „1“ is the form version, „employee“ the name of the form field containing the user. „&USER“ is a placeholder for the user executing the query. The table form_vacation_1 is joined to the query if a field of this form is in the field list of the query.

Timers

Which standard-timers are available in @enterprise and what are their functions?

An overview of standard-timers is given in the System Administration manual.

I have to write a new timer. What should I pay attention to?

Timers with loops should contain a try-catch block within the loop-block, e.g. when reading a result set. Additionally, the command BeanManager.commit(); should be written at the end of the try-block and BeanManager.rollback(); at the end of the catch-block.

Misc

How can I get a stack trace of the server?

First you have to select the command-window of the server. Then press the keys CTRL + BREAK to get the stack trace.

Credits

We thank our customers and partners for input to this FAQ, especially Behrad Sadoughian for his many suggestions.