WebSphere MQ Workflow 3.4 Generic C API Test / Prototyping Tool

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

Dump and Copy Container Example

Testcase:
/* Example5 testcase */

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

FmcjExecutionServiceQueryProcessTemplates
  ExecutionServiceHdl               1
  Filter                            "NAME='ContainerProcess2'"
  SortCriteria                      NULL
  Threshold                         200
  ProcessTemplateVectorHdl          1
  ShowAllObjectNames                TRUE
  XpRc                              FMC_OK
End

FmcjProcessTemplateVectorFirstElement
  ProcessTemplateVectorHdl          1
  ProcessTemplateHdl                1
End

FmcjProcessTemplateInitialInContainer
  ProcessTemplateHdl                1
  ReadWriteContainerHdl             10
  XpRc                              FMC_OK
End

FmcjProcessTemplateCreateAndStartInstance
  ProcessTemplateHdl                1
  InstanceName                      "TestInstance"
  SystemGroup                       NULL
  System                            NULL
  ReadWriteContainerHdl             10
  KeepName                          FALSE
  ProcessInstanceHdl                1
  XpRc                              FMC_OK
End

FmcjExecutionServiceQueryWorkitems
  ExecutionServiceHdl               1
  SortCriteria                      NULL
  Filter                            NULL
  Threshold                         500
  WorkitemVectorHdl                 1
  ShowAllObjectNames                TRUE
  XpRc                              FMC_OK
End

FmcjWorkitemVectorFirstElement
  WorkitemVectorHdl                 1
  WorkitemHdl                       1
End

FmcjWorkitemInContainer
  WorkitemHdl                       1
  ReadOnlyContainerHdl              1
  XpRc                              FMC_OK
End

FmcjWorkitemOutContainer
  WorkitemHdl                       1
  ReadWriteContainerHdl             1
  XpRc                              FMC_OK
End

FmcjContainer_DUMP_ALL
  ReadOnlyContainerHdl              1
  IncludePredefinedDataStructures   TRUE
End

FmcjContainer_DUMP_ALL
  ReadWriteContainerHdl             1
  IncludePredefinedDataStructures   FALSE
End

FmcjWorkitemCheckOut
  WorkitemHdl                       1
  RequestedData                     Fmc_WS_AllDefinitions                                  
  Platform                          Fmc_DP_NotSet                                
  ProgramDataHdl                    1
  XpRc                              FMC_OK
End

FmcjContainer_COPY_IN_TO_OUT
  ReadOnlyContainerHdl              1
  ReadWriteContainerHdl             1
End

FmcjContainer_DUMP_ALL_2
  ReadWriteContainerHdl             1
  IncludePredefinedDataStructures   FALSE
End
/* dumps the complete data structure (including all values).
This algorithm dumps only the leaves, but with their full (dotted) name. */

FmcjWorkitemCheckIn
  WorkitemHdl                       1
  ReadWriteContainerHdl             1
  ReturnCode                        0
  XpRc                              FMC_OK
End

FmcjExecutionServiceLogoff
  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: EXAMPLE5.DAT
