WebSphere MQ Workflow 3.4 Generic C API Test / Prototyping Tool

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

FmcjActivityInstanceVector - Example

* Process Model

* FDL

* Testcase

* Result
 

Process Model

[Artwork not shown]
 

FDL

/*
 *
 *  FDL definitions generated by MQSeries Workflow at 1998-12-07, 06:17:25.
 *
 */
CODEPAGE 1252 
FM_RELEASE V3R1 2 

/*
 *  STRUCTUREs
 */
UPDATE STRUCTURE 'Default Data Structure'
END 'Default Data Structure'

STRUCTURE 'SimpleDS'
  'm_long': LONG;
  'm_string': STRING;
  'm_float': FLOAT;
END 'SimpleDS'

STRUCTURE 'ComplexDS'
  'm1': LONG;
  'm2': LONG;
  'b1': BINARY;
  'm_simpleds': 'SimpleDS';
  'm_array_of_string': STRING(10);
  'm_array_of_long': LONG(1);
  'm_array_of_float': FLOAT(100);
END 'ComplexDS'

/*
 *  TOOL_SETs
 */
UPDATE TOOL_SET 'STANDARD'
  DEFAULT_PROCESS_ACTIVITY_ICON 'fmcbprca'
  DEFAULT_BLOCK_ACTIVITY_ICON 'fmcbblka'
  DEFAULT_BUNDLE_ACTIVITY_ICON 'fmcbbnda'
  DEFAULT_INFORMATION_ACTIVITY_ICON 'fmcbinfa'
  DEFAULT_PROGRAM_ACTIVITY_ICON 'fmcbprga'
END 'STANDARD'

/*
 *  PROCESS_CATEGORYs
 */
PROCESS_CATEGORY 'PM1'
  DOCUMENTATION 'PM1: Category for the process ''ProcessMonitor1'''
END 'PM1'


/*
 *  PROGRAMs
 */
PROGRAM 'ACTIMPL' ( 'ComplexDS', 'ComplexDS' ) 
  NO STRUCTURES_FROM_ACTIVITY
  NOT UNATTENDED 
  OS2 EXE PATH_AND_FILENAME 'fmctjcim.exe'
    STYLE VISIBLE 
  AIX EXE PATH_AND_FILENAME 'fmctjcim'
  WINNT EXE PATH_AND_FILENAME 'fmctjcim.exe'
    STYLE VISIBLE 
END 'ACTIMPL'

/*
 *  PERSONs
 */
UPDATE PERSON 'ADMIN'
  AUTHORIZED_FOR STAFF 
  AUTHORIZED_FOR AUTHORIZATION 
  AUTHORIZED_FOR OPERATION 
  AUTHORIZED_FOR TOPOLOGY 
  AUTHORIZED_FOR PROCESS_MODELING
  AUTHORIZED_FOR PROCESS_CATEGORY ALL AS_ADMINISTRATOR
  AUTHORIZED_FOR WORKITEMS_OF ALL 
  PASSWORD $$00F005FFFEF7F50A
  IS_NOT_ABSENT
  DO NOT RESET_ABSENT
  GROUP 'SYS_GRP'
  SYSTEM 'FMCSYS'
END 'ADMIN'

PERSON 'BOB'
  LAST_NAME 'Marley'
  FIRST_NAME 'Bob'
  AUTHORIZED_FOR PROCESS_CATEGORY 'PM1' AS_ADMINISTRATOR
  PASSWORD $$01FBFAF8FFF8F30C
  IS_NOT_ABSENT
  DO NOT RESET_ABSENT
  GROUP 'SYS_GRP'
  SYSTEM 'FMCSYS'
END 'BOB'

PERSON 'DAVE'
  LAST_NAME 'Gohl'
  FIRST_NAME 'Dave'
  AUTHORIZED_FOR PROCESS_CATEGORY 'PM1'
  PASSWORD $$03ED0EFBF4F70702
  IS_NOT_ABSENT
  DO NOT RESET_ABSENT
  GROUP 'SYS_GRP'
  SYSTEM 'FMCSYS'
