Tuesday 31 March 2015

Oracle Document Editor - Defining a custom message (Part 3 of 3)

When your definition is ready you may test it in the Analyzer/Data tab as follows. You may also generate a test sample with the Analyzer.



After testing a sample you can see the value of each element in the message structure and the errors (if any) to correct.



The final step is to generate the XSD. To do that just navigate in the main menu to File -> Export and select "Oracle 2.0".




You can generate the xsd with default configuration or check the box "Show Advanced Option", in which you may, for example, set the namespace and the structure of the field names. In the example below I'm specifying the field names as NodeID_NodeName.


In the following window of the wizard it's recommended to check the option "Suppress Enumeration in XSD" if you have code lists, otherwise they would be included in the XSD, since the ECS is used for validating and translating this information is not needed in the XSD and reduces it's size considerably.



After finishing your document definition and generating the schema you are ready to create your B2B document definition. However have in mind that for Positional Flat File documents, as in this example, you also need to generate the Parser ECS.

For information on how to generate the parser schema check out the post Oracle B2B 12c Positional Flat File and Charset Configuration

Tuesday 24 March 2015

Oracle BPM 12c - Issues with BPM Composer when running on Solaris

I have recently been facing several issues with BPM 12.1.3.0.1 running on Solaris when using the BPM Composer.
Two of those issues are easily fixed by adding a couple of extra Java properties to the respective environments set files.

  1. Error when creating a Space or a project in the BPM Composer

    If you receive one of the following errors when creating a Space or a project in the Composer check Doc Id 1917397.1

    svn: E160004: Can't read length line from file /opt/oracle/products/fmw_1213/user_projects/domains/_dev/bpm/bac/_server1/repositories/da5fcb6a-ecd1-4fe3-9e9c-210870402281/db/fs-type: /opt/oracle/products/fmw_1213/user_projects/domains/_dev/bpm/bac/_server1/repositories/da5fcb6a-ecd1-4fe3-9e9c-210870402281/db/fs-type (Permission denied)...
    oracle.bpm.bac.subversion.server.repository.exceptions.RepositoryException: org.tmatesoft.svn.core.SVNException: svn: E200030: CANTOPEN

    This issue only occurs on Solaris and can be fixed by adding the following property:
    -Dsvnkit.useJNA=false
    to the JAVA_OPTIONS in commENV.sh under oracle_common/common/bin

  2. Error when creating Webforms on the Composer or deploying a BPM project with Webforms

    If you receive the following error when 
    creating Webforms on the Composer or deploying a BPM project with Webforms:

    java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment

    Add the following property:
     -Djava.awt.headless=true
     to the JAVA_OPTIONS in setDomainEnv.sh under <domain_home>/bin

Thursday 12 March 2015

Oracle Document Editor - Defining a custom message (Part 2 of 3)

In the 1st part I focused on the Message Segments, now I will start populating the first segment.

A Segment can have, as seen below, three types of child nodes: Field, Composite (group of fields) and Union (of fields/composites)



When creating a Field there are a couple of properties to define.



In the case of a PFF document you have extra properties, namely Justification, Padding and Format, as seen above.

This will define how an element will be presented on the PFF document since each field needs to be fully populated.

When the field is a String, the common values for Justification and Padding are Left and Space respectively, whereas if the element is a number (Type "Display") the Justification should be Right and Padding of Zeros as to have, for example, "001". 


For the Min Length value it's a good practice to set it to "1" to avoid errors, unless you know the exact size of the values that will/can be in that field (not counting with padding since padding is added automatically to fill the Max Lenght size when B2B transforms a message to your PFF document).

After creating a field you will see a Property window similar to the following.


In the above picture, on the top right there is a textbox for the position of the node in the tree, you can press the round button where the mouse is pointing to automatically set/update the position of the existing nodes.

To change the position of nodes you can either use Cut/Copy + Paste or click on right mouse button and use the Move options.


In the properties window of a Field you can define the level of requirement or even "hardcode" a value.



However there are some properties like type and size, which are defined when creating a field, that cannot be modified in this properties view. To modify them you have to change the view from Guideline to Dictionary in the View menu.



In the Dictionary view you can see all the nodes in your document and edit the properties defined upon creation of each node.



In case you want to validate the content of a field from a list of possible elements you can create a Code List.


And populate it as below.



You may also change the list after creation in the properties tab.



In the final part I will focus on testing and generating the files needed by B2B.