Tue Jul 10 12:35:43 2001
============================================================================
+++> 
============================================================================
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+++
============================================================================
FmcjExecutionServiceQueryProcessTemplates
parameter:  ExecutionServiceHdl = 1
parameter:  Filter = NAME='ContainerProcess2'
parameter:  SortCriteria = NULL
parameter:  Threshold = 200
parameter:  ProcessTemplateVectorHdl = 1
..........Object Names Report...............................................
vector size = 1
0) ContainerProcess2
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjProcessTemplateVectorFirstElement
parameter:  ProcessTemplateVectorHdl = 1
parameter:  ProcessTemplateHdl = 1
..........Status Report.....................................................
ProcessTemplateHdl = 0xbdd160
============================================================================
FmcjProcessTemplateInitialInContainer
parameter:  ProcessTemplateHdl = 1
parameter:  ReadWriteContainerHdl = 10
..........Status Report.....................................................
ReadWriteContainerHdl = 0x1c236c0
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjProcessTemplateCreateAndStartInstance
parameter:  ProcessTemplateHdl = 1
parameter:  InstanceName = TestInstance
parameter:  SystemGroup = NULL
parameter:  System = NULL
parameter:  ReadWriteContainerHdl = 10
parameter:  KeepName = FALSE
parameter:  ProcessInstanceHdl = 1
..........Status Report.....................................................
ProcessInstanceHdl = 0x1c21f30
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjExecutionServiceQueryWorkitems
parameter:  ExecutionServiceHdl = 1
parameter:  Filter = NULL
parameter:  SortCriteria = NULL
parameter:  Threshold = 500
parameter:  WorkitemVectorHdl = 1
..........Object Names Report...............................................
vector size = 1
0) Prog_A_ContainerTest2
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjWorkitemVectorFirstElement
parameter:  WorkitemVectorHdl = 1
parameter:  WorkitemHdl = 1
..........Status Report.....................................................
WorkitemHdl = 0x1c22350
============================================================================
FmcjWorkitemInContainer
parameter:  WorkitemHdl = 1
parameter:  ReadOnlyContainerHdl = 1
..........Status Report.....................................................
ReadOnlyContainerHdl = 0x1c27bd0
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjWorkitemOutContainer
parameter:  WorkitemHdl = 1
parameter:  ReadWriteContainerHdl = 1
..........Status Report.....................................................
ReadWriteContainerHdl = 0x1c26c40
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjContainer_DUMP_ALL
parameter:  ReadOnlyContainerHdl = 1
..........Value Report......................................................
--- begin of container-dump ------------------------------------------------
Fixed data members:
   _ACTIVITY      : STRING  =  Prog_A_ContainerTest2
   _RC            : LONG    =  The member _RC was not found.
   In an output container dump is this an error,
   for an input container is it OK.
   _PROCESS       : STRING  =  TestInstance
   _PROCESS_MODEL : STRING  =  ContainerProcess2
Process information data members:
   _PROCESS_INFO.Role : STRING                 =  (not set)
   _PROCESS_INFO.Organization : STRING         =  (not set)
   _PROCESS_INFO.ProcessAdministrator : STRING =  (not set)
   _PROCESS_INFO.Duration : LONG               =  (not set)
Activity information data members:
   _ACTIVITY_INFO.MembersOfRoles : STRING      =  (not set)
   _ACTIVITY_INFO.CoordinatorOfRole : STRING   =  (not set)
   _ACTIVITY_INFO.Organization : STRING        =  (not set)
   _ACTIVITY_INFO.OrganizationType : LONG      =  (not set)
   _ACTIVITY_INFO.LowerLevel : LONG            =  (not set)
   _ACTIVITY_INFO.UpperLevel : LONG            =  (not set)
   _ACTIVITY_INFO.People : STRING              =  (not set)
   _ACTIVITY_INFO.PersonToNotify : STRING      =  (not set)
   _ACTIVITY_INFO.Duration : LONG              =  (not set)
   _ACTIVITY_INFO.Duration2 : LONG             =  (not set)
   _ACTIVITY_INFO.Priority : LONG              =  (not set)