END 'DAVE'

PERSON 'JIM'
  LAST_NAME 'Morrison'
  FIRST_NAME 'Jim'
  AUTHORIZED_FOR PROCESS_CATEGORY ALL 
  PASSWORD $$09F50500F903FB06
  IS_NOT_ABSENT
  DO NOT RESET_ABSENT
  GROUP 'SYS_GRP'
  SYSTEM 'FMCSYS'
END 'JIM'

/*
 *  ROLEs
 */
UPDATE ROLE 'System administrator'
  RELATED_PERSON 'ADMIN'
END 'System administrator'


/*
 *  PROCESSes
 */
/*
 *  PROCESS MonitorProcess1 
 */
PROCESS 'MonitorProcess1' ( 'ComplexDS', 'ComplexDS' ) 
  DESCRIPTION 'This is a simple process to test the monitor'
  DOCUMENTATION 'This is the documentation'
  CATEGORY 'PM1'
  DO NOT PROMPT_AT_PROCESS_START
  KEEP_PROCESSES FOREVER 
  KEEP_WORKITEMS FOREVER 
  RC_CREATION LAST 
  NOTIFICATION AFTER 60 SECONDS 
  PROCESS_ADMINISTRATOR 'ADMIN'
  WINDOW VIEW_REFERENCE_POINT XPOS -16 YPOS 116 
  WINDOW SHOW ALL CONNECTORS 
  WINDOW SHOW ALL CONDITIONS 
  SOURCE 1 XPOS -600 YPOS 500 
  BLOCK 'BlockActAPI04' ( 'ComplexDS', 'ComplexDS' ) 
    DESCRIPTION 'This is the 04 activity contained in the instance (BlockActAPI04)'
    DOCUMENTATION 'It is an activity of kind block'
    START WHEN AT_LEAST_ONE CONNECTOR TRUE 
    LAYOUT XPOS 500 YPOS -100
    WINDOW VIEW_REFERENCE_POINT XPOS -1 YPOS 98 
    WINDOW SHOW ALL CONNECTORS 
    WINDOW SHOW NO CONDITIONS 
    PROGRAM_ACTIVITY 'ProgActOfBlock04' ( 'ComplexDS', 'ComplexDS' ) 
      START MANUAL WHEN AT_LEAST_ONE CONNECTOR TRUE 
      EXIT AUTOMATIC 
      LAYOUT XPOS 100 YPOS 600 
      PROGRAM 'ACTIMPL'
    END 'ProgActOfBlock04'
    BLOCK 'BlockAct0401' ( 'ComplexDS', 'ComplexDS' ) 
      DESCRIPTION 'This is the 01 activity contained in the block 04'
      DOCUMENTATION 'It is an activity of kind block'
      START WHEN AT_LEAST_ONE CONNECTOR TRUE 
      LAYOUT XPOS -400 YPOS 600 
      WINDOW VIEW_REFERENCE_POINT XPOS -1 YPOS 26 
      WINDOW SHOW ALL CONNECTORS 
      WINDOW SHOW NO CONDITIONS 
      PROGRAM_ACTIVITY 'ProgActOfBlock0401' ( 'ComplexDS', 'ComplexDS' ) 
        START MANUAL WHEN AT_LEAST_ONE CONNECTOR TRUE 
        EXIT AUTOMATIC 
        LAYOUT XPOS 0 YPOS 0 
        PROGRAM 'ACTIMPL'
      END 'ProgActOfBlock0401'
    END 'BlockAct0401'
    BLOCK 'BlockAct0402' ( 'ComplexDS', 'ComplexDS' ) 
      DESCRIPTION 'This is the 02 activity contained in the block 04'
      DOCUMENTATION 'It is an activity of kind block'
      START WHEN AT_LEAST_ONE CONNECTOR TRUE 
      LAYOUT XPOS -800 YPOS 600 
      WINDOW VIEW_REFERENCE_POINT XPOS -1 YPOS 26 
      WINDOW SHOW ALL CONNECTORS 
      WINDOW SHOW NO CONDITIONS 
      PROGRAM_ACTIVITY 'ProgActOfBlock0402' ( 'ComplexDS', 'ComplexDS' ) 
        START MANUAL WHEN AT_LEAST_ONE CONNECTOR TRUE 
        EXIT AUTOMATIC 
        LAYOUT XPOS 0 YPOS 0 
        PROGRAM 'ACTIMPL'
      END 'ProgActOfBlock0402'
    END 'BlockAct0402'
  END 'BlockActAPI04'
  PROGRAM_ACTIVITY 'ProgActAPI01' ( 'ComplexDS', 'ComplexDS' ) 
    DESCRIPTION 'This is the 01 activity contained in the instance'
    DOCUMENTATION 'This is the documentation (ProgActAPI01)'
    INPUT_CONTAINER
      'm_array_of_long[0]' INITIAL_VALUE '999'
      'm_array_of_float[1]' INITIAL_VALUE '99.9'
      'm_array_of_string[1]' INITIAL_VALUE 'm_string value'
    START MANUAL WHEN AT_LEAST_ONE CONNECTOR TRUE 
    EXIT AUTOMATIC WHEN 'm1=1'
    LAYOUT XPOS -600 YPOS 200 
    NAME_POSITION XPOS -800 YPOS 225 
    PRIORITY 7 
    DONE_BY PERSON 'BOB' 'DAVE' 'JIM'
    NO SUBSTITUTION 
    PROGRAM 'ACTIMPL'
  END 'ProgActAPI01'
  PROGRAM_ACTIVITY 'ProgActAPI02' ( 'ComplexDS', 'ComplexDS' ) 
    DESCRIPTION 'This is the 02 activity contained in the instance'
    DOCUMENTATION 'This is the documentation 
