3 Replies Latest reply on Aug 28, 2012 7:14 AM by Ashley Fernandes

    JBPM5.3 Result Mapping Issue + Getting Task Input Data

    Ashley Fernandes Newbie



      Problem 1




      Map<String, Object> params1 = new HashMap<String, Object>();

      PartyOnBoardingObjectJ partyOnBoardingObjectJ1 = new PartyOnBoardingObjectJ();

      partyOnBoardingObjectJ1.setStage("INTIATION COMPLETED");

      params1.put("partyOnBoardingObjectJ1", partyOnBoardingObjectJ1);

      taskService.completeWithResults(task.getId(), "john", params1);


      ubsequent to this , i assigned partyOnBoardingObjectJ1=temp

      temp is coming as null in a script task


      Problem 2

      how do i get the input payload (parameter mapping) of a Task? (via taskService APIs)

        • 1. Re: JBPM5.3 Result Mapping Issue + Getting Task Input Data
          Maciej Swiderski Master

          This is third post about the same thing, please do not duplicate questions as that certainly does not help others to answer your questions.

          • 2. Re: JBPM5.3 Result Mapping Issue + Getting Task Input Data
            Ashley Fernandes Newbie


                Have read the previous posts on this topic before i raised this issue.Please note , that i am passing everything as per the code mentioned in the JBPM User Docs & Previous Posts(on this topic).In one post the variables were in fact not even passed when the task was completed.The code i have posted has even as per the docs, Kindly give a construtive reply , if possible...thnx.Also pls note i do not want to use task client , and am using task service APIs directly, since i have quite complex flows which work on complex pojos..


            EDIT : Yes i have provided the parameter mappings etc...also the code is attached....just realised that a duplicate question on the same was uploaded by me(even thought i got a JIVE error when i uploaded the same)...sorry for the confusion.

            Thanks & Regards


            • 3. Re: JBPM5.3 Result Mapping Issue + Getting Task Input Data
              Ashley Fernandes Newbie

              Hi Guys,

                           Still stuck very badly with this have tried multiple ways

              1. With a simple string type instead of a java POJO.

              2. Tried with Human Task Persistence, (ON DB2)

              3. Tried using LocalTaskService with LocalTaskService

              4. Tried with complete() API  with ContentData using the latest ContentMarshallerContext

              5. Tried with taskService.completeWithResults() API passing params1 map as the object.


              Nothing worked so far.The Result variable is still getting printed as blank.


              My Requirement is pretty simple

              1. Persist Human Tasks data in DB2 (please check my attachment for the same ProcessTest.TestProcessClient())

              2. Map the output of one task to the input of the next task.

              3. Integrate my app with JBPM with Java APIs, i do not want to use MINA/Hornet etc just simple LocalTaskService would be fine.


              Added to this has a couple queries wrt Human Task

              I understand its a Service, and in case we need to write our own impl of Human task , we would require to create our own handler and register it.

              1. Whats the purpose of TaskServer? Do i need to write this for my requirements.

              2. Using any Task API can i get the parameters of a running task?

              3. Whats is the use of GenericHTWorkItemHandler, BlockingEventResponseHandler?



              Thanks & Regards