Container type : DsLevel1
   DsL1M1String : STRING = "Test string 1: ABC"
   DsL1M2Long : LONG = 999
   DsL1M3Float : FLOAT = 1.33399
   DsL1M3Binary : BINARY = (Length of binary data: 11 byte)
   AA 99 AA 99 AA 99 AA 99   AA 99 AA                   ª™ª™ª™ª™ª™ª
   DsL1M4AnotherDsL2 : STRUCT DsLevel2
      DsL2M1AnotherDsL3 : STRUCT DsLevel3
         DsL3M1String : STRING = "Test string 2: XYZ "
         DsL3M2Long : LONG = 131313
         DsL3M3Float : FLOAT = 7777.11111
         DsL3M3Binary : BINARY = (Length of binary data: 11 byte)
   AA 99 AA 99 AA 99 AA 99   AA 99 AA                   ª™ª™ª™ª™ª™ª
         DsL3M4StringArray : ARRAY[ ArraySize=4] OF STRING
            DsL3M4StringArray[0] : STRING = "String A1"
            DsL3M4StringArray[1] : STRING = "String B1"
            DsL3M4StringArray[2] : STRING = "String C1"
            DsL3M4StringArray[3] : STRING = "String D1"
         DsL3M5LongArray : ARRAY[ ArraySize=5] OF LONG
            DsL3M5LongArray[0] : LONG = 111
            DsL3M5LongArray[1] : LONG = 222
            DsL3M5LongArray[2] : LONG = 333
            DsL3M5LongArray[3] : LONG = 444
            DsL3M5LongArray[4] : LONG = 555
         DsL3M6FloatArray : ARRAY[ ArraySize=6] OF FLOAT
            DsL3M6FloatArray[0] : FLOAT = 1.11
            DsL3M6FloatArray[1] : FLOAT = 2.22
            DsL3M6FloatArray[2] : FLOAT = 3.33
            DsL3M6FloatArray[3] : FLOAT = 4.44
            DsL3M6FloatArray[4] : FLOAT = 5.55
            DsL3M6FloatArray[5] : FLOAT = 6.66
         DsL3M6BinaryArray : ARRAY[ ArraySize=2] OF BINARY
            DsL3M6BinaryArray[0] : BINARY = (Length of binary data: 16 byte)
   00 11 22 33 44 55 66 77   88 99 AA BB CC DD EE FF    .."3DUfwˆ™ª»ÌÝîÿ
            DsL3M6BinaryArray[1] : BINARY = (Length of binary data: 16 byte)
   FF EE DD CC BB AA 99 88   77 66 55 44 33 22 11 00    ÿîÝÌ»ª™ˆwfUD3"..
         DsL3M7AnotherDsL4 : ARRAY[ ArraySize=2] OF STRUCT DsLevel4
            DsL3M7AnotherDsL4[0] : STRUCT DsLevel4
               DsL4M1StringArray : ARRAY[ ArraySize=3] OF STRING
                  DsL4M1StringArray[0] : STRING = "AAAAA"
                  DsL4M1StringArray[1] : STRING = "BBBBB"
                  DsL4M1StringArray[2] : STRING = "CCCCC"
               DsL4M2Long : LONG = 100
               DsL4M3Float : FLOAT = 0.999
               DsL4M3Binary : BINARY = (Length of binary data: 11 byte)
   AA 99 AA 99 AA 99 AA 99   AA 99 AA                   ª™ª™ª™ª™ª™ª
            DsL3M7AnotherDsL4[1] : STRUCT DsLevel4
               DsL4M1StringArray : ARRAY[ ArraySize=3] OF STRING
                  DsL4M1StringArray[0] : STRING = "aaaaa"
                  DsL4M1StringArray[1] : STRING = "bbbbb"
                  DsL4M1StringArray[2] : STRING = "ccccc"
               DsL4M2Long : LONG = 200
               DsL4M3Float : FLOAT = 0.111
               DsL4M3Binary : BINARY = (Length of binary data: 11 byte)
   BB 99 BB 99 BB 99 BB 99   BB 99 BB                   »™»™»™»™»™»
