├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── LICENSE ├── README.md ├── assets └── images │ ├── oht-logo.png │ └── oht-type.png └── specification.md /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Open Human Task Logo 3 |
4 | Open Human Task Logotyping 5 |

6 |
7 | 8 | [![contributions welcome](https://img.shields.io/badge/contributions-welcome-green.svg?style=flat)](https://github.com/openhumantask/specification/issues) 9 | [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/openhumantask/specification/blob/master/LICENSE) 10 | [](https://cloud-native.slack.com/messages/serverless-workflow) 11 | 12 | ## About 13 | 14 | The Open Human Task (OHT) declares a vendor-neutral, open-source, free and community-driven specification for defining, running and managing Domain Specific Language (DSL) based human interactions with modern software ecosystems. 15 | 16 | The Open Human Task DSL is heavily based on the (awesome) [WS-Human Task Specification](http://docs.oasis-open.org/bpel4people/ws-humantask-1.1-spec-cs-01.html), which it intends to be a modernization of. 17 | 18 | The project is composed of: 19 | 20 | - [Specification](specification.md) to define and document the OHT DSL. 21 | - [Software Development Kits (SDKs)]() to read, write, parse and validate `Human Task Definitions` in multiple languages. 22 | - [Runtimes](): to manage, serve, render and execute `Human Task Definitions`. 23 | 24 | ## Table of Contents 25 | 26 | - [Releases](#releases) 27 | - [Community](#community) 28 | - [Governance](#governance) 29 | - [Owners](#owners) 30 | - [Roles and Responsibilities](#roles-and-responsibilities) 31 | - [Maintainers](#maintainers) 32 | - [Reviewers](#reviewers) 33 | - [Communications](#communications) 34 | - [Code of Conduct](#code-of-conduct) 35 | - [Meetings](#meetings) 36 | 37 | ## Releases 38 | 39 | | Latest release | Latest release | Branch | Working branch | 40 | |----------------|----------------|--------|----------------| 41 | | **Core** | 42 | | [Human Task Specification](specification.md) | [v0.1.0]() | [0.1.x]() | [main](https://github.com/openhumantask/specification) | 43 | | **SDKs** | 44 | | [.NET SDK](https://github.com/openhumantask/sdk-net) | [v0.1.0]() | [0.1.x]() | [main](https://github.com/openhumantask/sdk-net) | 45 | 46 | ## Community 47 | 48 | ### Governance 49 | 50 | ### Roles and Responsibilities 51 | 52 | #### Maintainers 53 | 54 | - [cdavernas](https://github.com/cdavernas) 55 | - [JBBianchi](https://github.com/jbbianchi) 56 | 57 | #### Reviewers 58 | 59 | - [tsurdilo](https://github.com/tsurdilo) 60 | - [thabart](https://github.com/thabart) 61 | 62 | ### Communications 63 | 64 | Join us on: 65 | 66 | - [Slack](https://join.slack.com/t/openhumantask/shared_invite/zt-1hopjg6kw-R0SiYhCheH01BDFWeRsi6g) 67 | 68 | ### Code of Conduct 69 | 70 | ### Meetings 71 | -------------------------------------------------------------------------------- /assets/images/oht-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openhumantask/specification/b5b5c8785100dbe5259951c2d95ee8be79137b55/assets/images/oht-logo.png -------------------------------------------------------------------------------- /assets/images/oht-type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openhumantask/specification/b5b5c8785100dbe5259951c2d95ee8be79137b55/assets/images/oht-type.png -------------------------------------------------------------------------------- /specification.md: -------------------------------------------------------------------------------- 1 | # Open Human Task Specification 2 | 3 | ## Table of Contents 4 | 5 | - [Introduction](#introduction) 6 | - [Specification](#specification) 7 | - [Core Concepts](#core-concepts) 8 | - [Generic Human Roles](#generic-human-roles) 9 | - [Potential initiators](#potential-initiators) 10 | - [Potential owners](#potential-owners) 11 | - [Excluded owners](#excluded-owners) 12 | - [Stakeholders](#stakeholders) 13 | - [Business Administrators](#business-administrators) 14 | - [Lifecycle](#lifecycle) 15 | - [Instanciation](#instanciation) 16 | - [Task Instance Statuses](#task-instance-statuses) 17 | - [Flow](#task-instance-flow) 18 | - [Runtime expressions](#runtime-expressions) 19 | - [Task Instance Data](#task-instance-data) 20 | - [Input Data](#input-data) 21 | - [Form Data](#form-data) 22 | - [Output Data](#output-data) 23 | - [Runtime Context Data](#runtime-context-data) 24 | - [Deadlines and Escalations](#deadlines-and-escalations) 25 | - [Notifications](#notifications) 26 | - [Implementation Guidelines](#implementation-guidelines) 27 | - [API](#api) 28 | - [Cloud Events](#cloud-events) 29 | - [Definitions](#definitions) 30 | - [Human Task Definitions](#human-task-definitions) 31 | - [People Assignments Definitions](#people-assignments-definitions) 32 | - [People Reference Definitions](#people-reference-definitions) 33 | - [Users Reference Definitions](#users-reference-definitions) 34 | - [Claim Filter Definitions](#claim-filter-definitions) 35 | - [Logical People Group Definitions](#logical-people-group-definitions) 36 | - [Form Definitions](#form-definitions) 37 | - [Data Model Definitions](#data-model-definitions) 38 | - [View Definitions](#view-definitions) 39 | - [Subtask Definitions](#subtask-definitions) 40 | - [Notification Definitions](#notification-definitions) 41 | - [Reassignment](#reassignment-definitions) 42 | - [Deadline Definitions](#deadline-definitions) 43 | - [Completion Behavior Definitions](#completion-behavior-definitions) 44 | - [Outcome Definitions](#outcome-definitions) 45 | - [Escalation Definitions](#escalation-definitions) 46 | - [Escalation Action Definitions](#escalation-action-definitions) 47 | - [Human Tasks](#human-tasks) 48 | - [People Assignments](#people-assignments) 49 | - [User References](#user-references) 50 | - [Task Definition References](#task-definition-references) 51 | - [Forms](#forms) 52 | - [Views](#views) 53 | - [Attachments](#attachments) 54 | - [Comments](#comments) 55 | 56 | ## Introduction 57 | 58 | The present documents describes the Open Human Task specification, which is intended as a modernization of the (awesome) [WS-HumanTask Specification](http://docs.oasis-open.org/bpel4people/ws-humantask-1.1-spec-cs-01.html). 59 | 60 | ## Core concepts 61 | 62 | ### Generic Human Roles 63 | 64 | Generic human roles define what a person or a group of people resulting from a people query can do with tasks and notifications. The following generic human roles are taken into account in this specification: 65 | 66 | - [Potential initiators](#potential-initiators) 67 | - [Initiator](#initiator) 68 | - [Stakeholders](#stakeholers) 69 | - [Potential owners](#potential-owners) 70 | - [Actual owner](#actual-owner) 71 | - [Excluded owners](#excluded-owners) 72 | - [Business administrators](#business-administrators) 73 | - [Notification recipients]() 74 | 75 | #### Potential initiators 76 | 77 | ##### Description 78 | 79 | Defines the potential initiators of the task. 80 | 81 | ***Remark(s)**: Implementations should allow users to instanciate the tasks they are the potential initiators of.* 82 | 83 | ##### Permissions 84 | 85 | - [x] Instanciate task. 86 | - [x] Patch input data *(only before task has been claimed)*. 87 | - [x] Add attachment *(only before task has been claimed)*. 88 | - [x] Add comment *(only before task has been claimed)*. 89 | 90 | #### Initiator 91 | 92 | ##### Description 93 | 94 | Represents the person that has initiated (instanciated) the task. 95 | 96 | ##### Permissions 97 | 98 | - [x] Patch input data *(only before task has been claimed)*. 99 | - [x] Change priority *(only before task has been claimed)*. 100 | - [x] Add attachment *(only before task has been claimed)*. 101 | - [x] Add comment *(only before task has been claimed)*. 102 | 103 | #### Stakeholders 104 | 105 | ##### Description 106 | 107 | Defines the people ultimately responsible for the oversight and outcome of the task. A task stakeholder can influence the progress of a task, for example, by adding ad-hoc attachments, forwarding the task, or simply observing the state changes of the task. It is also allowed to perform administrative actions on the task instance and associated notification(s), such as resolving missed deadlines. 108 | 109 | ##### Permissions 110 | 111 | - [x] Add/remove attachment. 112 | - [x] Add comment. 113 | - [x] Receive notifications. 114 | - [x] Patch input/output data. 115 | - [x] Forward task. 116 | - [x] Revoke task. 117 | - [x] Change priority. 118 | 119 | #### Potential owners 120 | 121 | ##### Description 122 | 123 | Defines the persons who receive the task so that they can claim and complete it. A potential owner becomes the actual owner of a task by explicitly claiming it. Before the task has been claimed, potential owners can influence the progress of the task, for example by changing the priority of the task, adding ad-hoc attachments or comments. 124 | 125 | ##### Permissions 126 | 127 | - [x] Claim task. 128 | - [x] Change priority *(only before task has been claimed)*. 129 | - [x] Add attachment *(only before task has been claimed)*. 130 | - [x] Add comment *(only before task has been claimed)*. 131 | 132 | #### Actual owner 133 | 134 | ##### Description 135 | 136 | An actual owner of a task is the person actually performing the task. When task is performed, the actual owner can execute actions, such as revoking the claim, forwarding the task, suspending and resuming the task execution or changing the priority of the task. 137 | 138 | ##### Permissions 139 | 140 | - [x] Revoke task. 141 | - [x] Skip task. 142 | - [x] Delegate/forward task. 143 | - [x] Suspend task. 144 | - [x] Resume task. 145 | - [x] Change priority. 146 | - [x] Add attachment. 147 | - [x] Add comment. 148 | 149 | #### Excluded owners 150 | 151 | ##### Description 152 | 153 | Defines the users that are excluded from performing (and otherwise know/do anything about) the task. 154 | 155 | ##### Permissions 156 | 157 | None. 158 | 159 | #### Business administrators 160 | 161 | ##### Description 162 | 163 | Business administrators play the same role as task stakeholders but at task definition level. Therefore, business administrators can perform the exact same operations as task stakeholders. Business administrators can also observe the progress of notifications. 164 | 165 | ##### Permissions 166 | 167 | - [x] Add/remove attachment. 168 | - [x] Add comment. 169 | - [x] Receive notifications. 170 | - [x] Patch input/output data. 171 | - [x] Forward task. 172 | - [x] Revoke task. 173 | - [x] Change priority. 174 | - [x] Edit task definition. 175 | 176 | #### Notification recipients 177 | 178 | ##### Description 179 | 180 | Defines the people who receive notifications about the user task's status. 181 | 182 | ##### Permissions 183 | 184 | - [x] Receive notifications. 185 | 186 | ### Lifecycle 187 | 188 | #### Instanciation 189 | 190 | Once created, a [human task definition](#human-task-definition) needs to be instanciated, which can be done in various ways: 191 | 192 | - `Periodically`, by defining a [schedule](#schedule-definition), in which case the [task](#human-task-definition) will be instanciated at configured intervals. 193 | - `Manually`, in which case the [task](#human-task-definition) is explicitly instanciated by a [potential initiator](#potential-initiators). 194 | - `Asynchronously`, in which case the [task](#human-task-definition) is instanciated by a consumed [`HumanTaskCreationRequested` integration event](#human-task-creation-requested-integration-event). 195 | - `Implicitly`, in which case the [task](#human-task-definition) is instanciated by another [task](#human-task-definition), for example as the result of an [escalation](#deadlines-and-escalations). 196 | 197 | #### Task instance statuses 198 | 199 | | name | description | 200 | |------|-------------| 201 | | `created` | The [task](#human-tasks) has been created.
It should automatically move to the `ready` status, save if the [potential owners](#potential-owners) query did not resolve a single user.
In that case, a [business administrator](#business-administrator) of the task is expected to explicitly assign the [task](#human-tasks).| 202 | | `ready` | The [task](#human-tasks) can be claimed by one of its [potential owners](#potential-owners). | 203 | | `reserved` | The [task](#human-tasks) is assigned to a single person or has been claimed by one of its [potential owners](#potential-owners).
The [actual owner](#actual-owner) of a [task](#human-tasks) can choose to release it and make it again available to its [potential owners](#potential-owners). | 204 | | `running` | The [task](#human-tasks) has started and is in progress. | 205 | | `completed` | The [task](#human-tasks) has been completed. | 206 | | `obsolete` | The [task](#human-tasks) is obsolete and has been skipped. | 207 | 208 | #### Task instance flow 209 | 210 | ```mermaid 211 | graph TD; 212 | Created-->Ready; 213 | Created--When assigned to a specific user-->Reserved; 214 | 215 | Ready--When claimed-->Reserved; 216 | 217 | Reserved-->InProgress; 218 | 219 | InProgress-->Completed 220 | ``` 221 | 222 | ### Runtime expressions 223 | 224 | #### Description 225 | 226 | The specification defines expressions that can be used to select, filter, alter and create task-related data based on the [operational context](#operational-context). 227 | 228 | By convention, all runtime expressions should be expressed using the `${ expression }` format, even as values of properties that explicitly expect a runtime expression. 229 | This allows readers of an authored [definition](#human-task-definitions) to easily identify them. 230 | 231 | Because of its countless features, we chose to use [`jq`](https://stedolan.github.io/jq/) as the spec's default runtime expression language, which by the way is a minimal requirement for implementations. 232 | 233 | #### Examples 234 | 235 | *Example of a [`jq`](https://stedolan.github.io/jq/) expression used to interpolate a greeting message with the [actual owner](#actual-owner)'s name:* 236 | 237 | ```yaml 238 | Hello ${ $CONTEXT.peopleAssignments.actualOwner.name }! How are you today? 239 | ``` 240 | 241 | *Example of a [`jq`](https://stedolan.github.io/jq/) expression used to merge the task's input data and the form's data:* 242 | 243 | ```yaml 244 | $CONTEXT.inputData + $CONTEXT.form.data 245 | ``` 246 | 247 | *Example of a [`jq`](https://stedolan.github.io/jq/) condition used to check if an hypothetical customer passed as the task's input is an adult:* 248 | ```yaml 249 | ${ (((now | todate)[0:4] | tonumber) - ($CONTEXT.inputData.customer.dateOfBirth[0:4] | tonumber)) >= 18 } 250 | ``` 251 | 252 | ### Task Instance Data 253 | 254 | Task instances have access to 3 types of data: 255 | 256 | - [Input Data](#input-data): The task's input data. 257 | - [Form Data](#form-data): The task's form data, filled by owners. 258 | - [Output Data](#input-data): The task's output data. 259 | 260 | The data is exposed to [runtime expressions](#runtime-expressions) by the [runtime context data](#runtime-context-data), using the `$CONTEXT` argument, which is described [here](#runtime-context-data). 261 | 262 | #### Input Data 263 | 264 | ##### Introduction 265 | 266 | The business data passed as the task's input. 267 | 268 | It may or may not be, partially or not, related to the data of the task's form submitted by users. Equally, it may or may not be, partially or not, related to the task's output data. 269 | 270 | The data is validated against the [JsonSchema](https://json-schema.org/) specified as the `inputDataSchema` property of the [task's definition](#human-task-definitions), if any. 271 | 272 | Note that the input data should be presented in a human-readable way (avoid machine formats such as `json`) to users performing the task. 273 | 274 | ##### Examples 275 | 276 | ```yaml 277 | client: 278 | id: 123 279 | firstName: Larry 280 | lastName: Queen 281 | dateOfBirth: '03/22/1969' 282 | request: 283 | concerns: debit-card 284 | requestType: order 285 | parameters: 286 | originatesFrom: 287 | type: agency 288 | name: OpenBank Zimbabwe 289 | address: 69 Love Street, 1969 Harare, Zimbabwe 290 | deliverTo: 291 | type: agency 292 | name: OpenBank Zimbabwe 293 | address: 69 Love Street, 1969 Harare, Zimbabwe 294 | observations: none 295 | ``` 296 | 297 | #### Form Data 298 | 299 | ##### Introduction 300 | 301 | Represents the form data submitted by task owners. 302 | 303 | ##### Examples 304 | 305 | ```yaml 306 | requestReviewed: true 307 | requestOutcome: accepted 308 | confidenceRatio: 0.92 309 | observations: None 310 | ``` 311 | 312 | #### Output Data 313 | 314 | ##### Introduction 315 | 316 | The task's business data output. 317 | 318 | The data is validated against the [JsonSchema](https://json-schema.org/) specified as the `outputDataSchema` property of the [task's definition](#human-task-definitions), if any. 319 | 320 | ##### Examples 321 | 322 | ```yaml 323 | client: 324 | id: 123 325 | firstName: Larry 326 | lastName: Queen 327 | dateOfBirth: '03/22/1969' 328 | request: 329 | createdAt: 02/02/2022, 14:55:51 +01:00 330 | concerns: debit-card 331 | requestType: order 332 | parameters: 333 | originatesFrom: 334 | type: agency 335 | name: OpenBank Zimbabwe 336 | address: 69 Love Street, 00000 Harare, Zimbabwe 337 | deliverTo: 338 | type: agency 339 | name: OpenBank Zimbabwe 340 | address: 69 Love Street, 00000 Harare, Zimbabwe 341 | observations: none 342 | result: 343 | type: success 344 | status: inProgress 345 | scheduledDate: 02/07/2022 346 | ``` 347 | 348 | #### Runtime Context Data 349 | 350 | ##### Introduction 351 | 352 | The `$CONTEXT` [runtime expression](#runtime-expressions) argument exposes operational data, such as both the task's input and output data, its form, its comments, its attachments, etc. 353 | 354 | Note that exposed data is processed and arranged before making it available. 355 | 356 | ##### Properties 357 | 358 | | Name | Type | Description | 359 | |------|:----:|-------------| 360 | | id | `string` | The task instance's unique identifier. | 361 | | key | `string` | The task instance's key. | 362 | | definitionId | `string` | The unique identifier of the [task's definition](#human-task-definitions). | 363 | | status | `enum` | The task instance's [status](#task-statuses). | 364 | | priority | `number` | The task instance's priority. | 365 | | title | `object` | The mappings of localized titles to their two-letter **ISO 639-1** language names. | 366 | | subject | `object` | The mappings of localized subjects to their two-letter **ISO 639-1** language names. | 367 | | description | `object` | The mappings of localized descriptions to their two-letter **ISO 639-1** language names. | 368 | | peopleAssginments | [`peopleAssignments`](#people-assignments-definitions) | Describes the people related to the task and their assigned role(s). | 369 | | inputData | `object` | The task instance's input data. | 370 | | outputData | `object` | The task instance's output data. | 371 | | form | [`form`](#forms) | The task's form. | 372 | | comments | [`comment[]`](#comments) | An array containing the task's comments. | 373 | | attachments | [`attachment`](#attachments) | An array containg the task's attachments. | 374 | 375 | ##### Examples 376 | 377 | *For example, if a [task's definition](#human-task-definitions) declares a subject such as the following:* 378 | 379 | ```yaml 380 | ... 381 | subject: 382 | en: 'OpenBank Memo - ${ $CONTEXT.inputData.department.name.en } Department' 383 | ... 384 | ``` 385 | 386 | *... and if it is instanciated with an input data such as the following:* 387 | 388 | ```yaml 389 | department: 390 | id: 123 391 | name: 392 | en: 'Credits and Loans' 393 | ``` 394 | 395 | *The following data would be made available in the `$CONTEXT` argument:* 396 | 397 | ```yaml 398 | ... 399 | subject: 400 | en: 'OpenBank Memo - Credits and Loans Department' 401 | ... 402 | ``` 403 | 404 | *Example of a [jq](https://stedolan.github.io/jq/) condition that checks whether or not the task's instance's `priority` is higher than or equals 10:* 405 | 406 | ```jq 407 | $CONTEXT.priority >= 10 408 | ``` 409 | 410 | ### Deadlines and escalations 411 | 412 | [Deadlines](#deadline-definitions) define a point in time at which a human task must have reached a specific status. If it did not, a set of [action](#escalation-action-definitions) are performed as part of conditonal [escalations](#escalation-definitions). 413 | 414 | There are two kind of [deadlines](#deadline-definitions): 415 | 416 | - `start`: Specifies the time until the task has to start, i.e. it has to reach state `inProgress`. It is defined as either the period of time or the point in time until the task has to reach state `inProgress`. 417 | Since expressions are allowed, durations and deadlines can be calculated at runtime, which for example enables custom calendar integration. The time starts to be measured from the time at which the task enters the state `created`. If the task does not reach state `inProgress` by the deadline an [escalation action](#escalation-action-definitions) or a set of [escalation actions](#escalation-action-definitions) is performed. Once the task is started, the timer becomes obsolete. 418 | 419 | - `completion`: Specifies the due time of the task. It is defined as either the period of time until the task gets due or the point in time when the task gets due. The time starts to be measured from the time at which the task enters the state Created. If the task does not reach one of the final states (`completed`, `failed`, `error`, `exited`, `obsolete`) by the deadline an [escalation action](#escalation-action-definitions) or a set of [escalation actions](#escalation-action-definitions) is performed. 420 | 421 | When a [deadline](#deadline-definitions) is reached, its [escaltions](#escalation-definitions) are evaluated to determine whether or not they should be performed. If an [escalations](#escalation-definitions) matches, the [action](#escalation-action-definitions) it defines is performed. 422 | 423 | There are 3 types of [escalation actions](#escalation-action-definitions): 424 | 425 | - [`notification`](#notification-escalation-action-definitions): Creates a new instance of the specified [notification definition](#notification-definitions) and adds to the work item queue of the specified recipients. 426 | - [`reassignment`](#reassignment-escalation-action-definitions): Reassigns the task to another person and/or group of people. 427 | - [`subtask`](#subtask-escalation-action-definitions): Creates a new subtask as the result of the escalation. 428 | 429 | An example deadline use case would be to notify the actual owner that the task is past due after 1 hours if it has not been completed. Here is how to do this: 430 | 431 | ```yaml 432 | ... 433 | deadlines: 434 | - name: start-before-1h 435 | type: completion 436 | duration: PT1H 437 | escalations: 438 | - name: reminder 439 | action: 440 | notification: 441 | refName: please-resolve-urgently 442 | ... 443 | ``` 444 | 445 | ### Notifications 446 | 447 | [Notifications](#notification-definitions) are used to communicate the progress of a task to one or more recipients. 448 | 449 | Like [forms](#form-definitions), [notifications](#notification-definitions) define a [view](#view-definitions) that specifies how to render them. 450 | 451 | ## Implementations guidelines 452 | 453 | *Coming soon...* 454 | 455 | ### API 456 | 457 | *Coming soon...* 458 | 459 | ### Cloud Events 460 | 461 | *Coming soon...* 462 | 463 | ## Definitions 464 | 465 | ### Human Task Definitions 466 | 467 | #### Description 468 | 469 | Defines a human task and configures its behaviors. 470 | 471 | #### Properties 472 | 473 | | Name | Type | Required | Runtime
Expression | Description | 474 | |------|:----:|:--------:|:---------------------:|-------------| 475 | | id | `string` | `yes` | `no` | A string that globally and uniquely identifies the human task definition.
*MUST be lowercase and must only contain alphanumeric characters, with the exception of the `.` and `-` characters.
It is recommended for the id to be automatically generated by implementations, following the `{namespace}.{name}:{version}` format.* | 476 | | name | `string` | `yes` | `no` | The name of the human task definition.
*Must be lowercase and only contain alphanumeric characters, with the exceptions of the `-` character.** | 477 | | namespace | `string` | `yes` | `no` | The namespace the human task definition belongs to.
*Must be lowercase and only contain alphanumeric characters, with the exceptions of the `-` and `.` characters.* | 478 | | version | `string` | `yes` | `no` | The [semantic version](https://semver.org/) of the human task definition. | 479 | | specVersion | `string` | `yes` | `no` | The Human Task spec version to use.
*Defaults to the latest released spec version.* | 480 | | routingMode | `enum` | `yes` | `no` | The task's routing mode.
Possible values are: `none`, `sequential` and `parallel`.
If sets to `none`, the task's does not perform any routing.
If set to `sequential`, a new subtask will be created and assigned to the first resolved [potential owner](#potential-owners). The runtime waits for the subtask's completion, then assigns a new one to the next [potential owner](#potential-owners), and repeats those steps until all [potential owner](#potential-owners) have performed the task.
If set to `parallel`, a subtask is created for each and every [potential owner](#potential-owners). The resulting subtasks are performed by their [actual owner](#actual-owner) in parallel.
*Defaults to `none`.* | 481 | | expressionLanguage | `string` | `yes` | `no` | The language to use to evaluate [runtime expression](#runtime-expression)s.
*Defaults to [`jq`](https://stedolan.github.io/jq/).* | 482 | | key | `string` | `no` | `yes` | A literal or a [runtime expression](#runtime-expression) used to generate the keys of instanciated human tasks. It could be used, in the case of a purchase review, to set the reviewed purchase order's id as the human task's key | 483 | | title | `string`
`object` | `no` | `yes` | The task's localized titles. Titles are used as human task localized display name.
If a `string`, the culture-invariant title's value.
If an `object`, the mappings of localized titles to their two-letter ISO 639-1 language names.
*Supports [runtime expression](#runtime-expressions).* | 484 | | subject | `string`
`object` | `no` | `yes` | The task's localized subjects.
If a `string`, the culture-invariant subject's value.
If an `object`, the mappings of localized subjects to their two-letter ISO 639-1 language names.
*Supports [runtime expression](#runtime-expressions).* | 485 | | description | `string`
`object` | `no` | `yes` | The task's localized descriptions.
If a `string`, the culture-invariant description's value.
If an `object`, the mappings of localized descriptions to their two-letter ISO 639-1 language names.
*Supports [runtime expression](#runtime-expressions).* | 486 | | peopleAssignments | [`peopleAssignmentsDefinition`](#people-assignments-definitions) | `no` | `no` | The configuration of the task's people assignments to generic roles. | 487 | | inputData | [`dataModelDefinition`](#data-model-definitions) | `no` | `no` | A [`data model definition`](#data-model-definitions) use to define, validate and initialize the input of the human task definition's instances. | 488 | | outputData | [`dataModelDefinition`](#data-model-definitions) | `no` | `no` | A [`data model definition`](#data-model-definitions) use to define, validate and initialize the output of the human task definition's instances. | 489 | | form | `string`
[`formDefinition`](#form-definitions) | `no` | `no` | Configures the task's form.
*If a `string`, an uri referencing the external [form definition](#form-definition).*
*If an `object`, the inline configuration of the human task's [form definition](#form-definition).* | 490 | | subtasks | [`subTaskDefinition[]`](#subtask-definitions) | `no` | `no` | An array containing the task's children task. | 491 | | subtaskExecutionMode | `enum` | `depends` | `no` | Defines the way subtasks should be executed.
Possible values are: `sequential` and `parallel`.
If set to `sequential`, [subtasks](#subtask-definitions) are executed in lexical order.
If set to `parallel`, [subtasks](#subtask-definitions) are executed in parallel.
*Required if at least one [subtask](#subtask-definitions) has been defined.*
*Defaults to `sequential`.* | 492 | | deadlines | [`deadlineDefinition[]`](#deadline-definitions) | `no` | `no` | An array containing the [`deadlines`](#deadline-definitions) of the human task's instances. | 493 | | completionBehaviors | [`completionBehaviorDefinition[]`](#completion-behavior-definitions) | `no` | `no` | An array that contains the task's [completion behaviors](#completion-behavior-definitions).
*Required if `routingMode` has not been set to `none`, or if the task defines `subtasks`. Otherwise optional.* | 494 | | outcomes | [`outcomeDefinition[]`](#outcome-definitions) | `no` | `no` | An array containing the task's possible [outcomes](#outcome-definitions). | 495 | | annotations | `array`
`object` | `depends` | `no` | An array of string-based key/value pairs containing helpful terms used to describe the human task intended purpose, subject areas, or other important qualities. 496 | | metadata | `object` | `no` | `no` | An object used to provide additional unstructured information about the human task definition. May be used by implementations to define additional functionality. | 497 | 498 | #### Examples 499 | 500 | ```yaml 501 | id: openbank.loan-management.loan-approval-request:1.0.5 502 | name: loan-approval-request 503 | namespace: openbank.loan-management 504 | version: '1.0.0' 505 | specVersion: '0.1' 506 | expressionLanguage: jq 507 | key: '${ .case.reference }' 508 | title: 509 | fr: Examiner requête de crédit 510 | en: Review loan request 511 | subject: 512 | fr: Crédits à tempérament 513 | en: Installment credits 514 | description: 515 | fr: Examiner une requête de crédit à tempérament 516 | en: Review an installment credit request 517 | inputData: 518 | schema: https://foo-bank.com/schemas/humantasks/input.json 519 | outputData: 520 | schema: https://foo-bank.com/schemas/humantasks/output.json 521 | form: 522 | data: 523 | schema: https://foo-bank.com/schemas/humantasks/form.data.json 524 | view: openbank.loan-management.forms.loan-approval-request:1.0.0 525 | notifications: 526 | - name: task-pending-reminder 527 | view: openbank.loan-management.notifications.task-pending-reminder:1.0.0 528 | input: '${ .input }' 529 | recipients: 530 | - user: alan 531 | deadlines: 532 | - name: approve-before-48h 533 | type: start 534 | duration: P2D 535 | escalations: 536 | - name: reminder 537 | action: 538 | notification: task-pending-reminder 539 | outcomes: 540 | - name: approved 541 | condition: '${ .output.approved and .output.approverId != null }' 542 | value: Approved 543 | - name: rejected 544 | value: 545 | en: Approved 546 | fr: Approuvé 547 | annotations: 548 | tags: loan approval 549 | metadata: 550 | x-obms-css-lib: adminkit 551 | ``` 552 | 553 | ### People Assignments Definitions 554 | 555 | #### Description 556 | 557 | Represents the definition used to configure people assignments for instance of the human task definition. 558 | 559 | #### Properties 560 | 561 | | Name | Type | Required | Runtime
Expression | Description | 562 | |------|:----:|:--------:|:---------------------:|-------------| 563 | | [potentialOwners](#potential-owners) | [`peopleReferenceDefinition[]`](#people-reference-definitions) | `no` | `no` | The [potential owners](#potential-owners) of the task. | 564 | | [excludedOwners](#excluded-owners) | [`peopleReferenceDefinition[]`](#people-reference-definitions) | `no` | `no` | The [excluded owners](#excluded-owners) of the task. | 565 | | [potentialTaskInitiators](#potential-task-initiators) | [`peopleReferenceDefinition[]`](#people-reference-definitions) | `no` | `no` | The [potential initiators](#potential-task-initiators) of the task. | 566 | | [taskStakeholders](#stakeholders) | [`peopleReferenceDefinition[]`](#people-reference-definitions) | `no` | `no` | The [stakeholders](#stakeholders) of the task. | 567 | | [businessAdministrators](#businessAdministrators) | [`peopleReferenceDefinition[]`](#people-reference-definitions) | `no` | `no` | The [business administrators](#business-administrators) of the task. | 568 | | [notificationRecipents](#notification-recipents) | [`peopleReferenceDefinition[]`](#people-reference-definitions) | `no` | `no` | The [recipients of all notifications](#notification-recipents) produced by the task. | 569 | | groups | [`logicalPeopleGroupDefinition[]`](#logical-people-group-definitions) | `no` | `no` | An array containing the [`logical people groups`](#logical-people-group-definition) defined for the task's scope. | 570 | 571 | #### Examples 572 | 573 | ```yaml 574 | ... 575 | peopleAssignments: 576 | potentialOwners: 577 | - user: alan 578 | ... 579 | ``` 580 | 581 | ### People Reference Definitions 582 | 583 | #### Description 584 | 585 | Represents an object used to reference a user or a group of users based on given parameters. 586 | 587 | #### Properties 588 | 589 | | Name | Type | Required | Runtime
Expression | Description | 590 | |------|:----:|:--------:|:---------------------:|-------------| 591 | | user | `string` | `depends` | `yes` | References the user with the specified id, as defined by the JWT `sub` claim.
*Required if `users` has not been set.* | 592 | | users | [`usersReferenceDefinition`](#users-reference-definitions) | `depends`| `no` | References multiple users that match the defined filters.
*Required if `user` has not been set.* | 593 | 594 | #### Examples 595 | 596 | *Example of a definition referencing a single person by id:* 597 | 598 | ```yaml 599 | ... 600 | - user: alan 601 | ... 602 | ``` 603 | 604 | *Example of a definition referencing anyone that has a claim of type `task:perform` as well as a claim of type `division-role` with the value equal to `clerk`:* 605 | 606 | ```yaml 607 | ... 608 | - users: 609 | withClaims: 610 | - type: 'task:perform' 611 | - type: division-role 612 | value: clerk 613 | ... 614 | ``` 615 | 616 | ### Users Reference Definitions 617 | 618 | #### Description 619 | 620 | Represents an object used to reference multiple users based on given parameters. 621 | 622 | #### Properties 623 | 624 | | Name | Type | Required | Runtime
Expression | Description | 625 | |------|:----:|:--------:|:---------------------:|-------------| 626 | | withClaims | [`claimFilterDefinition[]`](#claim-filter-definitions) | `depends` | `no` | The claims to filter by the users to reference.
Required if `inGroup` and `inGenericRole` have not been set, otherwise ignored. | 627 | | inGroup | `string` | `depends` | `yes` | The logical group that defines the users to reference.
Required if `withClaims` and `inGenericRole` have not been set, otherwise ignored. | 628 | | [inGenericRole](#generic-human-roles) | `enum` | `depends` | `no` | The [generic role](#generic-human-roles) that defines the users to reference.
Required if `withClaims` and `inGroup` have not been set, otherwise ignored.
*Assignments of users to generic roles are delcared in the [human task definition's `peopleAssignments`](#human-task-definitions) property.* | 629 | 630 | #### Examples 631 | 632 | *Example of a definition referencing users that match the specified [claim filters](#claim-filter-definitions):* 633 | 634 | ```yaml 635 | ... 636 | - users: 637 | withClaims: 638 | - type: 'task:perform' 639 | - type: division-role 640 | value: clerk 641 | ... 642 | ``` 643 | 644 | *Example of a definition referencing the task's business administrators:* 645 | 646 | ```yaml 647 | ... 648 | - users: 649 | inGenericRole: businessAdministrator 650 | ... 651 | ``` 652 | 653 | *Example of a definition referencing the people in the regional clerk group:* 654 | 655 | ```yaml 656 | ... 657 | - users: 658 | inGroup: regional-clerks 659 | ... 660 | ``` 661 | 662 | ### Claim Filter Definitions 663 | 664 | #### Description 665 | 666 | Defines a logical group of people which can be referenced in the task's scope. 667 | 668 | #### Properties 669 | 670 | | Name | Type | Required | Runtime
Expression | Description | 671 | |------|:----:|:--------:|:---------------------:|-------------| 672 | | type | `string` | `depends` | `yes` | The type of the claim matching users must own.
*Required if `value` has not been set.*
*If used in conjunction with the `value` property, filters users that have a claim of the specified type, with the specified value.*
*Supports [runtime expressions](#runtime-expressions).
Supports [regular expressions](https://www.regular-expressions.info/).* | 673 | | value | `string` | `depends` | `yes` | Specifies a claim value matching users must own.
*Required if `type` has not been set.*
*If the `type` property has not been set, filters users that have a claim of any type containing the specified value.*
*Supports [runtime expressions](#runtime-expressions).
Supports [regular expressions](https://www.regular-expressions.info/).* 674 | 675 | #### Examples 676 | 677 | *Example of a claim filter definition that matches users that own at least one claim of type `task:perform`:* 678 | ```yaml 679 | ... 680 | - type: 'task:perform' 681 | ... 682 | ``` 683 | 684 | *Example of a claim filter definition that matches users that own at least one claim that contains the value `/openbank/departments/credits`:* 685 | ```yaml 686 | ... 687 | - value: '/openbank/departments/credits' 688 | ... 689 | ``` 690 | 691 | *Example of a claim filter definition that matches users that own at least one claim matching the [`regex pattern`](https://www.regular-expressions.info/) `^\/openbank\/departments\/credits\/`:* 692 | ```yaml 693 | ... 694 | - value: '^\/openbank\/departments\/credits\/' 695 | ... 696 | ``` 697 | 698 | *Example of a claim filter definition that matches users that own at least one claim of type `openbank:department` with a value matching the [`regex pattern`](https://www.regular-expressions.info/) `^\/openbank\/departments\/credits\/`:* 699 | ```yaml 700 | ... 701 | - type: openbank:department 702 | value: '^\/openbank\/departments\/credits\/' 703 | ... 704 | ``` 705 | 706 | ### Logical People Group Definitions 707 | 708 | #### Description 709 | 710 | Defines a logical group of people which can be referenced in the task's scope. 711 | 712 | #### Properties 713 | 714 | | Name | Type | Required | Runtime
Expression | Description | 715 | |------|:----:|:--------:|:---------------------:|-------------| 716 | | name | `string` | `yes` | `no` | The name used to referenced the group in the task's scope.
*Must be lowercase and only contain alphanumeric characters, with the exceptions of the `-` character.* | 717 | | members | [peopleReferenceDefinition[]](#people-reference-definitions) | `yes` | `no` | An array containing the [people references](#people-reference-definitions) used to define the users belonging to the group.
*Must contain at least one [people reference](#people-reference-definitions).*| 718 | 719 | #### Examples 720 | 721 | ```yaml 722 | ... 723 | peopleAssignments: 724 | groups: 725 | - name: regionalClerks 726 | members: 727 | - user: alan 728 | ... 729 | ``` 730 | 731 | ### Form Definitions 732 | 733 | #### Description 734 | 735 | Represents the definition of an human task form, which is used to collect data from users. 736 | 737 | #### Properties 738 | 739 | | Name | Type | Required | Runtime
Expression | Description | 740 | |------|:----:|:--------:|:---------------------:|-------------| 741 | | data | [`dataModelDefinition`](#data-model-definitions) | `no` | `no` | Configures the form's data. | 742 | | views | [`viewDefinition[]`](#view-definitions) | `yes` | `no` | Configures the form's views.
*Must contain at least one [`view definition`](#view-definitions).* | 743 | 744 | #### Examples 745 | 746 | *Example of a form with an inline view:* 747 | 748 | ```yaml 749 | ... 750 | form: 751 | data: 752 | state: '${ .input.client }' 753 | schema: 754 | type: object 755 | properties: 756 | client: 757 | type: object 758 | properties: 759 | firstName: 760 | type: string 761 | lastName: 762 | type: string 763 | email: 764 | type: string 765 | format: email 766 | required: 767 | - firstName 768 | - lastName 769 | - email 770 | view: 771 | type: jsonform 772 | renderingMode: process 773 | template: > 774 | { 775 | "type": "VerticalLayout", 776 | "elements": [ 777 | { 778 | "type": "Label", 779 | "text": "Review new client profile" 780 | }, 781 | { 782 | "type": "Control", 783 | "scope": "#/properties/client/properties/firstName" 784 | }, 785 | { 786 | "type": "Control", 787 | "scope": "#/properties/client/properties/lastName" 788 | }, 789 | { 790 | "type": "Control", 791 | "scope": "#/properties/client/properties/email" 792 | }] 793 | } 794 | ... 795 | ``` 796 | 797 | ### Data Model Definitions 798 | 799 | #### Description 800 | 801 | Defines, describes and validates a data model. 802 | 803 | #### Properties 804 | 805 | | Name | Type | Required | Runtime
Expression | Description | 806 | |------|:----:|:--------:|:---------------------:|-------------| 807 | | schema | [`jsonSchema`](https://json-schema.org/) | `no` | `no` | The [`JsonSchema`](https://json-schema.org/) used to validate the model's data. | 808 | | state | `string`
`object` | `no` | `no` | The model's initial state.
If a `string` , is a runtime expression used to build the model's initial state based on the human task's data.
If an `object`, represents the initial state of the model to create. [Runtime expressions](#runtime-expressions) can be used in any and all properties, at whichever depth.
If not set, the initial state is empty. | 809 | 810 | #### Examples 811 | 812 | ```yaml 813 | data: 814 | state: '${ .input.client }' 815 | schema: 816 | type: object 817 | properties: 818 | client: 819 | type: object 820 | properties: 821 | firstName: 822 | type: string 823 | lastName: 824 | type: string 825 | email: 826 | type: string 827 | format: email 828 | required: 829 | - firstName 830 | - lastName 831 | - email 832 | ``` 833 | 834 | ### View Definitions 835 | 836 | #### Description 837 | 838 | Represents the definition of a view. 839 | 840 | Views can be rendered using different modes. Note that multiple modes can be combined in a comma-separated way (ex: "process, render"). 841 | 842 | - `process`: Default rendering mode. The raw template is pre-processed in search of runtime expressions it interpolates after evaluation. 843 | - `render`: The template should is pre-rendered by the server before being served to consumers. 844 | - `none`: The template is not processed nor rendered, and is given as such to consumers. 845 | 846 | #### Properties 847 | 848 | | Name | Type | Required | Runtime
Expression | Description | 849 | |------|:----:|:--------:|:---------------------:|-------------| 850 | | type | `string` | `yes` | `yes` | The view type.
*Defaults to [`gfm`(GitHub Flavored Markdown)](https://github.github.com/gfm/).*
*Can be a [runtime expression](#runtime-expression).* | 851 | | renderingMode | `enum` | `yes` | `no` | Defaults to `process`. Indicates the way the view should be rendered.
Possible values are: `process`, `render` and `none`. | 852 | | template | `string`
`object` | `yes` | `yes` | The view template.
*If a `string`, the raw template contents.*
*If an `object`, the inline template.*
*Can be a (or contain) [runtime expression(s)](#runtime-expression).* | 853 | 854 | #### Examples 855 | 856 | *Example of a view definition using a raw template (`string`):* 857 | 858 | ```yaml 859 | view: 860 | type: jsonform 861 | renderingMode: process 862 | template: > 863 | { 864 | "type": "VerticalLayout", 865 | "elements": [ 866 | { 867 | "type": "Label", 868 | "text": "Review new client profile" 869 | }, 870 | { 871 | "type": "Control", 872 | "scope": "#/properties/client/properties/firstName" 873 | }, 874 | { 875 | "type": "Control", 876 | "scope": "#/properties/client/properties/lastName" 877 | }, 878 | { 879 | "type": "Control", 880 | "scope": "#/properties/client/properties/email" 881 | }] 882 | } 883 | ``` 884 | 885 | *Example of the same view definition, using an inline template (`object`):* 886 | 887 | ```yaml 888 | ... 889 | view: 890 | type: jsonform 891 | renderingMode: process 892 | template: 893 | type: VerticalLayout 894 | elements: 895 | - type: Label 896 | text: Review new client profile 897 | - type: Control 898 | scope: "#/properties/client/properties/firstName" 899 | - type: Control 900 | scope: "#/properties/client/properties/lastName" 901 | - type: Control 902 | scope: "#/properties/client/properties/email" 903 | ... 904 | ``` 905 | 906 | ### Subtask Definitions 907 | 908 | #### Description 909 | 910 | Represents the object that defines a configures the sub tasks of a [human task](#human-tasks). 911 | 912 | #### Properties 913 | 914 | | Name | Type | Required | Runtime
Expression | Description | 915 | |------|:----:|:--------:|:---------------------:|-------------| 916 | | name | `string` | `yes` | `no` | The subtask's name.
*Must be lowercase and only contain alphanumeric characters, with the exceptions of the `-` character.* | 917 | | task | `string`
[`taskDefinitionReference`](#task-definition-references) | `yes` | `yes` | References the [human task definition](#human-task-definitions) to instanciate.
*If a `string`, the globally unique identifier of the [task definition](#human-task-definitions) to instanciate.*
If an `object`, the inline [task definition reference](#task-definition-references). | 918 | | input | `string`
`object` | `no` | `yes` | The data to pass as the [subtask](#human-tasks)'s input.
If a `string` , is a runtime expression used to build the subtask's input data based on the human task's data.
If an `object`, represents the input data of the subtask to create. runtime expressions can be used in any and all properties, at whichever depth.
If not set, no input data is supplied to the [subtask](#human-task-definitions). | 919 | | peopleAssignments | [peopleAssignments](#people-assignments-definitions) | `no` | `yes` | Configures the people to assign the [subtask](#human-task) to.
*Overrides the [assignments](#people-assignments-definitions) configured by the [subtask's definition](#human-task-definitions).* | 920 | 921 | #### Examples 922 | 923 | *Configures a subtask using the `openmoviedb.provide-movie-feedback:1.0.2` [definition](#human-task-definition), with the [input data](#input-data)'s `movieToRate` property value, and assigning it to Patrice Janssens.* 924 | ```yaml 925 | name: collect-movie-feedback 926 | taskRef: openmoviedb.provide-movie-feedback:1.0.2 927 | input: ${ .inputData.movieToRate } 928 | peopleAssignments: 929 | potentialOwners: 930 | - user: 931 | id: 69 932 | name: Patrice Janssens 933 | ``` 934 | 935 | ### Notification Definitions 936 | 937 | #### Description 938 | 939 | Represents the definition of a notification, which is use to communicate the status of the task to users. 940 | 941 | #### Properties 942 | 943 | | Name | Type | Required | Runtime
Expression | Description | 944 | |------|:----:|:--------:|:---------------------:|-------------| 945 | | name | `string` | `yes` | `no` | The notification's name.
*Must be lowercase and only contain alphanumeric characters, with the exceptions of the `-` character.* | 946 | | views | [`viewDefinition[]`](#view-definitions) | `yes` | `yes` | Configures the notification's views.
*Must contain at least one [`view definition`](#view-definitions).* | 947 | | input | `string`
`object` | `no` | `yes` | If a `string`, is a [runtime expression](#runtime-expression) used to build the notification's input data based on the human task's data.
If an `object`, represents the input data of the notification to produce. [runtime expression](#runtime-expression)s can be used in any and all properties, at whichever depth. 948 | | recipients | [`peopleAssignmentDefinition[]`](#people-assignment-definition) | `no` | `no` | An array that contains the notification's recipients.
*If set, must contain at least one [recipient](#people-assignment-definition).* 949 | 950 | #### Examples 951 | 952 | *An example of such a notification would be a reminder to execute a start, which can be defined as follows:* 953 | 954 | ```yaml 955 | ... 956 | notifications: 957 | - name: execute-task-reminder 958 | view: openbank.loan-management.notifications.task-reminder:1.0.0 959 | input: '${ .input }' 960 | recipients: 961 | - user: alan 962 | ... 963 | ``` 964 | 965 | *An example of a notification using an inline view definition:* 966 | 967 | ```yaml 968 | ... 969 | notifications: 970 | - name: inline-execute-task-reminder 971 | view: 972 | type: md 973 | template: 'You have been assigned [a task](${ .context.task.uri }) that has not yet been performed.
Please address it as soon as possible.' 974 | ... 975 | ``` 976 | 977 | ### Reassignment Definitions 978 | 979 | #### Description 980 | 981 | Configures a task reassignment. 982 | 983 | #### Properties 984 | 985 | | Name | Type | Required | Runtime
Expression | Description | 986 | |------|:----:|:--------:|:---------------------:|-------------| 987 | | to | `peopleSelectorDefinition` | `no` | `no` | Configures the people to reassign the task to. 988 | 989 | #### Examples 990 | 991 | ```yaml 992 | ... 993 | reassign: 994 | to: 995 | user: alan 996 | ... 997 | ``` 998 | 999 | ### Deadline Definitions 1000 | 1001 | #### Description 1002 | 1003 | Represents the definition of a deadline to reach a given human task status milestone. 1004 | 1005 | #### Properties 1006 | 1007 | | Name | Type | Required | Runtime
Expression | Description | 1008 | |------|:----:|:--------:|:---------------------:|-------------| 1009 | | name | `string` | `yes` | `no` | The name of the deadline.
*Must be lowercase and only contain alphanumeric characters, with the exceptions of the `-` character.* | 1010 | | type | `enum` | `yes` | `no` | The deadline type.
*Possibles values are: `start` and `completion`* | 1011 | | elapsesAt | `dateTimeOffset` | `depends` | `no` | The **ISO 8601** date and time at which the deadline elaspes and potentially triggers escalations.
*Required if `duration` has not been set.* | 1012 | | elapsesAfter | `string` | `depends` | `no` | The **ISO 8601** duration after which the deadline elapses and potentially triggers escalations.
*Required if `until` has not been set.* | 1013 | | escalations | [`escalationDefinition[]`](#escalation-definition) | `yes` | `no` | An array containing the escalations that may be performed when the deadline has been reached.
Must contain at least one escalation definition. | 1014 | 1015 | #### Examples 1016 | 1017 | *For example, one might want to send a reminder notification if an important task has not started before 30 minutes.* 1018 | 1019 | *The following sample demonstrates a deadline to achieve this:* 1020 | 1021 | ```yaml 1022 | ... 1023 | deadlines: 1024 | - name: start-before-30m 1025 | type: start 1026 | duration: PT30M 1027 | escalations: 1028 | - name: reminder 1029 | action: 1030 | notification: 1031 | refName: please-resolve-urgently 1032 | ... 1033 | ``` 1034 | 1035 | ### Escalation Definitions 1036 | 1037 | #### Description 1038 | 1039 | Represents the definition of an escalation that occurs if the human task has not reached a given status before a specific date and time, or before a given amount of time. 1040 | 1041 | #### Properties 1042 | 1043 | | Name | Type | Required | Runtime
Expression | Description | 1044 | |------|:----:|:--------:|:---------------------:|-------------| 1045 | | name | `string` | `yes` | `no` | The name of the escalation.
*Must be lowercase and only contain alphanumeric characters, with the exceptions of the `-` character.* | 1046 | | condition | `string` | `no` | `yes` | A [runtime expression](#runtime-expression) that determines whether or not the deadline applies. 1047 | | action | `escalationActionDefinition` | `yes` | `no` | Configures the [`escalation action`](#escalation-action-definition) to perform | 1048 | 1049 | #### Examples 1050 | 1051 | *Example of an escalation that reassigns the task to Alan if the the task's amount is higher than 10,000.00:* 1052 | 1053 | ```yaml 1054 | ... 1055 | deadlines: 1056 | - name: start-before-30m 1057 | type: start 1058 | duration: PT30M 1059 | escalations: 1060 | - name: reassign-to-alan 1061 | condition: '${ .input.value > 10000 }' 1062 | action: 1063 | reassign: 1064 | to: 1065 | user: alan 1066 | ... 1067 | ``` 1068 | 1069 | ### Escalation Action Definitions 1070 | 1071 | #### Description 1072 | 1073 | Represents the definition of the action undertaken as the result of an escalation. 1074 | 1075 | There are 3 different types of escalation actions: 1076 | 1077 | - [`notification`](#notification-definition): used to notify users about the status of the task. 1078 | - [`reassignment`](#reassignment-definition): used to reassign a task. 1079 | - [`subtask`](#subtask-definition): used to create a new subtask. 1080 | 1081 | #### Properties 1082 | 1083 | | Name | Type | Required | Runtime
Expression | Description | 1084 | |------|:----:|:--------:|:---------------------:|-------------| 1085 | | notification | [`notification`](#notification-definition) | `depends` | `no` | Configures the [`notification`](#notification-definition) to produce, in case `type` has been set to `notification`.
Required if `reassignment` and `subtask` have not been set, should otherwise be null. | 1086 | | reassignment | [`reassignment`](#reassignment-definition) | `depends` | `no` | Configures the [`reassignment`](#reassignment-definition) to perform, in case `type` has been set to `reassignment`.
Required if `notification` and `subtask` have not been set, should otherwise be null. | 1087 | | subTask | [`subtask`](#subtask-definition) | `depends` | `no` | Configures the [`subTask`](#subtask-definition) to create, in case `type` has been set to `subtask`.
Required if `notification` and `reassignment` have not been set, should otherwise be null. | 1088 | 1089 | ### Completion Behavior Definitions 1090 | 1091 | #### Description 1092 | 1093 | Defines the completion behavior of a task by configuring how to build the task's output based on specified conditions. 1094 | 1095 | Completion behavior may or may not define a `condition` [runtime expression](#runtime-expressions) used to determine whether or not the completion behavior applies. 1096 | 1097 | If no `condition` is defined, the [completion-behavior](#completion-behavior-definitions) is considered the task's default. There can be at most one default [completion-behavior](#completion-behavior-definitions) defined per task. 1098 | 1099 | #### Properties 1100 | 1101 | | Name | Type | Required | Runtime
Expression | Description | 1102 | |------|:----:|:--------:|:---------------------:|-------------| 1103 | | name | `string` | `yes` | `no` | The name of the completion behavior.
*Must be lowercase and only contain alphanumeric characters, with the exceptions of the `-` character.* | 1104 | | type | `enum` | `yes` | `no` | The completion behavior's type.
Possibles values are `automatic` and `manual`.
*If set to `automatic`, the task completes a soon as the `condition` matches.*
*If set the `manual`, the task must be explicitly completed by the actual owner whern the condition matches.*
*Defaults to `automatic`.* | 1105 | | condition | `string` | `no` | `yes` | A [runtime expression](#runtime-expressions) used to determine whether or not the completion behavior applies.
If null or whitespace, the completion behavior is considered the task's default. There must be at most one default [completion behavior](#completion-behavior-definitions). | 1106 | | output | `string`
`object` | `no` | `yes` | A `string` or `object` used to determine the task's output.
If a `string` , is a [runtime expression](#runtime-expressions) used to build the task's output data based on the human task's data.
If an `object`, represents the task's output data. [Runtime expression](#runtime-expressions) can be used in any and all properties, at whichever depth.
If not set, no input data is supplied to the [subtask](#human-task-definitions). | 1107 | 1108 | #### Examples 1109 | 1110 | *Example of a default and a conditional completion behaviors that set different task outputs:* 1111 | ```yaml 1112 | completionBehaviors: 1113 | - name: rated-behavior 1114 | type: automatic 1115 | condition: '${ $CONTEXT.form.data.rated }' 1116 | output: 1117 | movie: '${ $CONTEXT.inputData.movie }' 1118 | feedback: 1119 | seen: true 1120 | rating: '${ $CONTEXT.form.data.rating }' 1121 | - name: not-rated-behavior 1122 | type: automatic 1123 | output: 1124 | movie: '${ $CONTEXT.inputData.movie }' 1125 | feedback: 1126 | seen: '${ $CONTEXT.form.data.hasSeenMovie }' 1127 | comment: '${ $CONTEXT.form.data.comment }' 1128 | ``` 1129 | 1130 | ### Outcome Definitions 1131 | 1132 | #### Description 1133 | 1134 | Defines the outcome of a task. 1135 | 1136 | An outcome can be the task's `default` (fallback), by leaving the `condition` property unset or setting it to `null`. 1137 | 1138 | A `default` outcome will always apply if its the only declared outcome, or if no conditional outcome matched the context. 1139 | 1140 | #### Properties 1141 | 1142 | | Name | Type | Required | Runtime
Expression | Description | 1143 | |------|:----:|:--------:|:---------------------:|-------------| 1144 | | name | `string` | `yes` | `no` | The name of the outcome.
*Must be lowercase and only contain alphanumeric characters, with the exceptions of the `-` character.* | 1145 | | condition | `string` | `no` | `yes` | A [runtime expression](#runtime-expression) used to determine whether or not the outcome applies.
*If not set, makes the outcome the task's default.*
*There can be at most one default outcome.* | 1146 | | value | `string`
`object` | `yes` | `yes` | The outcome's localized values.
If a `string`, the culture-invariant outcome's value.
If an `object`, the mappings of localized values to their two-letter ISO 639-1 language names.*Must declare at least one language/value pair.* | 1147 | 1148 | #### Examples 1149 | 1150 | ```yaml 1151 | ... 1152 | outcomes: 1153 | - name: approved 1154 | condition: ${ $CONTEXT.form.data.approved } 1155 | value: 1156 | en: Document Approved 1157 | pt: Documento Approvado 1158 | - name: rejected 1159 | value: Rejected 1160 | ... 1161 | ``` 1162 | 1163 | ### Human Tasks 1164 | 1165 | #### Description 1166 | 1167 | Represents an instance of a [human task definition](#human-task-definitions). 1168 | 1169 | #### Properties 1170 | 1171 | | Name | Type | Required | Runtime
Expression | Description | 1172 | |------|:----:|:--------:|:---------------------:|-------------| 1173 | | id | `string` | `yes` | `no` | A string that globally and uniquely identifies the human task.
*MUST be lowercase and must only contain alphanumeric characters, with the exception of the `.` and `-` characters.
It is recommended for the id to be automatically generated by implementations, following the `{humanTaskDefinitionId}.{key}` format.* | 1174 | | key | `string` | `yes` | `no` | A string that uniquely identifies the human task amongst other instances of the same definition.
The `key` is a unique business identifier of the task, and should therefore ideally correspond to a relevant data in the task's context. For example, in an order review task, the key could be the id of the order to review.
Automatically generated by the [definition's](#human-task-definitions) `key` property, if any, or a magic string such as an UUID.
The generated key can be overriden when creating a new instance of an [human task definition's](#human-task-definitions), which can be used to correlate the task's cloud events in an async scenario.
*The key must be unique amongst instances of a specific human task definition.* | 1175 | | createdAt | `dateTimeOffset` | `yes` | `no` | The **ISO 8601** date and time at which the user task has been created | 1176 | | status | `enum` | `yes` | `no` | The status of the task.
Possibles values are `created`, `ready`, `reserved`, `inProgress`, `completed`, `obsolete` | 1177 | | peopleAssignments | [`peopleAssignment[]`](#people-assignments) | `yes` | `no` | The processed [people assignments definition](#people-assignments-definitions) containing the resolved users and their assignations. | 1178 | | inputData | `object` | `no` | `no` | The input data the task has been instanciated with. | 1179 | | form | [`form`](#form) | `yes` | `no` | The task's form. | 1180 | | attachments | [`attachment[]`](#attachments) | `no` | `no` | The task's attachments. | 1181 | | comments | [`comment[]`](#comments) | `no` | `no` | The task's comments. | 1182 | 1183 | #### Examples 1184 | 1185 | ```yaml 1186 | id: 'openbank.loan-management.loan-approval-request:1.0.5-1236547890' 1187 | key: 1236547890 1188 | createdAt: '2008-09-22T14:01:54.9571247Z+00:00' 1189 | status: created 1190 | peopleAssignments: 1191 | peopleAssignments: 1192 | potentialOwners: 1193 | - user: 1194 | id: 69 1195 | name: Alan Devito 1196 | - user: 1197 | id: 6969 1198 | name: Sheniqua Johnson 1199 | input: 1200 | client: 1201 | firstName: Karen 1202 | lastName: March 1203 | nationality: USA 1204 | dateOfBirth: 08/15/1985 1205 | request: 1206 | type: credit 1207 | creditType: installment 1208 | submittedAt: '2009-04-22T13:07:04.9185657Z+02:00' 1209 | amount: 120,000.00 1210 | currency: 1211 | code: USD 1212 | symbol: $ 1213 | motive: 1214 | other: Renovate pool house 1215 | broker: 1216 | type: in-house 1217 | identity: 1218 | id: 522 1219 | name: Jason Smith 1220 | form: 1221 | data: 1222 | requestReviewed: false 1223 | views: 1224 | - type: jsonform 1225 | status: rendered 1226 | template: ... 1227 | attachments: 1228 | - id: 2301 1229 | createdAt: '2009-04-22T13:07:04.9185657Z+02:00' 1230 | name: 1231 | contentType: application/pdf 1232 | uri: https://test.com/downloads/resources/2301/raw 1233 | author: 1234 | id: 522 1235 | name: Jason Smith 1236 | comments: 1237 | - id: 65487 1238 | createdAt: '2009-04-22T13:07:04.9185657Z+02:00' 1239 | author: 1240 | id: 522 1241 | name: Jason Smith 1242 | content: > 1243 | The client has a spotless record, and due diligence demonstrates that she has solid assets, and a substancial reserve of cash. 1244 | ``` 1245 | 1246 | ### People Assignments 1247 | 1248 | #### Description 1249 | 1250 | Represents a processed [people assignments definition](#people-assignments-definitions) containing the resolved users and their assignations. 1251 | 1252 | #### Properties 1253 | 1254 | | Name | Type | Required | Runtime
Expression | Description | 1255 | |------|:----:|:--------:|:---------------------:|-------------| 1256 | | initiator | [`userReference`](#user-references) | `yes` | `no` | A [user reference](#user-references) that describes the task's initiator | 1257 | | [potentialOwners](#potential-owners) | [`userReference[]`](#user-references) | `no` | `no` | The resolved [potential owners](#potential-owners) of the task. | 1258 | | initiator | [`userReference`](#user-references) | `yes` | `no` | A [user reference](#user-references) that describes the task's initiator | 1259 | | [excludedOwners](#excluded-owners) | [`userReference[]`](#user-references) | `no` | `no` | The resolved [excluded owners](#excluded-owners) of the task. | 1260 | | [potentialInitiators](#potential-task-initiators) | [`userReference[]`](#user-references) | `no` | `no` | The resolved [potential initiators](#potential-task-initiators) of the task. | 1261 | | actualOwner | [`userReference`](#user-references) | `no` | `no` | A [user reference](#user-references) that describes the actual owner of the task. | 1262 | | [stakeholders](#stakeholders) | [`userReference[]`](#user-references) | `no` | `no` | The resolved [stakeholders](#stakeholders) of the task. | 1263 | | [businessAdministrators](#businessAdministrators) | [`userReference[]`](#user-references) | `no` | `no` | The resolved [business administrators](#business-administrators) of the task. | 1264 | | [notificationRecipents](#notification-recipents) | [`userReference[]`](#user-references) | `no` | `no` | The resolved [recipients of all notifications](#notification-recipents) produced by the task. | 1265 | | groups | [`logicalPeopleGroup[]`](#logical-people-groups) | `no` | `no` | An array containing the resolved [`logical people groups`](#logical-people-groups) defined for the task's scope. | 1266 | 1267 | #### Examples 1268 | 1269 | ```yaml 1270 | ... 1271 | potentialOwners: 1272 | - id: 69 1273 | name: Dawn West 1274 | - id: 98 1275 | name: Elliot Van Dries 1276 | stakeholders: 1277 | - id: 2 1278 | name: Dick Remy 1279 | ... 1280 | ``` 1281 | 1282 | ### User References 1283 | 1284 | #### Description 1285 | 1286 | Represents a reference to an user. 1287 | 1288 | #### Properties 1289 | 1290 | | Name | Type | Required | Runtime
Expression | Description | 1291 | |------|:----:|:--------:|:---------------------:|-------------| 1292 | | id | `string` | `yes` | `no` | The user's unique identifier, as specified by its `sub` JWT claim type. | 1293 | | name | `string` | `no` | `no` | The user's name, as specified by its `preferred_username` JWT claim type. | 1294 | 1295 | #### Examples 1296 | 1297 | ```yaml 1298 | ... 1299 | id: 1234567890 1300 | name: John Smith 1301 | ... 1302 | ``` 1303 | 1304 | ### Task Definition References 1305 | 1306 | #### Description 1307 | 1308 | Represents a reference to a task definition. 1309 | 1310 | #### Properties 1311 | 1312 | | Name | Type | Required | Runtime
Expression | Description | 1313 | |------|:----:|:--------:|:---------------------:|-------------| 1314 | | name | `string` | `yes` | `yes` | The name of the referenced task definition.
*Must be lowercase and only contain alphanumeric characters, with the exceptions of the `-` character.*
*Supports [runtime expressions](#runtime-expressions).* | 1315 | | namespace | `string` | `yes` | `yes` | The namespace the referenced task definition belongs to.
*Must be lowercase and only contain alphanumeric characters, with the exceptions of the `-` and `.` characters.*
*Supports [runtime expressions](#runtime-expressions).* | 1316 | | version | `string` | `no` | `yes` | The [semantic version](https://semver.org/) of the human task definition.
*Defaults to `latest`.
*Supports [runtime expressions](#runtime-expressions).* | 1317 | 1318 | #### Examples 1319 | 1320 | ```yaml 1321 | ... 1322 | name: review-application 1323 | namespace: openbank.human-resources.jobs 1324 | version: 1.7.9 1325 | ... 1326 | ``` 1327 | 1328 | ### Logical People Groups 1329 | 1330 | #### Description 1331 | 1332 | Represents a reference to a logical people group. 1333 | 1334 | #### Properties 1335 | 1336 | | Name | Type | Required | Runtime
Expression | Description | 1337 | |------|:----:|:--------:|:---------------------:|-------------| 1338 | | name | `string` | `yes` | `no` | The name of the resolved logical user group.
*MUST be lowercase and must only contain alphanumeric characters, with the exception of the `-` character. | 1339 | | members | [`userReference[]`](#user-references) | `yes` | `no` | An array containing the resolved members of the group. | 1340 | 1341 | #### Examples 1342 | 1343 | ```yaml 1344 | ... 1345 | name: regional-clerks 1346 | members: 1347 | - id: 1234567890 1348 | name: John Smith 1349 | - id: 0987654321 1350 | name: Jane Doe 1351 | ... 1352 | ``` 1353 | 1354 | ### Forms 1355 | 1356 | #### Description 1357 | 1358 | Represents the instances of a [form definition](#form-definitions). 1359 | 1360 | #### Properties 1361 | 1362 | | Name | Type | Required | Runtime
Expression | Description | 1363 | |------|:----:|:--------:|:---------------------:|-------------| 1364 | | data | `object` | `no` | `no` | The task form's data. | 1365 | | views | [`view[]`](#views) | `yes` | `no` | All available views defined for the task's form.
*Must contain at least one [view](#views).* 1366 | 1367 | #### Examples 1368 | 1369 | ```yaml 1370 | form: 1371 | data: 1372 | requestReviewed: false 1373 | views: 1374 | - type: jsonform 1375 | status: rendered 1376 | template: ... 1377 | ``` 1378 | 1379 | ### Views 1380 | 1381 | #### Description 1382 | 1383 | Represents a [form](#forms)'s view. 1384 | 1385 | The view might have been processed and rendered before getting served, as indicated by the `status` property. Possible values are: 1386 | 1387 | - `processed`: The template has been processed by interpolating runtime expressions before being served to consumers. 1388 | - `rendered`: The template has been rendered before being served to consumers. 1389 | - `template`: The template has been served as is, and potentially needs to be processed and rendered. 1390 | 1391 | The `status` of a consumed view is defined by its [definition](#view-definitions)'s `renderingMode` property. 1392 | 1393 | #### Properties 1394 | 1395 | | Name | Type | Required | Runtime
Expression | Description | 1396 | |------|:----:|:--------:|:---------------------:|-------------| 1397 | | type | `string` | `yes` | `no` | The view type.
*Defaults to [`gfm`(GitHub Flavored Markdown)](https://github.github.com/gfm/).*
*Can be a [runtime expression](#runtime-expression).* | 1398 | | status | `enum` | `yes` | `no` | Indicates the view's status.
Possible values are: `processed`, `rendered` and `template`. | 1399 | | template | `string` | `yes` | `no` | The view template, possibly processed and/or rendered, depending on the specified `renderingMode`* | 1400 | 1401 | #### Examples 1402 | 1403 | ```yaml 1404 | form: 1405 | data: 1406 | requestReviewed: false 1407 | views: 1408 | - type: jsonform 1409 | status: processed 1410 | template: > 1411 | { 1412 | "type": "VerticalLayout", 1413 | "elements": [ 1414 | { 1415 | "type": "Label", 1416 | "text": "Review new client profile" 1417 | }, 1418 | { 1419 | "type": "Control", 1420 | "scope": "#/properties/client/properties/firstName" 1421 | }, 1422 | { 1423 | "type": "Control", 1424 | "scope": "#/properties/client/properties/lastName" 1425 | }, 1426 | { 1427 | "type": "Control", 1428 | "scope": "#/properties/client/properties/email" 1429 | }] 1430 | } 1431 | ``` 1432 | 1433 | ### Attachments 1434 | 1435 | #### Description 1436 | 1437 | Represents an human task's attachment, which is used to associate external files (such as an image, a pdf file, etc.) to the task. 1438 | 1439 | #### Properties 1440 | 1441 | | Name | Type | Required | Runtime
Expression | Description | 1442 | |------|:----:|:--------:|:---------------------:|-------------| 1443 | | id | `string` | `yes` | `no` | The attachment 's global and unique identifier. | 1444 | | createdAt | `dateTimeOffset` | `yes` | `no` | The date and time at which the attachment has been created. | 1445 | | name | `string` | `yes` | `no` | The attachment's file name.
*All file naming restrictions apply.* | 1446 | | contentType | `string` | `yes` | `no` | The attachment's MIME type (ex: `application/json`) | 1447 | | uri | `string` | `depends` | `no` | The attachment's download uri. | 1448 | | base64Content | `string` | `depends` | `no` | The [base64](https://en.wikipedia.org/wiki/Base64)-encoded content of the resource.
*Required if the `uri` property has not been set, otherwise ignored.*
*The use of inline resource if **strongly** discouradged, and one should instead use references to hosted resources (using the `uri` property).*| 1449 | | author | [`userReference`](#user-references) | `yes` | `no` | A [user reference](#user-references) used to describe the attachment's author. | 1450 | 1451 | #### Examples 1452 | 1453 | *Example of a PDF attachment:* 1454 | 1455 | ```yaml 1456 | ... 1457 | attachments: 1458 | - id: 0123456789 1459 | createdAt: '2009-04-22T13:07:04.9185657Z+02:00' 1460 | name: id-recto-verso.pdf 1461 | contentType: application/pdf 1462 | uri: /api/v1/resources/ 1463 | author: 1464 | id: 69 1465 | name: Axsel Joelson 1466 | ... 1467 | ``` 1468 | 1469 | ### Comments 1470 | 1471 | #### Description 1472 | 1473 | Represents a comment written in the context of a given business process (human task). 1474 | 1475 | #### Properties 1476 | 1477 | | Name | Type | Required | Runtime
Expression | Description | 1478 | |------|:----:|:--------:|:---------------------:|-------------| 1479 | | id | `string` | `yes` | `no` | The comment 's global and unique identifier. | 1480 | | createdAt | `dateTimeOffset` | `yes` | `no` | The date and time at which the comment has been created. | 1481 | | createdBy | [`userReference`](#user-references) | `yes` | `no` | A [user reference](#user-references) used to describe the user that has created the comment. | 1482 | | lastModified | `dateTimeOffset` | `yes` | `no` | The date and time at which the comment has last been modified. | 1483 | | lastModifiedBy | [`userReference`](#user-references) | `yes` | `no` | A [user reference](#user-references) used to describe the user that has last modified the comment. | 1484 | | content | `string` | `yes` | `no` | The comment's content.*Supports [GitHub Flavored Markdown (GFM)](https://github.github.com/gfm/).* | 1485 | 1486 | #### Examples 1487 | 1488 | *Example of a comment created by De'Andre and afterwards modified by Bing-Liu:* 1489 | 1490 | ```yaml 1491 | comments: 1492 | - id: 256 1493 | createdAt: '2009-04-22T13:07:04.9185657Z+02:00' 1494 | createdBy: 1495 | id: 69 1496 | name: De'Andre Smith 1497 | lastModified: '2009-04-22T15:22:06.2145330Z+02:00' 1498 | lastModifiedBy: 1499 | id: 71 1500 | name: Bing-Liu Chang 1501 | content: > 1502 | The service should be deployed at in the namespace `workflows` with the following environment variables configured: 1503 | - MONGO_CONNECTION_STRING 1504 | - EVENTSTORE_CONNECTION_STRING 1505 | - ZIPKIN_EXPORTER_ENDPOINT 1506 | ``` 1507 | --------------------------------------------------------------------------------