WebSphere MQ Workflow 3.4 Generic C API Test / Prototyping Tool

[prev][next][parent][TOC]

Control Statement Example

Testcase (Loop and IF, Then, Else)
/* Example15C1Pre testcase (Control Statements in a activity implementation) */

FmcjGlobalConnect
  XpRc                              FMC_OK
End

FmcjContainerInContainer
  ReadOnlyContainerHdl              1
  XpRc                              FMC_OK
End

/* -------------------------------------- */
FmcjContainerAllLeaves
  ReadOnlyContainerHdl              1
  ContainerElementVectorHdl         1
End

FmcjContainerAllLeafCount
  ReadOnlyContainerHdl              1
End

FmcjContainerElementVectorSize
  ContainerElementVectorHdl         1
End

FmcjContainerElementVectorFirstElement
  ContainerElementVectorHdl         1
  ContainerElementHdl               1
End


TestTool_LoopStart
  NoOfLoops                  LastRetrievedVectorSize
End

/* Note: If you use the keywords "LastRetrievedVectorSize"
         or "LastRetrievedVectorSizeMinus1"instead of a concrete number,
         then you have to invoke the tool macro "<className>Vector.size" before!
*/

   FmcjContainerElementFullName
     ContainerElementHdl               1
     BufferLength                      513
   End

   TestTool_If
     ExpressionOperator                AND
   End

      FmcjContainerElementType
        ContainerElementHdl               1
        BufferLength                      33
        XpValue                           "STRING"
      End

   TestTool_Then

      FmcjContainerStringLength
        ReadOnlyContainerHdl              1
        QualifiedName                     DEFAULT
      End


      FmcjContainerStringValue
        ReadOnlyContainerHdl              1
        QualifiedName                     DEFAULT
        BufferLength                      500
      End

   TestTool_Else

      TestTool_CommentToOutput
        Comment  "Members with ElementType ""LONG"", ""FLOAT"" or ""BINARY"" will be skipped"
      End

   TestTool_EndIf

   FmcjContainerElementDeallocate
     ContainerElementHdl               1
     XpRc                              FMC_OK
   End

   FmcjContainerElementVectorNextElement
     ContainerElementVectorHdl         1
     ContainerElementHdl               1
   End

TestTool_JumpToLoopStart

FmcjReadOnlyContainerDeallocate
  ReadOnlyContainerHdl              1
  XpRc                              FMC_OK
End

FmcjGlobalDisconnect
  XpRc                              FMC_OK
End
 

 
 

Result