--- end of container dump --------------------------------------------------
============================================================================
FmcjContainer_DUMP_ALL
parameter:  ReadWriteContainerHdl = 1
..........Value Report......................................................
--- begin of container-dump ------------------------------------------------
Container type : DsLevel1
   DsL1M1String : STRING =  (not set)
   DsL1M2Long : LONG =  (not set)
   DsL1M3Float : FLOAT =  (not set)
   DsL1M3Binary : BINARY =  (not set)
   DsL1M4AnotherDsL2 : STRUCT DsLevel2
      DsL2M1AnotherDsL3 : STRUCT DsLevel3
         DsL3M1String : STRING =  (not set)
         DsL3M2Long : LONG =  (not set)
         DsL3M3Float : FLOAT =  (not set)
         DsL3M3Binary : BINARY =  (not set)
         DsL3M4StringArray : ARRAY[ ArraySize=4] OF STRING
            DsL3M4StringArray[0] : STRING =  (not set)
            DsL3M4StringArray[1] : STRING =  (not set)
            DsL3M4StringArray[2] : STRING =  (not set)
            DsL3M4StringArray[3] : STRING =  (not set)
         DsL3M5LongArray : ARRAY[ ArraySize=5] OF LONG
            DsL3M5LongArray[0] : LONG =  (not set)
            DsL3M5LongArray[1] : LONG =  (not set)
            DsL3M5LongArray[2] : LONG =  (not set)
            DsL3M5LongArray[3] : LONG =  (not set)
            DsL3M5LongArray[4] : LONG =  (not set)
         DsL3M6FloatArray : ARRAY[ ArraySize=6] OF FLOAT
            DsL3M6FloatArray[0] : FLOAT =  (not set)
            DsL3M6FloatArray[1] : FLOAT =  (not set)
            DsL3M6FloatArray[2] : FLOAT =  (not set)
            DsL3M6FloatArray[3] : FLOAT =  (not set)
            DsL3M6FloatArray[4] : FLOAT =  (not set)
            DsL3M6FloatArray[5] : FLOAT =  (not set)
         DsL3M6BinaryArray : ARRAY[ ArraySize=2] OF BINARY
            DsL3M6BinaryArray[0] : BINARY =  (not set)
            DsL3M6BinaryArray[1] : BINARY =  (not set)
         DsL3M7AnotherDsL4 : ARRAY[ ArraySize=2] OF STRUCT DsLevel4
            DsL3M7AnotherDsL4[0] : STRUCT DsLevel4
               DsL4M1StringArray : ARRAY[ ArraySize=3] OF STRING
                  DsL4M1StringArray[0] : STRING =  (not set)
                  DsL4M1StringArray[1] : STRING =  (not set)
                  DsL4M1StringArray[2] : STRING =  (not set)
               DsL4M2Long : LONG =  (not set)
               DsL4M3Float : FLOAT =  (not set)
               DsL4M3Binary : BINARY =  (not set)
            DsL3M7AnotherDsL4[1] : STRUCT DsLevel4
               DsL4M1StringArray : ARRAY[ ArraySize=3] OF STRING
                  DsL4M1StringArray[0] : STRING =  (not set)
                  DsL4M1StringArray[1] : STRING =  (not set)

                  DsL4M1StringArray[2] : STRING =  (not set)
               DsL4M2Long : LONG =  (not set)
               DsL4M3Float : FLOAT =  (not set)
               DsL4M3Binary : BINARY =  (not set)