of ProgActAPI02'
    START MANUAL WHEN AT_LEAST_ONE CONNECTOR TRUE 
    EXIT AUTOMATIC 
    LAYOUT XPOS 100 YPOS 200 
    PRIORITY DEFINED_IN INPUT_CONTAINER
    NOTIFICATION TO 'JIM' AFTER 30 SECONDS 
      SECOND_NOTIFICATION AFTER 30 SECONDS 
    DONE_BY PERSON 'BOB'
    PROGRAM 'ACTIMPL'
  END 'ProgActAPI02'
  PROCESS_ACTIVITY 'ProcActAPI03' ( 'ComplexDS', 'ComplexDS' ) 
    DESCRIPTION 'This is the 03 activity contained in the instance'
    DOCUMENTATION 'It is an activity of kind process (ProcActAPI03)'
    START AUTOMATIC WHEN AT_LEAST_ONE CONNECTOR TRUE 
    EXIT AUTOMATIC 
    LAYOUT XPOS 100 YPOS -100
    PRIORITY DEFINED_IN INPUT_CONTAINER
    DONE_BY PERSON 'BOB' 'JIM'
    PROCESS ' SomeSubProcess'
  END 'ProcActAPI03'
  CONTROL NAME 'From02To03'
    DESCRIPTION 'Desc of From02To03'
    FROM 'ProgActAPI02' TO 'ProcActAPI03'
    WHEN 'm1=1'
      XPOS -100 YPOS 25 
    LAYOUT 
      XPOS -200 YPOS 200 
      XPOS -200 YPOS -100
  CONTROL NAME 'From02To04'
    FROM 'ProgActAPI02' TO 'BlockActAPI04'
    OTHERWISE 
    LAYOUT 
      XPOS 500 YPOS 200 
  DATA 
    FROM SOURCE 1 TO 'ProgActAPI01'
    MAP 'm1' TO 'm1'
    MAP 'm2' TO 'm2'
    MAP 'm_array_of_string[0]' TO 'm_array_of_string[0]'
    MAP 'm_array_of_long[0]' TO 'm_array_of_long[0]'
    MAP 'm_array_of_float[0]' TO 'm_array_of_float[0]'
    MAP 'm_simpleds.m_long' TO 'm_simpleds.m_long'
    MAP 'm_simpleds.m_string' TO 'm_simpleds.m_string'
    MAP 'm_simpleds.m_float' TO 'm_simpleds.m_float'
