Qorus Integration Engine®  4.0.3_git
com.qoretechnologies.qorus.test.QorusWorkflowTest Class Reference

base class for testing Qorus workflows More...

Inheritance diagram for com.qoretechnologies.qorus.test.QorusWorkflowTest:
com.qoretechnologies.qorus.test.QorusInterfaceTest org::qore::lang::qunit::Test org::qore::jni::QoreObjectWrapper com.qoretechnologies.qorus.test.QorusPassiveWorkflowTest

Public Member Methods

 QorusWorkflowTest (String name, String version) throws Throwable
 creates the object from the arguments More...
 
String getLogFileName () throws Throwable
 returns the log file name for the current object
 
boolean isInterfaceRunning () throws Throwable
 tests whether the current interface is running in the current Qorus instance More...
 
boolean canRun () throws Throwable
 checks if the interface can run
 
int getLastOrderId () throws Throwable
 finds the last workflow order instance created for this workflow
 
int createOrder (Map< String, Object > staticdata, Map< String, Object > create_opts) throws Throwable
 creates an order instance and returns the workflow_instanceid More...
 
int createOrder (Map< String, Object > staticdata) throws Throwable
 creates an order instance and returns the workflow_instanceid More...
 
HashMap< String, ObjectexecSynchronous (Map< String, Object > orderdata) throws Throwable
 creates and executes a synchronous workflow order and returns the hash data result More...
 
- Public Member Methods inherited from com.qoretechnologies.qorus.test.QorusInterfaceTest
 QorusInterfaceTest (QoreObject obj) throws Throwable
 creates the object based on the arguments
 
void globalSetUp () throws Throwable
 checks that the interface exists and executes a StarLog action
 
Object exec (Action data) throws Throwable
 executes the Action by calling its run() method and returns the object of Action (that allows to retrieve some particular information about the action later in the test script)
 
String getQorusInstanceName () throws Throwable
 tests whether some Qorus instance is running and returns its name More...
 
String getInstanceName () throws Throwable
 returns the Qorus instance name More...
 
String getDescription () throws Throwable
 returns a string describing the current interface being tested
 
ZonedDateTime getTimestamp () throws Throwable
 returns the test start timestamp
 
HashMap getInterfaceInfo () throws Throwable
 returns information about the interface from the REST API or NOTHING if the interface doesn't exist or the system is not responding on the HTTP interface
 
boolean isInterfaceLoaded () throws Throwable
 tests whether the current interface is loaded in the current Qorus instance More...
 
boolean isInterfaceRunning () throws Throwable
 tests whether the current interface is running in the current Qorus instance More...
 
HashMap getFunctionInfo (String name) throws Throwable
 returns the configuration (including source) for the named library function
 
HashMap getConstantInfo (String name) throws Throwable
 returns the configuration (including source) for the named library constant
 
HashMap getClassInfo (String name) throws Throwable
 returns the configuration (including source) for the named library class
 
void disable () throws Throwable
 disables the current interface
 
void enable () throws Throwable
 enables the current interface
 
abstract String getLogFileName () throws Throwable
 returns the log file name for the current object
 
abstract boolean canRun () throws Throwable
 checks if the interface can run
 

Static Public Member Methods

static HashMap< String, ObjecthierarchyInfo (int wfiid) throws Throwable
 returns a hash of workflow order instance information keyed by workflow_instanceid for all workflow orders in the hierarchy More...
 
static HashMap< String, ObjectstaticData (int wfiid) throws Throwable
 returns the static data hash of the given workflow order More...
 
static HashMap< String, ObjectdynamicData (int wfiid) throws Throwable
 returns the dynamic data hash of the given workflow order or NOTHING if no dynamic data exists for the workflow order More...
 
static HashMap< String, ObjectorderKeys (int wfiid) throws Throwable
 returns the order key hash for the given workflow order or NOTHING if no order keys have been set for the workflow order More...
 

Additional Inherited Members

- Private Member Methods inherited from com.qoretechnologies.qorus.test.QorusInterfaceTest
void setUserPassword () throws Throwable
 reimplement in child classes to allow the REST username & password for the Qorus server connection to be set before trying to communicate with the server More...
 

