|
1 | | -# pullrequest-trigger |
2 | | -Is a Holodeck B2B Extension that allows <i>Pull Request</i>s to be triggered by the back-end application. |
| 1 | +# Holodeck B2B Pull Request trigger extension |
| 2 | +This extension allows the _Consumer_ application to control when _Pull Request_s are send by Holodeck B2B |
| 3 | +instead of the default fixed intervals. It also allows to specify the _criteria_ of a "selective" Pull Request |
| 4 | +as specified in [section 5.1 of ebMS V3 part 2 (Advanced Features)](http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/part2/201004/cs01/ebms-v3.0-part2-cs01.html#__RefHeading__435723_822242408). |
| 5 | + |
| 6 | +Currently the trigger mechanism is file based; the back-end application writes a XML document to a specific |
| 7 | +directory where it is read by the extension and a corresponding Pull Request is triggered. |
| 8 | +__________________ |
| 9 | +For more information on using Holodeck B2B visit the website at http://holodeck-b2b.org |
| 10 | +Lead developer: Sander Fieten |
| 11 | +Code hosted at https://github.com/holodeck-b2b/pullrequest-trigger |
| 12 | +Issue tracker https://github.com/holodeck-b2b/pullrequest-trigger/issues |
| 13 | + |
| 14 | +## Installation |
| 15 | +### Prerequisites |
| 16 | +This extension can be used with Holodeck B2B version 4.1.0 and later. |
| 17 | + |
| 18 | +### Configuration |
| 19 | +To enable the trigger mechanism a _worker_ that will watch for _trigger documents_ has to be added to the |
| 20 | +Holodeck B2B instance. The worker class is `org.holodeckb2b.ebms3.pulling.trigger.filebased.WatchForTriggerFile` |
| 21 | +and it takes one parameter _watchPath_ that should point to the directory where the trigger documents are |
| 22 | +placed by the back-end. As the worker will look for any file with "xml" extension it is recommended to use |
| 23 | +a specific directory for triggers only. |
| 24 | +Furthermore the regular worker _interval_ parameter can be used to set the interval at which the worker |
| 25 | +should check for new triggers. |
| 26 | + |
| 27 | +If you will only be using "trigger based" pulling on this Holodeck B2B instance you should disable the |
| 28 | +standard "interval based" pull mechanism by removing or deactivating the _pullConfigWatcher_ worker. |
| 29 | + |
| 30 | +## Usage |
| 31 | +Pull Request can only be triggered for existing P-Modes that define how the Pull Request must be |
| 32 | +processed.So before triggering a request the P-Mode must have been registered in Holodeck B2B, either |
| 33 | +manually by an operator or automatically by the back-end. |
| 34 | + |
| 35 | +To trigger a Pull Request the back-end application must create a _"Pull Request trigger document"_ in the |
| 36 | +directory specified in the _watchPath_ parameter of the watcher described above. These "trigger" documents |
| 37 | +are XML documents that MUST have the "xml" extension. They must contain at least the P-Mode that governs |
| 38 | +the processing of the Pull Request and can further configure the MPC [sub-channel] and selection criteria |
| 39 | +to use for pulling. Their structure is defined by XML schema |
| 40 | +[http://holodeck-b2b.org/schemas/2018/02/pullrequest/metdata](src/main/resources/pulltrigger.xsd). |
| 41 | +**NOTE:** In the current version only the "simple" selection criteria as described in section 5.1 of the |
| 42 | +ebMS V3 Part 2 Specification are supported. |
| 43 | + |
| 44 | +When the watcher detects a trigger document it will check that the P-Mode exists and submit a Pull Request |
| 45 | +Signal message unit to the Holodeck B2B Core to trigger the pull process. After processing the file, i.e. |
| 46 | +after the Pull Request has been submitted, the extension will be changed to "triggered". When an error |
| 47 | +occurs on submit the extension will be changed to "rejected" and information on the error will be written |
| 48 | +to a file with the same name but with extension "err". |
| 49 | + |
| 50 | +## Contributing |
| 51 | +We are using the simplified Github workflow to accept modifications which means you should: |
| 52 | +* create an issue related to the problem you want to fix or the function you want to add (good for traceability and cross-reference) |
| 53 | +* fork the repository |
| 54 | +* create a branch (optionally with the reference to the issue in the name) |
| 55 | +* write your code, including comments |
| 56 | +* commit incrementally with readable and detailed commit messages |
| 57 | +* run integration tests to check everything works on runtime |
| 58 | +* Update the changelog with a short description of the changes including a reference to the issues fixed |
| 59 | +* submit a pull request *against the 'next' branch* of this repository |
| 60 | + |
| 61 | +If your contribution is more than a patch, please contact us beforehand to discuss which branch you can best submit the pull request to. |
| 62 | + |
| 63 | +### Submitting bugs |
| 64 | +You can report issues directly on the [project Issue Tracker](https://github.com/holodeck-b2b/pullrequest-trigger/issues). |
| 65 | +Please document the steps to reproduce your problem in as much detail as you can (if needed and possible include screenshots). |
| 66 | + |
| 67 | +## Versioning |
| 68 | +Version numbering follows the [Semantic versioning](http://semver.org/) approach. |
| 69 | + |
| 70 | +## License |
| 71 | +This Holodeck B2B extension is licensed under the General Public License V3 (GPLv3) which is included in the LICENSE file in the root of the project. |
| 72 | + |
| 73 | +## Support |
| 74 | +Commercial Holodeck B2B support is provided by Chasquis Consulting. Visit [Chasquis-Consulting.com](http://chasquis-consulting.com/holodeck-b2b-support/) for more information. |
0 commit comments