Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-7924

jBPM Documentation Enhancement 21.3.2.1. Creating a new work item handler

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Minor
    • None
    • 7.7.0.Final
    • Documentation
    • None
    • NEW
    • NEW

    Description

      The documentation around Custom Item Work Handlers referenced at the following url: https://docs.jboss.org/jbpm/release/7.7.0.Final/jbpm-docs/html_single/#_sec.workitemhandler.overview,
      does not include an example of actually obtaining a result from the WorkItemHandler. I stumbled across the solution on the web , particularly here : https://stackoverflow.com/questions/18951807/how-to-return-the-result-of-individual-work-item-handlers-after-their-completion.

      The nuance is that the 'results' object as defined by void org.kie.api.runtime.process.WorkItemManager.completeWorkItem(long id, Map<String, Object> results) is a Map<String, Object>. One would expect to bind the map itself to some process variable. However this is not the case. Apparently, you have to bind the keys in the map to a process variable to obtain the individual map elements in a process. This is not intuitive and the example in the documentation doesn't address the issue as that particular example returns null for 'results'. I'm not able to find any documentation that states this is the behavior.

      I'm recommending to either add a note in the documentation that discusses obtaining the result of a custom work item handler or a full example where there are actually results to return (and bind) to variables in the process.

      Attachments

        Activity

          People

            rhn-support-tsurdilo Tihomir Surdilovic (Inactive)
            rhn-gps-slibonat Steven Libonati (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: