Académique Documents
Professionnel Documents
Culture Documents
Integration framework
for SAP Business One
Guide 01
Development Environment
-1-
Content
1. The BizStore ................................................................................................3 1.1 The Physical Storage of B1i ...................................................................3 1.2. The Logical Storage of B1i ....................................................................3 2. External Development Environment.............................................................5 2.1 Development Environment in the File System........................................5 2.2 Syntax Check and Intellisense ...............................................................6 3. Internal Development Environment via WebDAV.........................................7 3.1 What is WebDAV?..................................................................................7 3.2 BizStore Access under Windows Explorer .............................................7 3.3 High efficient Development with WebDAV support.................................7 3.4 How to activate WebDAV enablement ...................................................8 3.5 WebDAV and Authentication ..................................................................9 4 Document Handling ....................................................................................10 4.1 Upload a Document..............................................................................11 4.2 Download a Document .........................................................................12 4.3 List Documents of the BizStore ............................................................13 4.4 Delete Documents in the BizStore........................................................15 4.5 Import a ZIP with multiple Documents..................................................17 4.6 Export a ZIP with multiple Documents..................................................19 4.7 Import a Scenario Package ..................................................................22 4.8 Export a Scenario Package ..................................................................23 5. The B1i XSLT Library.................................................................................24 6. The B1i Execution Tools ............................................................................27 6.1 Execute Stylesheet...............................................................................27 6.2 Execute BizFlow...................................................................................27 6.3 Execute IPO-Step.................................................................................27 6.4 Put msg in Queue.................................................................................27 7. Configuration of the Development Environment.........................................27 7.1 Framework Configuration .....................................................................27 7.2 Technical Configuration........................................................................27 Copyrights, Trademarks, and Disclaimers .....................................................28
-2-
1. The BizStore
1.1 The Physical Storage of B1i
The complete B1i Framework (program code and data), including customer extensions is stored in the B1i database in the following 8 database tables. This is similar to the SAPs R/3 technology where the ABAP program code and data is stored in the database. BZSTDOC BZSTIDXH BZSTIDXP DBQITEMS DBQSTREAMS XCLTRINQ XCLTRLOG XCLTRPOS
This persistency is named BizStore. The complete framework (program code, and data) consists out of documents, typically in xml format (beside some gif/jpg) which are covering e.g. repository entries or instructions how to map a concrete message. All theses documents are stored in the BZST* tables, each document is one record in these tables.
With the installation the following datasets will be available: com.sap.b1i.vplatform.ide (administration console) com.sap.b1i.vplatform.repository (repository) com.sap.b1i.vplatform.runtime (runtime functionality) com.sap.b1i.vplatform.system (APIs) com.sap.b1i.vplatform.ui (ui functionality) com.sap.b1i.system.sld (system landscape admin) com.sap.b1i.system.sld.api (system landscape admin) com.sap.b1i.system.sld.directory (system landscape admin) com.sap.b1i.system.sld.repository (system landscape admin) com.sap.b1i.system.eventdispatcher (B1 event dispatcher) com.sap.b1i.system.eventdispatcher.api (B1 event dispatcher) com.sap.b1i.internal (B1i library) com.sap.b1i.internal (B1i technology) com.sap.b1i.internal.xc (B1i technology) com.sap.b1i.system (B1i technology) com.sap.b1i.system.cc (B1i technology) com.sap.b1i.system.uiframework (B1i technology) com.sap.b1i.system.xc (B1i technology) com.sap.b1i.system.xc.iodata (B1i technology) com.sap.b1ip.system.cc (B1i technology)
During runtime, the following datasets will be created: com.sap.b1i.vplatform.directory (directory) com.sap.b1i.vplatform.scenarios.authen (authentication functionality) com.sap.b1i.vplatform.scenarios.design (scenario packages) com.sap.b1i.vplatform.scenarios.setup (setup specification) com.sap.b1i.b1imessage.errorinbox (error inbox) com.sap.b1i.b1imessage.logs (message log) com.sap.b1i.system.eventdispatcher.directory (B1 event dispatcher)
-4-
As your Development Environment is external in the File System, you need to exchange the relevant documents once in a while. To exchange the data between the BizStore and the File System, you will use the administration console of the B1i Framework. How to work with the tools is described in chapter 4.
-5-
Please download these xsd documents with the administration console (please refer to chapter 4) and make them available in your development environment (in the folder e.g. my_B1i). If you want to save an XML document, your XML editor will notify you in case, the xsd documents are missing. If you want to store the XML document without validation against the xsd documents, you need to choose the option save anyway.
-6-
directly with the active documents in the B1i BizStore. With your editor, you just click the [Save] button, the B1i Framework will immediately re-load the document and the new functionality is active with zero development roundtrip which is the most efficient way of programming. How to work with a document in an XML editor, please check the hints in following chapter.
Its also recommended to switch it on for trouble shooting to get very fast an overview of the situation. For the normal runtime of the project, you should switch it off to avoid that users manipulate documents by accident.
Switch on WebDAV in the B1i Framework Activation of WebDAV is very easy. Please open the overall configuration file for the B1i Framework. Its a text file in the file system in the basis directory of B1i, typically in a folder C:\ ... \tomcat\webapps\B1iXcellerator. The name of this file is xcellerator.cfg. You open this file with a normal editor, e.g. Notepad. The first section in this file is named #== Xcellerator-Parameters: === Please set the parameter xcl.webdav to full. In case the parameter doesnt exist, please add it to the configuration file at any place in this section to introduce the WebDAV parameter and to switch it on. xcl.webdav=full After changing settings in the xcellerator.cfg, you always need to re-start the B1i Framework. Please start the Windows Services. Control Panel -> Administrative Tools -> Services Windows Services opens and displays all registered services. The B1i Framework is registered with the name SAP Business One Integration Service. Please select this service by clicking on the name and re-start it with the functions left to it in the upper corner.
-8-
Activate BizStore access via Internet Explorer To enable access via your Windows Explorer, please open your My Network Places (just select the entry in the tree of your Internet Explorer) and run the Add Network Places wizard. Please add the Internet or network address of the B1i BizStore, which is http://localhost:8080/B1iXcellerator/exec/dummy After activation, you will find your B1i BizStore in your Windows Explorer tree, directly under the first level tree node My Network Places. You need to activate it only once. Next times, when you open the Windows Explorer, you will always have access to the B1i BizStore. Remark: In case the Add Network Place function doesnt work as expected under MS Windows 2003 Server, the reason could be that the Microsoft Web Folders are not installed by default. In this case please download and install the Microsoft Web Folders.
Work with a BizStore document directly in your XML Editor. The B1i Framework allows you to define the integration scenarios by configuration and with the inbuilt graphical design user interfaces. For developing the transformation in XSLT, SAP recommends to load and edit the generated XSLT by an XML editor of your choice. SAPs recommendation is: The XML editor should support WebDAV. This allows you to direct edit and store a BizStore document. As the change will take effect immediately, you will have zero development roundtrip. The XML editor should support projects. Especially in case you have to develop and maintain multiple integration scenarios, a project will allow you to administer in a structured way all relevant documents.
To open a BizStore document via WebDAV, typically XML editors provide you an option to open a URL. In this case please type in the network address of the B1i BizStore (http://localhost:8080/B1iXcellerator/exec/dummy) and browse for the appropriate document.
-9-
4 Document Handling
Please use the administration console of the B1i Framework for the document handling between your File System and the B1i BizStore. You start the Administration Console in the Windows Internet Explorer with the following url: http://localhost:8080/B1iXcellerator/exec/dummy/com.sap.b1ip.system.cc/bfd/ AdminConsole.bfd?!defdoc=/com.sap.b1i.vplatform.ide/ui/vIDE.xml In case the B1i Framework is running on another computer in the network, please replace localhost with the name or ip address of the server. Remote access is disabled per installation. Please refer to chapter 7.2. how to switch it on.
Before you can use the administration console of the B1i Framework, you need to logon. Pre-configured with the installation, the user name is B1iadmin and the password is B1iadmin. Its strongly recommended to change the password and/or to add new accounts. Please refer to reference guide 04, chapter 4.4. The following functions are available for document handling: Upload a document (File System -> BizStore) Download a document (BizStore -> File System) List Documents in the BizStore Delete documents in the BizStore Import a zip, containing multiple documents (File System -> BizStore) Export a zip, containing multiple documents (BizStore -> File System Import a Scenario Package (File System -> BizStore) Export a Scenario Package (BizStore -> File System) - 10 -
Payload-Type Settings Typically, the document payload gets detected automatically by its extension (xml, bfd, ipo, xsl, ) and there is no need to explicitly define it. By supplying explicit payload-type conversion settings, it is possible to supersede the default detection and settings. This e.g. is necessary for files with a missing / wrong / unknown name-extension that shall be treated as a specific (known) payload-type. The settings are specified in a 'key=value' manner, separated by comma. For a further description of the explicit settings that can be done here, please also refer to the description of the various inbuilt payload-type converters of the BizProcessor in the Programmer's Reference (Control Center Development BPC Reference). File-Name With the Browse button, you can choose the document from the file system.
- 11 -
BizStore-URI The Upload function detects automatically the BizStore-URI and will propose it, composed out of the document's name. Optional you can overwrite it. If you want to create a document with an alias, please edit the BizStore-URI and add the alias in parenthesis, e.g. /dataset/group/document.xml(alias_1). [Submit!] Please click the Submit! button to trigger the upload. After the upload you will get the status of the operation.
BizStore-URI You can type in the correct URI or you can use the button on the right to select first a dataset, then the group and then the document, you want to download.
- 12 -
name of the dataset, where the document is stored name of the group, where the document is stored alias of the document, default is unified name of the document
Payload-Type Conversion By stating that no payload-type conversion shall happen, the document will be retrieved as it is in the BizStore in its internal XML-representation. Payload-Type Settings By supplying explicit payload-type conversion settings, it is possible to supersede the default settings. This e.g. is necessary for files with a missing / wrong / unknown name-extension that shall be treated as a specific (known) payload-type, or if some details for the conversion shall be adjusted. The settings are specified in a 'key=value' manner, separated by comma. For a further description of the explicit settings that can be done here, please also refer to the description of the various inbuilt payload-type converters of the BizProcessor in the B1iP Programmer's Reference (Control Center Development BPC Reference).
Please click on the icon left beside the text Selection Criteria. This initiates the tool to open a new window. [Submit!] Please click the Submit! button to trigger the download. A new browser window will open with the retrieved document. Please choose the browser functions File Save As to store the document in the right location in your development environment.
BizStore Directory
- 13 -
You have the following input fields to define the dataset, the group and the document in the BizStore. With the Browse buttons behind the fields you can select the appropriate entry from a list. Constrain to dataset Name of the dataset you want to list. If the other fields are empty, the complete dataset will be listed. Constrain to group Name of the group you want to list in the dataset that you defined. If the other fields are empty, the complete group of the selected dataset will be listed. Constrain to Index-Alias Name of the alias of the document you want to list in the dataset and the group that you defined. Constrain to Document-Name Name of the XML document you want to list in the dataset and the group that you defined.
Please click on the icon left beside the text Selection Criteria. This initiates the tool to open a new window.
- 14 -
[Submit!] Please click the Submit! button to display the list with the selected documents.
Youll see the total number of documents listed in the header together with the selection criteria. All documents are listed in a table in the following format: dataset group ualias name stored size Name of the dataset where the document is located Name of the group where the document is located Alias of the document Name of the document Timestamp of last modification in the BizStore Size of the document in byte
In addition the list contains the BizStore-URI URL for each document which allows you to open the document by clicking the link.
BizStore Delete
You have the following input fields to define the dataset, the group and the document in the BizStore. With the Browse buttons behind the fields you can select the appropriate entry from a list. Constrain to dataset Name of the dataset you want to delete. If the other fields are empty, the complete dataset will be deleted. Constrain to group Name of the group you want to delete in the dataset that you defined. If the other fields are empty, the complete group of the selected dataset will be deleted. Constrain to Index-Alias, Name of the alias of the document you want to delete in the dataset and the group that you defined. Constrain to Document Name of the XML document you want to delete in the dataset and the group that you defined.
- 16 -
Maintenance
ZIP Import
The functionality imports a .zip -archive to the BizStore and expands it there, possibly using another dataset as specified in the archive.
Choose archive Please click the Browse button of this field and select the zip file from your file system. The file specification of the zip file is carried over into the field. (Relocate to dataset) In case you import one dataset only and you want to change the name of the destination dataset, you type in the name in this field. Typically this field is empty and the datasets and groups get created with the names of the directories.
- 17 -
Preserve existent docs Existing documents of the dataset won't be deleted, but yet existing ones will be overwritten, depending on the setting whether to preserve them or not. Prevent import on erroneous XSL-stylesheets If the import of the archive will be prevented on any contained erroneous XSLstylesheet, no file of the archive will be imported if at least one of such a XSLstylesheet was found: An erroneous XSL-stylesheet is a stylesheet that contains namespace-declarations in its root-element that never are used explicitly (means, that are not visible on XML-level) within the stylesheet. As the XML-processor is not aware of that on disassebly of the archive, it won't supply those unused namespace-declarations to the written targetdocuments then. If such a namespace then later on would be used implicitly (as e.g. referenced within textual XPath-expressions on execution of the stylesheet), a runtime error would occur, as the namespace cannot be resolved by the XSLT-processor then. In order to force the inclusion of such an implcitly used namespace, please e.g. supply an (empty) attribute within the root-element that is bound to the particular namespace. Assume file-system friendly naming Default to import upgrades/patches from SAP. If a file-system friendly encoding of the entry-names in the archive will be assumed, it is possible in this way to omit file-name extensions w/o the loss of payload-type information and to supply distinct alias-information w/o having sacrificed the usability of the document in the file-system. In such a case, the file-names must have been composed in the following way in order to achieve the particular result in the BizStore: (BizStore <-> File-System) hugo <-> hugo..ext hugo(alias) <-> hugo(alias)..ext hugo.ext <-> hugo.ext hugo.ext(alias) <-> hugo(alias).ext
Unescape unsafe URL-chars in names If an unescaping for unsafe URL-characters encoded within the components of the entry-name shall be performed, this typically could be necessary when the archive formerly was created by B1i and if the entry-names of the archive originally contained such unsafe characters.
Controlled import via processing Instructions in documents There do exist several import directives on a per document level that can be stated via processing-instructions to a particular document (note that all of the enlisted processing-instructions have to reside on the hierarchy-level below of the root-element; only the first one of each kind will be considered):
- 18 -
<?com.sap.b1i.system_import protect?> It is possible to state whether a particular already existing document shall be protected from being overwritten by its imported version. This can be stated eiher by the document to be imported: <?com.sap.b1i.system_import protected?> Alternatively, this also can be stated by the already existing document. <?com.sap.b1i.system_import force?> Also, it is possible for the to be imported document to state whether it shall enforce an overwriting of an already existing document, no matter what the directive for the already existing document is (if it has any at all). <?com.sap.b1i.system_autorun <URI>?> As another feature, it is possible to state URI's in documents to be imported that shall be auto-run in new Browser windows after the import of the whole archive has happened: This can be faciliated by stating as many processing-instructions as needed. Note that if relative URI's are specified, they are resolved to HTTP URL's relative to the particular document's HTTP-exposed BizStore-URI. Absolute URL's do not need such a resolving, they will be invoked as they are.
Using the Import functionality for your own documents To use this function, first you need to archive all relevant documents, including all sub folders into one zip file. Please make sure, that your zip application is supporting relative path and switch it on; typically this is switched on by default.
BizStore Export
- 19 -
dataset You can type in a dataset or you can use the button on the right to select a dataset, you want to export. group You can type in a group or you can use the button on the right to select a group, you want to export. Include Alias Default setting is to export the documents with no explicit alias (alias=unified) only. In case you want to export also documents with explicit alias, you can specify the alias names in the field Include Alias. In this case, the documents will include the alias in parenthesis, e.g. document(alias).xml Exclude Alias Default setting is to export the documents with no explicit alias (alias=unified) only. In case you want to export documents without explicit alias, you can specify the alias names in the field Exclude Alias. In this case, the documents will exclude the alias in parenthesis, e.g. document(alias).xml Perform file-system friendly naming A file-system friendly encoding of the entry-names in the archive allow to omit file-name extensions w/o the loss of payload-type information and to supply distinct alias-information w/o having sacrificed the usability of the document in the file-system. - 20 -
In such a case, when the BizStore document-names have been composed in the following way, it will be achieved the particular result in the File-System: (BizStore <-> File-System) hugo <-> hugo..ext hugo(alias) <-> hugo(alias)..ext hugo.ext <-> hugo.ext hugo.ext(alias) <-> hugo(alias).ext
[Submit!] After clicking the Submit button, a zip file with the name export.zip gets created. The browser window Download will pop up. Please click the button Save to save the export.zip file to the desired location in your file system.
- 21 -
Scenarios
Name of the Scenario package zip file Please click the Browse button of this field and select the zip file from your file system. The file specification of the zip file is carried over into the field. [Submit!] Please click this button to import the zip archive. After the import you will get a list of all imported documents.
- 22 -
Scenarios
Scenario Package Identifier Please click the button of this field and select the Scenario Package you want to export as a zip file to your file system. Add test messages If you check this box, possible existing test messages will be included. Default this box is unchecked.
[Submit!] Please click this button to trigger the export. After clicking this button, a zip file with the name Scenario_Export.zip gets created. The browser window Download will pop up. Please click the button Save to save the export.zip file to the desired location in your file system.
- 23 -
Please use the administration console of the Integration framework to check the available functions. Help XSLT Library
Library functions are called templates in XSL. To have the templates available for your usage, you need to include the library document by using the include command at the end of the XSL.
<xsl:template name="transform"> ... </xsl:template> <xsl:include href="../../co m.sap.b1i.system.lib/xsl/string.xsl"/>
- 24 -
The String operations are providing some very helpful functions to manipulate strings, respectively to retrieve some information from them, e.g. to delete leading zeros in a string. The Date/Time operations are providing functions around the date and time. E.g. you can retrieve the current date and time and it allows you to calculate some special dates or to provide formatted output. The System operations are more technical, e.g. to generate a globally unique identifier (GUID). The drop-down list displays all available libraries. Please choose the library you are interested in. You can test the library, available in your installation directly by clicking the Test button. Click the Load Docu button to open the documentation. The documentation displays a list of all existing templates with a short description. All templates are starting with the abbreviation b1ilib., followed by the actual name.
- 25 -
At the beginning of the documentation, the exact include command is given. Just copy it from the documentation and paste it to the appropriate place in your XSL stylesheet. Without this include instruction, the template will not be accessible during the runtime and a runtime error will occurs.
If you are interested in a particular functionality, just click on the name which will position the document to the detailed description. E.g. if you are interested in detailed information about the template b1ilib.today_minus, just click on the name to get information about how to call it, a detailed description, the parameters, the default settings and a usage example. The Usage-Example is very helpful because you can just copy it to paste it directly to your XSL stylesheet.
With Back to Top you navigate back to the overall list. If you want to use a template, just copy the Usage-Example from the documentation and paste it into your XSL stylesheet.
- 26 -
6.1 Execute Stylesheet 6.2 Execute BizFlow 6.3 Execute IPO-Step 6.4 Put msg in Queue
- 27 -
- 28 -