3 Replies Latest reply on Dec 14, 2012 5:27 AM by swiderski.maciej

    Access to process variable fields and properties

    spsingh

      I have a class that I pass as variable name 'A' to my process. This class has a property say x of type anotherClass and a public accessor getX(). I also have a custom workitem, I want to pass x as a workitem parameter using parameter mapping. I tried passing in A.x and A.getX() in parameter mapping. But I get "There is no ID/IDREF binding for IDREF" error during process load. What is the correct way of achieving this?

        • 1. Re: Access to process variable fields and properties
          spsingh

          Is this even possible with jbpm? I read the user guide multiple times but did not find a way to do this.

          • 2. Re: Access to process variable fields and properties
            jsvitak

            Can you provide more details? Business process definition, work item definition, work item handler code, whole error stacktrace?

             

            Have you declared your process variable at process level?

            • 3. Re: Access to process variable fields and properties
              swiderski.maciej

              you can achieve this with data input and data input association, following is an example of it for userTask

               

               

                   <userTask id="_4" name="User Task" >
                    <ioSpecification>
                      <dataInput id="_4_inputInput" name="input" />
                      <inputSet>
                        <dataInputRefs>_4_inputInput</dataInputRefs>
                      </inputSet>
                      <outputSet>
                      </outputSet>
                    </ioSpecification>
                    <dataInputAssociation>
                      <sourceRef>variable.getName()</sourceRef>
                      <targetRef>_4_inputInput</targetRef>
                    </dataInputAssociation>
                  </userTask>
              
              

               

              please note that variable must be declared as process variable on the process level.

               

              HTH