END 'MonitorProcess1'

/*
 *  PROCESS SomeSubProcess 
 */
PROCESS 'SomeSubProcess' ( 'ComplexDS', 'ComplexDS' ) 
  DO NOT PROMPT_AT_PROCESS_START
  RC_CREATION LAST 
  WINDOW SHOW ALL CONNECTORS 
  WINDOW SHOW NO CONDITIONS 
  PROGRAM_ACTIVITY 'ProgSubAPI01' ( 'ComplexDS', 'ComplexDS' ) 
    START MANUAL WHEN AT_LEAST_ONE CONNECTOR TRUE 
    EXIT AUTOMATIC 
    PROGRAM 'ACTIMPL'
  END 'ProgSubAPI01'
END 'SomeSubProcess'
 

 

Testcase

/******************************************************************************
* Testcase:      pm_1.dat     ( FmcjActivityInstanceVector...() APIs )
* Prerequisites: ProcMon.fdl
******************************************************************************/

/*********************************************************
* logon 
**********************************************************/
FmcjGlobalConnect
  XpRc                              FMC_OK
End 

FmcjExecutionServiceAllocate 
  ExecutionServiceHdl               1 
  XpRc                              FMC_OK
End 

FmcjExecutionServiceLogon 
  ExecutionServiceHdl               1 
  UserId                            "ADMIN"
  Password                          "password"
  SessionMode                       Fmc_SM_Default
  AbsentIndicator                   Fmc_SA_NotSet
  XpRc                              FMC_OK
End 

/*********************************************************
* Retrieve process instance 
**********************************************************/
FmcjExecutionServiceQueryProcessInstances 
  ExecutionServiceHdl               1 
  Filter                            "NAME LIKE 'MonitorProcess1*'"
  SortCriteria                      NULL
  Threshold                         NULL 
  ProcessInstanceVectorHdl          1
  ShowAllObjectNames                TRUE
  XpRc                              FMC_OK
End 

FmcjProcessInstanceVectorSize 
  ProcessInstanceVectorHdl          1
  XpValue                           1 
End 

FmcjProcessInstanceVectorFirstElement 
  ProcessInstanceVectorHdl          1
  ProcessInstanceHdl                1
End 

FmcjProcessInstanceName 
  ProcessInstanceHdl                1
  BufferLength                      100
End 

FmcjResultObjectOfCurrentThread 
  ResultHdl                         1 
End 


/*********************************************************
* Obtain process instance monitor 
**********************************************************/

FmcjProcessInstanceObtainProcessMonitor
  ProcessInstanceHdl                1
  Deep                              FALSE
  InstanceMonitorHdl                1
  XpRc                              FMC_OK
End


/*********************************************************
* Query activity instances 
**********************************************************/
FmcjInstanceMonitorActivityInstances 
  InstanceMonitorHdl                1 
  ActivityInstanceVectorHdl         1 
  ShowAllObjectNames                TRUE
End 

FmcjActivityInstanceVectorSize 
  ActivityInstanceVectorHdl         1 
  XpValue                           4 
End 

/* ------------------------------------------------------*/

FmcjActivityInstanceVectorFirstElement 
  ActivityInstanceVectorHdl         1 
  ActivityInstanceHdl               1 
End 

FmcjActivityInstanceName 
  ActivityInstanceHdl               1 
  BufferLength                      33
  XpValue                           "BlockActAPI04"
End 

FmcjActivityInstanceVectorNextElement 
  ActivityInstanceVectorHdl         1 
  ActivityInstanceHdl               2 
End 

FmcjActivityInstanceName 
  ActivityInstanceHdl               2 
  BufferLength                      33
  XpValue                           "ProgActAPI01"
End 

FmcjActivityInstanceVectorNextElement 
  ActivityInstanceVectorHdl         1 
  ActivityInstanceHdl               3 