C API Test Tool for MQ Workflow v31_347 Windows 95/NT: F:\FMCWINNT\BIN\FMCTJCA1.EXE
Test case: K:\FLE\EXAMPLE15C1PRE
Thu Jul 23 13:42:43 1998
============================================================================
+++>
============================================================================
FmcjGlobalConnect
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjContainerInContainer
parameter:  ReadOnlyContainerHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjContainerAllLeaves
parameter:  ReadOnlyContainerHdl = 1
parameter:  ContainerElementVectorHdl = 1
..........Status Report.....................................................
ContainerElementVectorHdl = 0x00C12900
============================================================================
FmcjContainerAllLeafCount
parameter:  ReadOnlyContainerHdl = 1
..........Value Report......................................................
AcValue = 52
XpValue = Expected value missing
============================================================================
FmcjContainerElementVectorSize
parameter:  ContainerElementVectorHdl = 1
..........Value Report......................................................
AcSize = 52
XpSize = Expected value missing
============================================================================
FmcjContainerElementVectorFirstElement
parameter:  ContainerElementVectorHdl = 1
parameter:  ContainerElementHdl = 1
..........Status Report.....................................................
ContainerElementHdl = 0x00C131D0
============================================================================
TestTool_LoopStart [planned: 52 (VectorSize)] [actual: 1]
============================================================================
FmcjContainerElementFullName
parameter:  ContainerElementHdl = 1
parameter:  BufferLength = 513
..........Value Report......................................................
AcValue = "_ACTIVITY"
XpValue = Expected value missing
============================================================================
TestTool_If
============================================================================
FmcjContainerElementType
parameter:  ContainerElementHdl = 1
parameter:  BufferLength = 33
..........Value Report......................................................
AcValue = "STRING"
XpValue = "STRING"
API expression is TRUE;  IF expression is TRUE
============================================================================
TestTool_Then
============================================================================
FmcjContainerStringLength
parameter:  ReadOnlyContainerHdl = 1
parameter:  QualifiedName = "_ACTIVITY"  (DEFAULT: last retrieved full name)
..........Value Report......................................................
AcValue = 29
XpValue = Expected value missing
============================================================================
FmcjContainerStringValue
parameter:  ReadOnlyContainerHdl = 1
parameter:  QualifiedName = "_ACTIVITY"  (DEFAULT: last retrieved full name)
parameter:  BufferLength = 500
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = Expected RC missing
..........Value Report......................................................
AcValue = "Prog_1_ContainerTest_DsLevel1"
XpValue = Expected value missing
============================================================================
TestTool_Else
============================================================================
TestTool_EndIf
============================================================================
FmcjContainerElementDeallocate
parameter:  ContainerElementHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjContainerElementVectorNextElement
parameter:  ContainerElementVectorHdl = 1
parameter:  ContainerElementHdl = 1
..........Status Report.....................................................
ContainerElementHdl = 0x00C13250
============================================================================
TestTool_JumpToLoopStart [status: jump]
============================================================================
TestTool_LoopStart [planned: 52 (VectorSize)] [actual: 2]
============================================================================
FmcjContainerElementFullName
parameter:  ContainerElementHdl = 1
parameter:  BufferLength = 513
..........Value Report......................................................
AcValue = "_ACTIVITY_INFO.CoordinatorOfRole"
XpValue = Expected value missing
============================================================================
TestTool_If
============================================================================
FmcjContainerElementType
parameter:  ContainerElementHdl = 1
parameter:  BufferLength = 33
..........Value Report......................................................
AcValue = "STRING"
XpValue = "STRING"
API expression is TRUE;  IF expression is TRUE
============================================================================
TestTool_Then
============================================================================
FmcjContainerStringLength
parameter:  ReadOnlyContainerHdl = 1
parameter:  QualifiedName = "_ACTIVITY_INFO.CoordinatorOfRole"  (DEFAULT: last retrieved full name)
..........Value Report......................................................
AcValue = 0
XpValue = Expected value missing
============================================================================
FmcjContainerStringValue
parameter:  ReadOnlyContainerHdl = 1
parameter:  QualifiedName = "_ACTIVITY_INFO.CoordinatorOfRole"  (DEFAULT: last retrieved full name)
parameter:  BufferLength = 500
..........RC Report.........................................................
AcRc = FMC_ERROR_MEMBER_NOT_SET = 113
XpRc = Expected RC missing
..........Value Report......................................................
AcValue = ""
XpValue = Expected value missing
============================================================================
TestTool_Else
============================================================================
TestTool_EndIf
============================================================================
FmcjContainerElementDeallocate
parameter:  ContainerElementHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================

...

