Examples
The examples directory of the best4Automic distribution contains files that serve as examples for using the b4A modules. The subdirectories are named after the modules. The contents of the individual directories are described below.
If example commands are specified, it is assumed that the current working directory is the bin directory of the best4Automic distribution.
pm.DocBuilder
This directory contains templates for creating documentation in HTML, SVG, BPMN, Confluence Storage and Markdown format. The following commands can be used to generate documentation based on these templates (UNIX):
HTML format
./b4A pm.DocBuilder -C <connection> --template-dir ../examples/pm.DocBuilder/HTML --output-dir <output directory> --extended-usage
cp -R ../examples/pm.DocBuilder/HTML/css <output-dir>
cp -R ../examples/pm.DocBuilder/HTML/webfonts <output directory>
cp -R ../examples/pm.DocBuilder/HTML/js <output directory>
SVG format
The extended mode of the b4A module must also be activated for the SVG template. It is also necessary to specify a b4A Expressions attribute svg.resource.path. The value must contain a relative path from the output directory to the Svg-stylesheet.css file.
./b4A pm.DocBuilder -C <connection> --template-dir ../examples/pm.DocBuilder/SVG --output-dir <output directory> --extended-workflow-attrs --custom-attributes svg.resource.path=<path to svg-stylesheet.css>
cp ../examples/pm.DocBuilder/SVG/svg-stylesheet.css <output directory>
cp ../examples/pm.DocBuilder/SVG/task-*.SVG <output directory>
A second variant of the SVG images can be activated. This is similar to a BPMN diagram. To use this, the user-defined attribute svg.style must be specified with the value BPMN.
./b4A pm.DocBuilder -C <connection> --template-dir ../examples/pm.DocBuilder/SVG --output-dir <output directory> --extended-workflow-attrs --custom-attributes svg.resource.path=<path to svg-stylesheet.css>,svg.style=BPMN
cp ../examples/pm.DocBuilder/SVG/svg-stylesheet.css <output directory>
cp ../examples/pm.DocBuilder/SVG/task-*.SVG <output directory>
BPMN
The extended mode is also required for BPMN.
./b4A pm.DocBuilder -C <connection> --template-dir ../examples/pm.DocBuilder/BPMN --output-dir <output directory> --extended-workflow-attrs
Confluence Storage Format
./b4A pm.DocBuilder -C <connection> --template-dir "../examples/pm.DocBuilder/Confluence Storage Format" --output-dir <output directory>
Markdown
Markdown is a widely used markup language. These templates can be used to create the documentation for packages in this format in order to integrate them into wiki systems, for example.
./b4A pm.DocBuilder -C <connection> --template-dir ../examples/pm.DocBuilder/Markdown --output-dir <output directory> --extended-workflow-attrs --extended-usage-with-processes --extended-usage --extended-promptset-attrs
pm.IndexDocBuilder
This directory contains templates for generating documentation for the index variable(s) in HTML and Markdown format. The following commands can be used to generate documentation based on these templates (UNIX):
HTML format
./b4A pm.IndexDocBuilder -C <connection> --template-file ../examples/pm.IndexDocBuilder/HTML/index.html --output-file <output file>
cp ../examples/pm.IndexDocBuilder/HTML/b4a.css <output directory>
cp ../examples/pm.IndexDocBuilder/HTML/b4a-logo.png <output directory>
Markdown
./b4A pm.IndexDocBuilder -C <connection> --template-file ../examples/pm.IndexDocBuilder/pm.IndexDocBuilder/Markdown/index.md --output-file <output file>
pm.ImportBPMN
This directory contains sample files for the
The Camunda Modeler A program for creating BPMN processes. Templates for (service) tasks are supplied with the configuration files, which simplify the creation of compliant BPMN processes for the
-
b4a.json: A collection of templates to demonstrate the simple creation of processes based on predefined templates. Templates for executing an SAP report and transferring files have been defined as examples.
-
testing.json and testing-actions.json: These two configurations define templates for creating and testing workflows. Once on the basis of objects to be cloned and once on the basis of actions (objects that can be parameterized via PromptSet)
The Camunda Modeler can be downloaded from the following URL: https://camunda.org/download/modeler/
The supplied BPMN files have been created based on the templates and can be converted into workflows using the
ta.Execute
These examples contain cucumber definitions that show how the test cases can be described with this language. These files must first be transferred to the text documentation of an object for use with the ta.Execute and ta.SaveTo modules.
util.Mail
The sample files body-dependency-definition-verify.html, body-compliance-check.html and body-report-modifications.html are examples of the main body in HTML format. The examples for the header (mail-header.html) and the footer (mail-footer.html) can be used for this purpose. The main part body-dependency-definition-verify.html is used to generate a mail that uses the XML variable of the pm.DependencyDefinitionVerify module to send a report to verify the dependency definition of a b4A package. The example file body-compliance-check.html reads an XML variable containing the results of a compliance check and generates a report on the results. The file body-report-modifications.html reads the results of pm.ReportPackageModifications for a dedicated package and generates a report on the changes within a package.
The following call can be used to send a mail containing a dependency definition check report for the b4A package B4A.PM
.
./b4A util.Mail -C <connection> --subject "Dependency Definition Verification B4A.PM" --mail-recipients dev@beispiel.de,test@beispiel.de --mail-body ../examples/util.Mail/body-dependency-definition-verify.html --custom-attributes key=B4A.PM --mail-header ../examples/util.Mail/header.html --mail-footer ../examples/util.Mail/footer.html
To send a report on a compliance check from B4A.PM, the following call can be used.
./b4A util.Mail -C <connection> --subject "Compliance Check B4A.PM" --mail-recipients dev@beispiel.de,test@beispiel.de --mail-body ../examples/util.Mail/body-compliance-check.html --mail-header ../examples/util.Mail/header.html --mail-footer ../examples/util.Mail/footer.html
The following call should be used to send a report on the changes to a package since the last release build.
.\b4A util.Mail -C <connection> --mail-recipients dev@beispiel.de,test@examples.mail --mail-header ../examples/util.Mail/header.html --mail-body ../examples/util.Mail/body-report-modifications.html --mail-footer ../examples/util.Mail/footer.html --subject "Modification report of B4A.PM" --custom-attributes "custom.key=B4A.PM,custom.variable=B4A.PM.VARA@XML.REPORT-PACKAGE-MODIFICATIONS,custom.connection=AE24-1000"#