This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers
in repository https://gitbox.apache.org/repos/asf/camel.git

commit ffc65ec31eddc45ceca1f46aa1c4644a9619a59d
Author: Nicolas Filotto <[email protected]>
AuthorDate: Wed Mar 30 10:19:28 2022 +0200

    CAMEL-17792: Add doc about the message headers of camel-jbpm
---
 .../org/apache/camel/component/jbpm/jbpm.json      | 22 +++++++++
 .../camel-jbpm/src/main/docs/jbpm-component.adoc   | 55 ++--------------------
 .../apache/camel/component/jbpm/JBPMConstants.java | 31 ++++++++++++
 .../apache/camel/component/jbpm/JBPMEndpoint.java  |  2 +-
 4 files changed, 59 insertions(+), 51 deletions(-)

diff --git 
a/components/camel-jbpm/src/generated/resources/org/apache/camel/component/jbpm/jbpm.json
 
b/components/camel-jbpm/src/generated/resources/org/apache/camel/component/jbpm/jbpm.json
index 985a5b3..863fc95 100644
--- 
a/components/camel-jbpm/src/generated/resources/org/apache/camel/component/jbpm/jbpm.json
+++ 
b/components/camel-jbpm/src/generated/resources/org/apache/camel/component/jbpm/jbpm.json
@@ -26,6 +26,28 @@
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start 
Producer", "group": "producer", "label": "producer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Whether the producer 
should be started lazy (on the first message). By starting lazy you can use 
this to allow CamelContext and routes to startup in situations where a producer 
may otherwise fail during star [...]
     "autowiredEnabled": { "kind": "property", "displayName": "Autowired 
Enabled", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "description": "Whether autowiring is 
enabled. This is used for automatic autowiring options (the option must be 
marked as autowired) by looking up in the registry to find if there is a single 
instance of matching type, which t [...]
   },