End 

FmcjActivityInstanceName 
  ActivityInstanceHdl               3 
  BufferLength                      33
  XpValue                           "ProgActAPI02"
End 

FmcjActivityInstanceVectorNextElement 
  ActivityInstanceVectorHdl         1 
  ActivityInstanceHdl               4 
End 

FmcjActivityInstanceName 
  ActivityInstanceHdl               4 
  BufferLength                      33
  XpValue                           "ProcActAPI03"
End 
          
FmcjActivityInstanceVectorNextElement 
  ActivityInstanceVectorHdl         1 
  ActivityInstanceHdl               5 
End 
        
FmcjResultRc 
  ResultHdl                         1 
  XpRc                              FMC_ERROR_NO_MORE_DATA
End 

FmcjResultMessageText 
  ResultHdl                         1 
  BufferLength                      1025
  XpValue                           "FMC00804E Incorrect read past the end of list
"
End 


FmcjActivityInstanceVectorDeallocate         
  ActivityInstanceVectorHdl         1 
  XpRc                              FMC_OK
End 

/*********************************************************
* logoff 
**********************************************************/
FmcjExecutionServiceLogoff 
  ExecutionServiceHdl               1 
  XpRc                              FMC_OK
End 

FmcjExecutionServiceDeallocate 
  ExecutionServiceHdl               1 
  XpRc                              FMC_OK
End 

FmcjGlobalDisconnect 
  XpRc                              FMC_OK
End
 

 
 
 
 

Result