============================================================================
FmcjContainerElementVectorNextElement
parameter:  ContainerElementVectorHdl = 1
parameter:  ContainerElementHdl = 1
..........Status Report.....................................................
ContainerElementHdl = 0x00C13200
============================================================================
TestTool_JumpToLoopStart [status: jump]
============================================================================
TestTool_LoopStart [planned: 52 (VectorSize)] [actual: 50]
============================================================================
FmcjContainerElementFullName
parameter:  ContainerElementHdl = 1
parameter:  BufferLength = 513
..........Value Report......................................................
AcValue = "DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[1].DsL4M1StringArray[2]"
XpValue = Expected value missing
============================================================================
TestTool_If
============================================================================
FmcjContainerElementType
parameter:  ContainerElementHdl = 1
parameter:  BufferLength = 33
..........Value Report......................................................
AcValue = "STRING"
XpValue = "STRING"
API expression is TRUE;  IF expression is TRUE
============================================================================
TestTool_Then
============================================================================
FmcjContainerStringLength
parameter:  ReadOnlyContainerHdl = 1
parameter:  QualifiedName = "DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[1].DsL4M1StringArray[2]"  (DEFAULT: last retrieved full name)
..........Value Report......................................................
AcValue = 5
XpValue = Expected value missing
============================================================================
FmcjContainerStringValue
parameter:  ReadOnlyContainerHdl = 1
parameter:  QualifiedName = "DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[1].DsL4M1StringArray[2]"  (DEFAULT: last retrieved full name)
parameter:  BufferLength = 500
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = Expected RC missing
..........Value Report......................................................
AcValue = "ccccc"
XpValue = Expected value missing
============================================================================
TestTool_Else
============================================================================
TestTool_EndIf
============================================================================
FmcjContainerElementDeallocate
parameter:  ContainerElementHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjContainerElementVectorNextElement
parameter:  ContainerElementVectorHdl = 1
parameter:  ContainerElementHdl = 1
..........Status Report.....................................................
ContainerElementHdl = 0x00C13250
============================================================================
TestTool_JumpToLoopStart [status: jump]
============================================================================
TestTool_LoopStart [planned: 52 (VectorSize)] [actual: 51]
============================================================================
FmcjContainerElementFullName
parameter:  ContainerElementHdl = 1
parameter:  BufferLength = 513
..........Value Report......................................................
AcValue = "DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[1].DsL4M2Long"
XpValue = Expected value missing
============================================================================
TestTool_If
============================================================================
FmcjContainerElementType
parameter:  ContainerElementHdl = 1
parameter:  BufferLength = 33
..........Value Report......................................................
AcValue = "LONG"
XpValue = "STRING"
API expression is FALSE;  IF expression is FALSE
============================================================================
TestTool_Then
============================================================================
TestTool_Else
============================================================================
TestTool_CommentToOutput
Members with ElementType "LONG", "FLOAT" or "BINARY" will be skipped
============================================================================
TestTool_EndIf
============================================================================
FmcjContainerElementDeallocate
parameter:  ContainerElementHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjContainerElementVectorNextElement
parameter:  ContainerElementVectorHdl = 1
parameter:  ContainerElementHdl = 1
..........Status Report.....................................................
ContainerElementHdl = 0x00C12ED0
============================================================================
TestTool_JumpToLoopStart [status: jump]
============================================================================
TestTool_LoopStart [planned: 52 (VectorSize)] [actual: 52]
============================================================================
FmcjContainerElementFullName
parameter:  ContainerElementHdl = 1
parameter:  BufferLength = 513
..........Value Report......................................................
AcValue = "DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[1].DsL4M3Float"
XpValue = Expected value missing
============================================================================
TestTool_If
============================================================================
FmcjContainerElementType
parameter:  ContainerElementHdl = 1
parameter:  BufferLength = 33
..........Value Report......................................................
AcValue = "FLOAT"
XpValue = "STRING"
API expression is FALSE;  IF expression is FALSE
============================================================================
TestTool_Then
============================================================================
TestTool_Else
============================================================================
TestTool_CommentToOutput
Members with ElementType "LONG", "FLOAT" or "BINARY" will be skipped
============================================================================
TestTool_EndIf
============================================================================
FmcjContainerElementDeallocate
parameter:  ContainerElementHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjContainerElementVectorNextElement
parameter:  ContainerElementVectorHdl = 1
parameter:  ContainerElementHdl = 1
..........Status Report.....................................................
ContainerElementHdl = 0x00000000
============================================================================
TestTool_JumpToLoopStart [status: end]
============================================================================
FmcjReadOnlyContainerDeallocate
parameter:  ReadOnlyContainerHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjGlobalDisconnect
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjContainerElementVectorDeallocate( 1 ) ended with RC = 0

Cleanup done by Test Tool
============================================================================
====== Test case ended normally ============================================