Qorus Integration Engine®  4.0.3.p1_git
QorusInterfaceTest::WaitForWfiid Class Reference

This class will wait for a workflow order to reach a final status (COMPLETE, ERROR, or CANCELED) More...

Inheritance diagram for QorusInterfaceTest::WaitForWfiid:
QorusInterfaceTest::Action

Public Member Methods

 constructor (softint wfiid, *AbstractTestResult expectedResult=new TestResultSuccess(), timeout timeout_ms=60s, QorusSystemRestHelper rest=qrest)
 create the object according to the arguments More...
 
 run (QorusInterfaceTest t)
 
- Public Member Methods inherited from QorusInterfaceTest::Action
 constructor ()
 creates the object
 

Private Member Methods

Mutex m_m ()
 event mutex
 
Condition m_cond ()
 event condition
 

Private Attributes

int m_wfiid
 the workflow_instanceid to check
 
date m_timeout
 the timeout
 
AbstractTestResult m_expectedResult
 Expected result of the run.
 
QorusSystemRestHelper m_rest
 REST connection.
 
const FinalStatuses
 final workflow statuses
 

Detailed Description

This class will wait for a workflow order to reach a final status (COMPLETE, ERROR, or CANCELED)

Member Function Documentation

◆ constructor()

QorusInterfaceTest::WaitForWfiid::constructor ( softint  wfiid,
*AbstractTestResult  expectedResult = new TestResultSuccess(),
timeout  timeout_ms = 60s,
QorusSystemRestHelper  rest = qrest 
)

create the object according to the arguments

Parameters
wfiidthe workflow order instance ID to wait for
expectedResultan AbstractTestResult object; the default value is TestResultSuccess which means that the test succeeds when the order status is COMPLETE
timeout_msthe timeout in milliseconds; if the order does not get a final status in this time period, then the test will fail
restthe REST connection object to the Qorus server

To pass if the order status is COMPLETE in the timeout given, then use TestResultSuccess (the default value) for the expectedResult parameter. To pass if the order status is ERROR in the timeout given, then use TestResultExceptionType for the expectedResult parameter to match the "WORKFLOW-ERROR" exception, which is thrown when the order gets an ERROR status within the timeout period To pass if the order status is CANCELED in the timeout given, then use TestResultExceptionType for the expectedResult parameter to match the "QORUS-WORKFLOW-TEST-EXCEPTION" exception, which is thrown when the order gets a CANCELED status within the timeout period

◆ run()

QorusInterfaceTest::WaitForWfiid::run ( QorusInterfaceTest  t)
virtual
Parameters
tQorusInterfaceTest test object

checks (and waits until) the given WFIID gets some "final" status

Implements QorusInterfaceTest::Action.


The documentation for this class was generated from the following file: