2 Replies Latest reply on Oct 5, 2005 8:27 AM by James Depoorter

    data on taskinstance level

    James Depoorter Novice

      On process level, it is possible to create variables to persist data for the workflow.
      It would be very handy to have this same functionality on taskinstances. We all like to compose, decompose, specialize, generalize, collect and go. Having all data on one top-level seems rather daunting. E.g. when getting open taskinstances for a specific actor, you immediately have the data handy. This is especially useful in data-entry environments.
      We have a lot of existing domain objects, and this way, we can make them workflow-aware, in both directions.
      Of course, the answer will be: "write your own taskinstance" (9.8). But this means that we could embark on an uncertain maintenance journey. It would be nicer if the jBpm comes with it already.
      And maybe it even makes sense to have it on any node. A node could save some in-out with its node.
      See workflow data patterns for argumentation.

      James

        • 1. Re: data on taskinstance level
          Susanta Newbie

          Hi James :
          Catach me if i am wrong .
          I have tried one of the following as
          i have screen1.jsp where i captured one taskinstance data and storing into a map and that map i am getting in usedefinedDecisonHandler .

          // in the engine
          
          complterTask(Map map,....)
          if(map!=null){
          processInstance.getContextInstance().createVariable("variable",map);
          processInstance.getContextInstance().setVariable("variable",map);
          log.info("map value in eng is : "+map);
          taskInstance.end();


          // in the DescionHandler we are retriving by this way
          ContextInstance context = executionContext.getContextInstance();
          Map map = (Map)context.getVariable("variable");
          String data1= (String)map.get("data1");


          I have just tryied this way to persist data for workflow.

          Any input will be highly appriciatable.


          Thanks,
          Susant Patnaik


          • 2. Re: data on taskinstance level
            James Depoorter Novice

            Then you have a serialized map in the DB, right?