--- end of container dump --------------------------------------------------
============================================================================
FmcjWorkitemCheckOut
parameter:  WorkitemHdl = 1
parameter:  RequestedData = Fmc_WS_AllDefinitions = 4
parameter:  Platform = Fmc_DP_NotSet = 0
parameter:  ProgramDataHdl = 1
..........Status Report.....................................................
ProgramDataHdl = 0x1d0c030
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjContainer_COPY_IN_TO_OUT
parameter:  ReadOnlyContainerHdl = 1
parameter:  ReadWriteContainerHdl = 1
..........Value Report......................................................
--- begin of copy ----------------------------------------------------------
--- end of copy ------------------------------------------------------------
============================================================================
FmcjContainer_DUMP_ALL_2
parameter:  ReadWriteContainerHdl = 1
..........Value Report......................................................
--- begin of container-dump ------------------------------------------------
Container type : DsLevel1
DsL1M1String : STRING = "Test string 1: ABC"
DsL1M2Long : LONG = 999
DsL1M3Float : FLOAT = 1.33399
DsL1M3Binary : BINARY = (Length of binary data: 11 byte)
   AA 99 AA 99 AA 99 AA 99   AA 99 AA                   ª™ª™ª™ª™ª™ª
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M1String : STRING = "Test string 2: XYZ "
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M2Long : LONG = 131313
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M3Float : FLOAT = 7777.11111
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M3Binary : BINARY = (Length of binary data: 11 byte)
   AA 99 AA 99 AA 99 AA 99   AA 99 AA                   ª™ª™ª™ª™ª™ª
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M4StringArray[0] : STRING = "String A1"
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M4StringArray[1] : STRING = "String B1"
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M4StringArray[2] : STRING = "String C1"
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M4StringArray[3] : STRING = "String D1"
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M5LongArray[0] : LONG = 111
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M5LongArray[1] : LONG = 222
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M5LongArray[2] : LONG = 333
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M5LongArray[3] : LONG = 444
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M5LongArray[4] : LONG = 555
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M6FloatArray[0] : FLOAT = 1.11
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M6FloatArray[1] : FLOAT = 2.22
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M6FloatArray[2] : FLOAT = 3.33
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M6FloatArray[3] : FLOAT = 4.44
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M6FloatArray[4] : FLOAT = 5.55
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M6FloatArray[5] : FLOAT = 6.66
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M6BinaryArray[0] : BINARY = (Length of binary data: 16 byte)
   00 11 22 33 44 55 66 77   88 99 AA BB CC DD EE FF    .."3DUfwˆ™ª»ÌÝîÿ
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M6BinaryArray[1] : BINARY = (Length of binary data: 16 byte)
   FF EE DD CC BB AA 99 88   77 66 55 44 33 22 11 00    ÿîÝÌ»ª™ˆwfUD3"..
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[0].DsL4M1StringArray[0] : STRING = "AAAAA"
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[0].DsL4M1StringArray[1] : STRING = "BBBBB"
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[0].DsL4M1StringArray[2] : STRING = "CCCCC"
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[0].DsL4M2Long : LONG = 100
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[0].DsL4M3Float : FLOAT = 0.999
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[0].DsL4M3Binary : BINARY = (Length of binary data: 11 byte)
   AA 99 AA 99 AA 99 AA 99   AA 99 AA                   ª™ª™ª™ª™ª™ª
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[1].DsL4M1StringArray[0] : STRING = "aaaaa"
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[1].DsL4M1StringArray[1] : STRING = "bbbbb"
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[1].DsL4M1StringArray[2] : STRING = "ccccc"
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[1].DsL4M2Long : LONG = 200
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[1].DsL4M3Float : FLOAT = 0.111
DsL1M4AnotherDsL2.DsL2M1AnotherDsL3.DsL3M7AnotherDsL4[1].DsL4M3Binary : BINARY = (Length of binary data: 11 byte)
   BB 99 BB 99 BB 99 BB 99   BB 99 BB                   »™»™»™»™»™»
--- end of container dump --------------------------------------------------
============================================================================
FmcjWorkitemCheckIn
parameter:  WorkitemHdl = 1
parameter:  ReadWriteContainerHdl = 1
parameter:  ReturnCode = 0
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjExecutionServiceLogoff
parameter:  ExecutionServiceHdl = 1
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjGlobalDisconnect
..........RC Report.........................................................
AcRc = FMC_OK = 0
XpRc = FMC_OK
+++OK+++
============================================================================
FmcjProcessTemplateVectorDeallocate( 1 ) ended with RC = 0
FmcjProcessTemplateDeallocate( 1 ) ended with RC = 0
FmcjProcessInstanceDeallocate( 1 ) ended with RC = 0
FmcjWorkitemVectorDeallocate( 1 ) ended with RC = 0
FmcjReadWriteContainerDeallocate( 1 ) ended with RC = 0
FmcjReadWriteContainerDeallocate( 10 ) ended with RC = 0
FmcjReadOnlyContainerDeallocate( 1 ) ended with RC = 0
FmcjWorkitemDeallocate( 1 ) ended with RC = 0
FmcjProgramDataDeallocate( 1 ) ended with RC = 0
FmcjExecutionServiceDeallocate( 1 ) ended with RC = 0

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