+  "headers": {
+    "CamelJBPMValue": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "Object", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The value to assign to the global identifier" },
+    "CamelJBPMOperation": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "defaultValue": "PUT", "description": "The operation to perform. The 
operation name must be prefixed with\nCamelJBPMOperation and the name of the 
operation. See the full list\nabove. It is case-insensitive." },
+    "CamelJBPMProcessId": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The id of the process that should be acted upon" },
+    "CamelJBPMProcessInstanceId": { "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"Long", "deprecated": false, "deprecationNote": "", "autowired": false, 
"secret": false, "description": "The id of the process instance" },
+    "CamelJBPMParameters": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "Map<String, 
Object>", "deprecated": false, "deprecationNote": "", "autowired": false, 
"secret": false, "description": "The variables that should be set for various 
operations" },
+    "CamelJBPMEventType": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The type of event to use when signalEvent operation is 
performed" },
+    "CamelJBPMEvent": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "Object", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The type of the received event. Possible values defined 
here\norg.infinispan.notifications.cachelistener.event.Event.Type" },
+    "CamelJBPMMaxNumber": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "Integer", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The maximum number of rules that should be fired" },
+    "CamelJBPMIdentifier": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The global identifier" },
+    "CamelJBPMWorkItemId": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "Long", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The id of the work item" },
+    "CamelJBPMTaskId": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "Long", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The id of the task" },
+    "CamelJBPMTask": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": 
"org.kie.api.task.model.Task", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "description": "The task instance to use 
with task operations" },
+    "CamelJBPMUserId": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The userId to use with task operations" },
+    "CamelJBPMTargetUserId": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The targetUserId used when delegating a task" },
+    "CamelJBPMAttachmentId": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "Long", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The attachId to use when retrieving attachments" },
+    "CamelJBPMContentId": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "Long", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The contentId to use when retrieving attachments" },
+    "CamelJBPMEntityList": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "List<String>", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The potentialOwners when nominateTask operation is 
performed" },
+    "CamelJBPMStatusList": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "List<String>", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The list of status to use when filtering tasks." },
+    "CamelJBPMResultPage": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "Integer", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The page to use when retrieving user tasks" },
+    "CamelJBPMResultPageSize": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "Integer", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The page size to use when retrieving user tasks" }
+  },
   "properties": {
     "connectionURL": { "kind": "path", "displayName": "Connection URL", 
"group": "common", "label": "", "required": true, "type": "string", "javaType": 
"java.net.URL", "deprecated": false, "deprecationNote": "", "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.jbpm.JBPMConfiguration", "configurationField": 
"configuration", "description": "The URL to the jBPM server." },
     "eventListenerType": { "kind": "path", "displayName": "Event Listener 
Type", "group": "common", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.jbpm.JBPMConfiguration", "configurationField": 
"configuration", "description": "Sets the event listener type to attach to" },
diff --git a/components/camel-jbpm/src/main/docs/jbpm-component.adoc 
b/components/camel-jbpm/src/main/docs/jbpm-component.adoc
index 9484856..3cebc14 100644
--- a/components/camel-jbpm/src/main/docs/jbpm-component.adoc
+++ b/components/camel-jbpm/src/main/docs/jbpm-component.adoc
@@ -55,7 +55,7 @@ include::partial$component-endpoint-options.adoc[]
 jBPM Consumer allows to attach routes to
 
 * ProcessEventListeners
-* TaskEventListners
+* TaskEventListeners
 * CaseEventListeners
 
 === Path Parameters (3 parameters):
@@ -150,61 +150,16 @@ jBPM (KIE Server).
 ---------------------------------------------
 jbpm::hostName[:port][/resourceUri][?options]
 ---------------------------------------------
-
-== Message Headers
-
-[width="100%",cols="10%,10%,10%,70%",options="header",]
-|=======================================================================
-|Name |Default Value |Type |Description
-
-|CamelJBPMValue |null |Object |the value to assign to the global identifier
-
-|CamelJBPMOperation |PUT |String |The operation to perform. The operation name 
must be prefixed with
-CamelJBPMOperation and the name of the operation. See the full list
-above. It is case insensitive.
-
-|CamelJBPMProcessId |null |String |the id of the process that should be acted 
upon
-
-|CamelJBPMProcessInstanceId |0 |Long |the id of the process instance
-
-|CamelJBPMParameters |null |Map<String, Object> |the variables that should be 
set for various operations
-
-|CamelJBPMEventType |null |String |the type of event to use when signalEvent 
operation is performed
-
-|CamelJBPMEvent |null |String |The type of the received event. Possible values 
defined here
-org.infinispan.notifications.cachelistener.event.Event.Type
-
-|CamelJBPMMaxNumber |null |Integer |the maximum number of rules that should be 
fired
-
-|CamelJBPMIdentifier |null |long |identifier the global identifier
-
-|CamelJBPMWorkItemId |0 |Long |the id of the work item
-
-|CamelJBPMTaskId |0 |Long |the id of the task
-
-|CamelJBPMTask |null |Task |The task instance to use with task operations
-
-|CamelJBPMUserId |null |String |userId to use with task operations
-
-|CamelJBPMTargetUserId |null |String |The targetUserId used when delegating a 
task
-
-|CamelJBPMLanguage |null |String |The language to use when filtering user tasks
-
-|CamelJBPMAttachmentId |0 |Long |attachId to use when retrieving attachments
-
-|CamelJBPMContentId |0 |Long |contentId to use when retrieving attachments
-
-|CamelJBPMEntityList |null |List<String> |The potentialOwners when 
nominateTask operation is performed
-
-|CamelJBPMStatusList |null |List<String> |The list of status to use when 
filtering tasks
-|=======================================================================
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Example
 
 Below is an example route that starts a business process with id
 evaluation. To run this example you need jBPM to run locally, easiest is to 
use single zip 
 distribution - downloaded from jbpm.org. Next, start it and import Evaluation 
sample project, build and deploy.
-Once done this test can be ran out of the box.
+Once done this test can be run out of the box.
 
 [source,java]
 
----------------------------------------------------------------------------------------------
diff --git 
a/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMConstants.java
 
b/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMConstants.java
index a56da17..5661ece 100644
--- 
a/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMConstants.java
+++ 
b/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMConstants.java
@@ -16,26 +16,57 @@
  */
 package org.apache.camel.component.jbpm;
 
+import org.apache.camel.spi.Metadata;
+
 public interface JBPMConstants {
+    @Metadata(label = "producer", description = "The value to assign to the 
global identifier", javaType = "Object")
     String VALUE = "CamelJBPMValue";
+    @Metadata(label = "producer", description = "The operation to perform. The 
operation name must be prefixed with\n" +
+                                                "CamelJBPMOperation and the 
name of the operation. See the full list\n" +
+                                                "above. It is 
case-insensitive.",
+              javaType = "String", defaultValue = "PUT")
     String OPERATION = "CamelJBPMOperation";
+    @Metadata(label = "producer", description = "The id of the process that 
should be acted upon", javaType = "String")
     String PROCESS_ID = "CamelJBPMProcessId";
+    @Metadata(label = "producer", description = "The id of the process 
instance", javaType = "Long")
     String PROCESS_INSTANCE_ID = "CamelJBPMProcessInstanceId";
+    @Metadata(label = "producer", description = "The variables that should be 
set for various operations",
+              javaType = "Map<String, Object>")
     String PARAMETERS = "CamelJBPMParameters";
+    @Metadata(label = "producer", description = "The type of event to use when 
signalEvent operation is performed",
+              javaType = "String")
     String EVENT_TYPE = "CamelJBPMEventType";
+    @Metadata(label = "producer", description = "The type of the received 
event. Possible values defined here\n" +
+                                                
"org.infinispan.notifications.cachelistener.event.Event.Type",
+              javaType = "Object")
     String EVENT = "CamelJBPMEvent";
+    @Metadata(label = "producer", description = "The maximum number of rules 
that should be fired", javaType = "Integer")
     String MAX_NUMBER = "CamelJBPMMaxNumber";
+    @Metadata(label = "producer", description = "The global identifier", 
javaType = "String")
     String IDENTIFIER = "CamelJBPMIdentifier";
+    @Metadata(label = "producer", description = "The id of the work item", 
javaType = "Long")
     String WORK_ITEM_ID = "CamelJBPMWorkItemId";
+    @Metadata(label = "producer", description = "The id of the task", javaType 
= "Long")
     String TASK_ID = "CamelJBPMTaskId";
+    @Metadata(label = "producer", description = "The task instance to use with 
task operations",
+              javaType = "org.kie.api.task.model.Task")
     String TASK = "CamelJBPMTask";
+    @Metadata(label = "producer", description = "The userId to use with task 
operations", javaType = "String")
     String USER_ID = "CamelJBPMUserId";
+    @Metadata(label = "producer", description = "The targetUserId used when 
delegating a task", javaType = "String")
     String TARGET_USER_ID = "CamelJBPMTargetUserId";
+    @Metadata(label = "producer", description = "The attachId to use when 
retrieving attachments", javaType = "Long")
     String ATTACHMENT_ID = "CamelJBPMAttachmentId";
+    @Metadata(label = "producer", description = "The contentId to use when 
retrieving attachments", javaType = "Long")
     String CONTENT_ID = "CamelJBPMContentId";
+    @Metadata(label = "producer", description = "The potentialOwners when 
nominateTask operation is performed",
+              javaType = "List<String>")
     String ENTITY_LIST = "CamelJBPMEntityList";
+    @Metadata(label = "producer", description = "The list of status to use 
when filtering tasks.", javaType = "List<String>")
     String STATUS_LIST = "CamelJBPMStatusList";
+    @Metadata(label = "producer", description = "The page to use when 
retrieving user tasks", javaType = "Integer")
     String RESULT_PAGE = "CamelJBPMResultPage";
+    @Metadata(label = "producer", description = "The page size to use when 
retrieving user tasks", javaType = "Integer")
     String RESULT_PAGE_SIZE = "CamelJBPMResultPageSize";
 
     String JBPM_PROCESS_EVENT_LISTENER = "process";
diff --git 
a/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMEndpoint.java
 
b/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMEndpoint.java
index 1e12adf..4c07586 100644
--- 
a/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMEndpoint.java
+++ 
b/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMEndpoint.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
  * Interact with jBPM workflow engine over REST.
  */
 @UriEndpoint(firstVersion = "2.6.0", scheme = "jbpm", title = "JBPM", syntax = 
"jbpm:connectionURL",
-             category = { Category.API, Category.WORKFLOW })
+             category = { Category.API, Category.WORKFLOW }, headersClass = 
JBPMConstants.class)
 public class JBPMEndpoint extends DefaultEndpoint {
     private static final transient Logger LOGGER = 
LoggerFactory.getLogger(JBPMEndpoint.class);
 

Reply via email to