3 Replies Latest reply on Mar 12, 2013 4:57 PM by Laurent Matheo

    Javadriver - Create Filter Broken?

    Curtis Gallant
      Share This:

      While exploring around with the driver.exe program, I was comparring the behaviors I was seeing with the source of the javadriver and noticed that they were not exacly the same (e.g. more descriptive strings in the javadriver then the C based driver).  This made me decide to use the javadriver instead (v8.1 by the way).  I tried to do something simple like creating a filter with a single push fields action with a single assignment but there is either a bug in the javadriver program or a behavior difference that makes them not compatible with eachother.

       

      Before anybody asks, this is purely for academic purposes which is why I haven't opened a bug with BMC yet unless I truly find this is a bug.  As I continue to get familiar with the BMC Java API, I use the source and behavior of the (java)driver program to see how to implement specific actions.  I am now looking at workflow creation which lead me to here.

       

      Quick example of creating a simple non-practicle filter with a push fields action using C Driver:

       

      Command: cf

      CREATE FILTER

      Filter name: CG:TESTFILTER

      Filter order (0 - 1000) (500):

      Workflow type (1):

      Number of schemas (1):

      Schema name 1: HPD:Help Desk

      Operations bit mask (0):

      Disable/Enable (0-1) (1):

      Qualifier Struct:

      None, And, Or, Not, Relop or From Field (0, 1, 2, 3, 4, 5) (0):

      Number of if actions (1):

      Action Struct:

         Notify, Message, Log, Fields, Process, Push, SQL, Goto Action, Call Guide, Exit Guide, Goto Guide Label, Service (1-12): 6

         Number of field/assign pairs (0): 1

      Server name (): @

      Schema name (): HPD:Help Desk

      Field, status history, currency field (1,4,6) (1):

      Field id (0): 7

      Qualifier Struct:

      None, And, Or, Not, Relop or From Field (0, 1, 2, 3, 4, 5) (0):

      No match action -- error, null, no action, submit (1-4) (2):

      Multi match action -- error, null, first, picklist, mod all, no action, submit (1-7) (4):

      Assign type:

         Value, Field, Process, Arith, Function, DDE, SQL, Filter API (1 - 8) (0): 2

      Server name (): @

      Schema name (): HPD:Help Desk

      Field, status history, currency field (1,4,6) (1):

      Field id (0): 7

      Qualifier Struct:

      None, And, Or, Not, Relop or From Field (0, 1, 2, 3, 4, 5) (0):

      No match action -- error, null, no action, submit (1-4) (2):

      Multi match action -- error, null, first, picklist, mod all, no action, submit (1-7) (4):

      Server name (): @

      Schema name (): HPD:Help Desk

      Number of else actions (0):

      Help Text:

      Owner:

      Change Diary:

      Number of Properties (0):

      ErrorFilter Options bitmask (0):

      Error Filter name:

      Object Modification Log Label ():

       

      ARCreateFilter  results

      ReturnCode:  OK

      Status List : 0 items

       

      Notice that it will correctly ask for both the field to push data into as well as the source for the data to be pushed.  All is good in this non-practical example.

       

      Now let's try and do the same thing in the JavaDriver...

       

      Command: cf

      CREATE FILTER

      Filter Name: CG:TESTFILTER

      Filter order (0-1000) (500):

      Number of Forms (0): 1

      Form(0): HPD:Help Desk

      Operation bit mask (0):

      Disable/Enable (0-1) (1):

      Qualifier Info:

      None, And, Or, Not, Relop or FromField (0, 1, 2, 3, 4, 5) (0):

      Number of actions for the filter (1): 1

      Filter Action Info:

         Notify, Message, Log, Fields, Process, Push, SQL, Goto Action, Call Guide, Exit Guide, Goto Guide Label(1-11): 6

         Server Name for Push Fields : @

         Form Name for the push fields : HPD:Help Desk

      No match action -- error, null, no action, submit (1-4) (2): 3

      Multi match action -- error, null, first, picklist, mod all, no action, submit (1-7) (4): 3

         Number of field/assign pairs (0): 1

      Field, status history, currency field (1, 4, 6) (1): 1

      Field id (0): 7

      Qualifier Info:

      None, And, Or, Not, Relop or FromField (0, 1, 2, 3, 4, 5) (0): 0

      Assign type:  None, Value, Field, Process, Arith, Function, DDE, SQL, Filter API(0 - 8): 2

      Field, status history, currency field (1, 4, 6) (1): 1

      Field id (0): 7

      Qualifier Info:

      None, And, Or, Not, Relop or FromField (0, 1, 2, 3, 4, 5) (0): 0

      Number of elses for the filter (0): 0

      Help Text ():

      Owner ():

      Change DiaryList ():

      Number of Properties (0):

      Error Handler Filter Options (0-1) (0):

      Error Handler Name:

      Object Modification Log Label ():

         Results

      ReturnCode:  ERROR

      Status List : 1 items

      Status Struct :

          Message type : ERROR

          Message number : 193

          Message:  One or more fields, or assignment items in the field or assignment list, encountered an error.

          Appended:   <NULL>

       

      Notice that for one, the prompts are different e.g. the Assign Type prompt starts at 0 instead of 1 like the C driver, and even though the same flow is followed from what I can tell, it only asks for the assignment field info, not the source which is why it errors out at the end because it only has one part of the PushFieldsInfo object populated.

       

      Can somebody verify this is not just me missing something obvious in the JavaDriver prompts?  I just want to be able to create a simple Filter with a Push Fields action to map a single field as a POC.  If somebody manages to work it through, could you provide a sample driver script for creating a filter with a push fields action or confirm the same behavior I'm seeing?

       

      Thanks.

        • 1. Re: Javadriver - Create Filter Broken?
          Laurent Matheo

          I made a couple of test and it seems indeed you can't map a field to a field in the push field action.

          If you set a value or process it's fine, but not a field...

          1 of 1 people found this helpful
          • 2. Re: Javadriver - Create Filter Broken?
            Curtis Gallant

            Hi Laurent,

             

            Thanks for poking at this, I guess it's just not properly/fully implemented in the Javadriver.  Which is probably not really an issue as it's not exacly a supported/critical component of anything but still it would be a better tool to learn from if BMC 'finished' it as it seems to be shaky in some areas like this.

             

            I was able to glen enough info from it to be able to complete my origional goal of creating a filter with a push fields action to another form by using the Java API only so I'm happy either way .

             

            I'll make a list of stuff I find regarding the JavaDriver and submit to BMC, might not go anywhere but you never know...

            • 3. Re: Javadriver - Create Filter Broken?
              Laurent Matheo

              That would definitely be interesting

              Even in the C driver there are some weird things, when he asks several times for qualification, form name and stuff...

               

              If I have some free time I'll give a try to the java source which in "/ARSystem/arserver/api/JavaDriver/"