Java2Xpress - Supported features and Restrictions
Hello! -- Thank you for checking out Java2Xpress - an attempt
to ease the life of a Sun Identity Manager developer.
Sun IDM is a highly configurable system in the field of
security and provisioning. To further the product's capabilities, it
allows the existing functionality to be extended and customized as per
the business needs. The scripting for this customization is
programatically developed in Xpress - a Business process language
implementation for Sun IDM.
While it is a simple and easy-to-learn xml
based language for non-programmers, hard-core programmers may feel
that it gets tedious typing too much xml code even though it covers
relatively a small part of the logic.. nothing wrong with Sun IDM
itself, it's just the way an interpreted language is built on xml
technology.
The solution? -- Write in Java and let a tool convert the code
into Xpress!
Nothing too novel in this idea. Language interpreters have always
existed (even before computers existed :-)), and so is Java2Xpress.
The questions however is, to what extent can Java2Xpress do its job?
Here are the supported features
and restrictions of Java2Xpress.
Supported Features:
-
Java 1.4 specification: While the java language is evolving to
newer releases, Java2Xpress supports the constructs available until version 1.4.
-
Rules and RuleLibraries: The correspondence between typical constructs
in Java and Xpress forms a basis of conversion. Thus, Java2Xpress
converts the java-code that defines the logic of a particular operation.
The translation between the two languages is as follows:
| Java |
Xpress |
| Class |
<RuleLibrary> |
| Method |
<Rule> |
| Method parameters |
<RuleArgument> |
| Variable |
<defvar> or <set> |
| Primitive Constants |
<s> or <i> |
| If conditions |
<cond> |
| For/do loops |
<dolist> or <while> |
| Method Invokation |
<invoke> or <call> |
| Variable references |
<ref> or <get> |
| New object creation |
<new> |
| Method Invokation |
<invoke> or <call> |
| Mathematical operations |
<add>, <mult>, <sub> and <div> |
| Mathematical comparators |
<gt>, <gte>, <lt>, <lte>, <eq>, <neq> |
| Logical operators |
<and>, <or>, <not> |
| Code-grouping |
<block> |
| Exception Handling |
<ref>WF_ACTION_ERROR</ref> |
-
Java keywords: The following keywords/constructs are supported:
- null
- int
- String
- true / false
- package
- class
- import
- new
- try / catch
- if / else if / else
- while
- for
- return
- mathematical and logical operators
Restrictions:
-
Try/catch block:
Unfortunately this powerful construct is not supported in Xpress.
Java2Xpress however, attempts to "catch" the exception by checking
the WF_ACTION_ERROR variable.
-
String Concatenation:
"Hello" + "World" in Java would concatenate two strings. However
in Xpress, a plus sign would mean adding two entities. Java2Xpress
results this operation in <add> rather than <concat>.
Note: We will update you when this gets
resolved in future releases.
-
What about Workflows and UserForms?
These entities are not building blocks of a computer language,
rather are constructs related to the stages of a process and the
user interface elements respectively.
They are not built out of logic, rather defined by business requirements.
Java2Xpress only converts logic from one language to another,
hence does not support these entities in Sun Identity Manager.
-
Java syntax compliance:
Compliance of the input java-code with java-syntax is not required by Java2Xpress.
The responsibility to provide syntactically-correct java-code lies with the user
and Java2Xpress only works hard to wade through erroneous code. Users are advised
to confirm the resulting Xpress code to ensure that the correct business logic is
deployed in an Identity system.
Java2Xpress has come a long way in improving in its performance.
If you find any restrictions that are not covered above, let us know!
And don't forget to check out this page in the future for updates.
We thank you for your support, encouragement and feedback.
|