Detailed Description

base class for testing Qorus workflows

Constructor & Destructor Documentation

◆ QorusWorkflowTest()

com.qoretechnologies.qorus.test.QorusWorkflowTest.QorusWorkflowTest ( String  name,
String  version 
) throws Throwable
inline

creates the object from the arguments

Parameters
namethe workflow name
versionthe version of the workflow

Member Function Documentation

◆ createOrder() [1/2]

int com.qoretechnologies.qorus.test.QorusWorkflowTest.createOrder ( Map< String, Object staticdata,
Map< String, Object create_opts 
) throws Throwable
inline

creates an order instance and returns the workflow_instanceid

Parameters
staticdatathe static data hash for the order
create_optsother options to add to the order hash for the create order REST API, corresponding to the OMQ::UserApi::create_order() API params parameter (ex: orderkeys for order keys, etc)
Returns
the workflow_instanceid created

◆ createOrder() [2/2]

int com.qoretechnologies.qorus.test.QorusWorkflowTest.createOrder ( Map< String, Object staticdata) throws Throwable
inline

creates an order instance and returns the workflow_instanceid

Parameters
staticdatathe static data hash for the order
Returns
the workflow_instanceid created

◆ dynamicData()

static HashMap<String, Object> com.qoretechnologies.qorus.test.QorusWorkflowTest.dynamicData ( int  wfiid) throws Throwable
inlinestatic

returns the dynamic data hash of the given workflow order or NOTHING if no dynamic data exists for the workflow order

Parameters
wfiidthe workflow_instanceid of the workflow order to query

◆ execSynchronous()

HashMap<String, Object> com.qoretechnologies.qorus.test.QorusWorkflowTest.execSynchronous ( Map< String, Object orderdata) throws Throwable
inline

creates and executes a synchronous workflow order and returns the hash data result

Parameters
orderdataa hash with the following keys:
  • staticdata: (hash) the static workflow order data (required)
  • dynamicdata: (hash) the initial dynamic data for the workflow (optional)
  • options: (hash) a hash of option names and values; if any options are not valid for the workflow, then an exception is raised and the workflow execution instance is not started (optional)
  • priority: the order priority (default OMQ.DefaultOrderPriority), ignored while the order is processed synchronously; from 0 - 999; priority 0 is the highest; 999 is the lowest
  • orderkeys: order keys for the order
  • external_order_instanceid: the optional external order instanceid for the order
  • parent_workflow_instanceid: a loosely-coupled workflow that will be marked as the parent of this workflow order
Returns
a hash with the following keys:
  • workflow_instanceid: the workflow instance ID for the order created
  • status: the status of the workflow; see Workflow, Segment, and Step Status Descriptions for possible values
  • dynamicdata: the dynamic data of the workflow order instance

◆ hierarchyInfo()

static HashMap<String, Object> com.qoretechnologies.qorus.test.QorusWorkflowTest.hierarchyInfo ( int  wfiid) throws Throwable
inlinestatic

returns a hash of workflow order instance information keyed by workflow_instanceid for all workflow orders in the hierarchy

Parameters
wfiidthe workflow_instanceid of the workflow order to query

◆ isInterfaceRunning()

boolean com.qoretechnologies.qorus.test.QorusWorkflowTest.isInterfaceRunning ( ) throws Throwable
inline

tests whether the current interface is running in the current Qorus instance

Example:
boolean b = t.isInterfaceRunning();

◆ orderKeys()

static HashMap<String, Object> com.qoretechnologies.qorus.test.QorusWorkflowTest.orderKeys ( int  wfiid) throws Throwable
inlinestatic

returns the order key hash for the given workflow order or NOTHING if no order keys have been set for the workflow order

Parameters
wfiidthe workflow_instanceid of the workflow order to query

◆ staticData()

static HashMap<String, Object> com.qoretechnologies.qorus.test.QorusWorkflowTest.staticData ( int  wfiid) throws Throwable
inlinestatic

returns the static data hash of the given workflow order

Parameters
wfiidthe workflow_instanceid of the workflow order to query

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