C API Test Tool for MQSeries Workflow v330 Windows 9x/NT/2000: FMCTJCA1
Test case: PM_1.DAT
Mon Jul 23 12:04:54 2001
============================================================================
Command Line Arguments:
-i=pm_1.dat (TC)
-o=pm_1.log (Log)
-d
============================================================================
+++> 
============================================================================
FmcjGlobalConnect
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjExecutionServiceAllocate
parameter:  ExecutionServiceHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjExecutionServiceLogon
parameter:  ExecutionServiceHdl = 1
parameter:  UserID = ADMIN
parameter:  Password = password
parameter:  SessionMode = Fmc_SM_Default = 0
parameter:  AbsentIndicator = Fmc_SA_NotSet = 0
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjExecutionServiceQueryProcessInstances
parameter:  ExecutionServiceHdl = 1
parameter:  Filter = NAME LIKE 'MonitorProcess1*'
parameter:  SortCriteria = NULL
parameter:  Threshold = NULL
parameter:  ProcessInstanceVectorHdl = 1
..........Object Names Report...............................................
vector size = 1
0) MonitorProcess1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjProcessInstanceVectorSize
parameter:  ProcessInstanceVectorHdl = 1
..........Value Report......................................................
AcSize = 1
XpSize = 1
+++OK+++
============================================================================
FmcjProcessInstanceVectorFirstElement
parameter:  ProcessInstanceVectorHdl = 1
parameter:  ProcessInstanceHdl = 1
..........Status Report.....................................................
ProcessInstanceHdl = 0xbdd400
============================================================================
FmcjProcessInstanceName
parameter:  ProcessInstanceHdl = 1
parameter:  BufferLength = 100
..........Value Report......................................................
AcValue = "MonitorProcess1"
XpValue = Expected value missing
============================================================================
FmcjResultObjectOfCurrentThread
parameter:  ResultHdl = 1
..........Status Report.....................................................
ResultHdl = 0xbdcaf4
============================================================================
FmcjProcessInstanceObtainProcessMonitor
parameter:  ProcessInstanceHdl = 1
parameter:  Deep = FALSE
parameter:  InstanceMonitorHdl = 1
..........Status Report.....................................................
InstanceMonitorHdl = 0x1c21720
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjInstanceMonitorActivityInstances
parameter: InstanceMonitorHdl = 1
parameter:  ActivityInstanceVectorHdl = 1
..........Status Report.....................................................
ActivityInstanceVectorHdl = 0xbdceb0
..........Object Names Report...............................................
vector size = 4
0) BlockActAPI04
1) ProgActAPI01
2) ProgActAPI02
3) ProcActAPI03
============================================================================
FmcjActivityInstanceVectorSize
parameter:  ActivityInstanceVectorHdl = 1
..........Value Report......................................................
AcSize = 4
XpSize = 4
+++OK+++
============================================================================
FmcjActivityInstanceVectorFirstElement
parameter:  ActivityInstanceVectorHdl = 1
parameter:  ActivityInstanceHdl = 1
..........Status Report.....................................................
ActivityInstanceHdl = 0xbdd050
============================================================================
FmcjActivityInstanceName
parameter:  ActivityInstanceHdl = 1
parameter:  BufferLength = 33
..........Value Report......................................................
AcValue = "BlockActAPI04"
XpValue = "BlockActAPI04"
+++OK+++
============================================================================
FmcjActivityInstanceVectorNextElement
parameter:  ActivityInstanceVectorHdl = 1
parameter:  ActivityInstanceHdl = 2
..........Status Report.....................................................
ActivityInstanceHdl = 0xbdd000
============================================================================
FmcjActivityInstanceName
parameter:  ActivityInstanceHdl = 2
parameter:  BufferLength = 33
..........Value Report......................................................
AcValue = "ProgActAPI01"
XpValue = "ProgActAPI01"
+++OK+++
============================================================================
FmcjActivityInstanceVectorNextElement
parameter:  ActivityInstanceVectorHdl = 1
parameter:  ActivityInstanceHdl = 3
..........Status Report.....................................................
ActivityInstanceHdl = 0xbdd440
============================================================================
FmcjActivityInstanceName
parameter:  ActivityInstanceHdl = 3
parameter:  BufferLength = 33
..........Value Report......................................................
AcValue = "ProgActAPI02"
XpValue = "ProgActAPI02"
+++OK+++
============================================================================
FmcjActivityInstanceVectorNextElement
parameter:  ActivityInstanceVectorHdl = 1
parameter:  ActivityInstanceHdl = 4
..........Status Report.....................................................
ActivityInstanceHdl = 0xbdfcc0
============================================================================
FmcjActivityInstanceName
parameter:  ActivityInstanceHdl = 4
parameter:  BufferLength = 33
..........Value Report......................................................
AcValue = "ProcActAPI03"
XpValue = "ProcActAPI03"
+++OK+++
============================================================================
FmcjActivityInstanceVectorNextElement
parameter:  ActivityInstanceVectorHdl = 1
parameter:  ActivityInstanceHdl = 5
..........Status Report.....................................................
ActivityInstanceHdl = 0x0
============================================================================
FmcjResultRc
parameter:  ResultHdl = 1
..........RC Report.........................................................
AcRc = FMC_ERROR_NO_MORE_DATA = 804
XpRc = FMC_ERROR_NO_MORE_DATA
+++OK+++
============================================================================
FmcjResultMessageText
parameter:  ResultHdl = 1
parameter:  BufferLength = 1025
..........Value Report......................................................
AcValue = "FMC00804E Incorrect read past the end of list
"
XpValue = "FMC00804E Incorrect read past the end of list
"
+++OK+++
============================================================================
FmcjActivityInstanceVectorDeallocate
parameter:  ActivityInstanceVectorHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjExecutionServiceLogoff
parameter:  ExecutionServiceHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjExecutionServiceDeallocate
parameter:  ExecutionServiceHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjGlobalDisconnect
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjProcessInstanceVectorDeallocate( 1 ) ended with RC = 0
FmcjProcessInstanceDeallocate( 1 ) ended with RC = 0
FmcjActivityInstanceDeallocate( 1 ) ended with RC = 0
FmcjActivityInstanceDeallocate( 2 ) ended with RC = 0
FmcjActivityInstanceDeallocate( 3 ) ended with RC = 0
FmcjActivityInstanceDeallocate( 4 ) ended with RC = 0
FmcjInstanceMonitorDeallocate( 1 ) ended with RC = 0

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