RcoDecisionBuffer

Structure of RcoDecisionBuffer basic object

{

                    Id                  //Control location id of external decisions.

                    TrigTime            //Trigger time

                    Dec_Qty             //Number of decisions in buffer

                    Error               //Error message returned, if error occurred during any

//operation on RcoDecisionBuffer fails.

}

Methods

Following methods are available to assign values in object members:

RcoDecisionBuffer.Id= Text  //Specifies Control location id

Following methods provide functionality to retrieve values from RcoDecisionBuffer Object:

Text                  = RcoDecisionBuffer. Id          //Specifies Control location id

Date                  = RcoDecisionBuffer .TrigTime    //Specifies trigger time

Integer               = RcoDecisionBuffer. Dec_Qty     //Specifies number of decisions in buffer

RcoExtDecision =   RcoDecisionBuffer .DecArray(I)        //Returns RcoExtDecision at index I

Text                  = RcoDecisionBuffer. Error       //Error message returned by Rco if any

               //operation on RcoDecisionBuffer fails.

Functions

Append

Delete

DeleteAt

Flush

GetDecisions

Insert

RequestDecisions

SelectNextDecision

Append

Appends a RcoExtDecision basic object in Decision buffer.

Syntax

RcoDecisionBuffer.id = text  //id of control location

Integer = RcoDecisionBuffer .Append(RcoExtDecision)

Return

RCO_SUCCESS    // = 1

RCO_WARNING    // = 0

RCO_FAILURE   //  = 2

 Note: If return value is RCO_FAILURE or RCO_WARNING, the Error member of RcoDecisionBuffer will show cause of the error.

Delete

Deletes a decision from the buffer by decision name. If two or more decisions with the same name exist, then the first duplicate decision is deleted.

Syntax

RcoDecisionBuffer.id = text //id of control location

Integer = RcoDecisionBuffer .Delete( Decision name /Text/)

Return

RCO_SUCCESS     // = 1

RCO_WARNING     // = 0

RCO_FAILURE     // = 2

 Note: If return value is RCO_FAILURE or RCO_WARNING, the Error member of RcoDecisionBuffer will show cause of the error.

DeleteAt

Deletes a decision from buffer at a particular index.

Syntax

RcoDecisionBuffer.id = text  //id of control location

Integer = RcoDecisionBuffer .DeleteAt( Index /Integer/)

Return

RCO_SUCCESS     // = 1

RCO_WARNING     // = 0

RCO_FAILURE     // = 2

 Note: If return value is RCO_FAILURE or RCO_WARNING, the Error member of RcoDecisionBuffer will show cause of the error.

Flush

Deletes all the decisions from decision buffer.

Syntax

RcoDecisionBuffer.id = text  //id of control location

Integer = RcoDecisionBuffer . Flush ()

Return

RCO_SUCCESS    // = 1

RCO_WARNING    // = 0

RCO_FAILURE    // = 2

 Note: If return value is RCO_FAILURE or RCO_WARNING, the Error member of RcoDecisionBuffer will show cause of the error.

GetDecisions

Gets the list of external decisions from RCO and stores them in order to populate itself with the data.

Syntax

RcoDecisionBuffer.id = text //id of control location

Integer = RcoDecisionBuffer . GetDecisions ()

Return

RCO_SUCCESS    // = 1

RCO_WARNING    // = 0

RCO_FAILURE    // = 2

 Note: If return value is RCO_FAILURE or RCO_WARNING, the Error member of RcoDecisionBuffer will show cause of the error.

Insert

Inserts an RcoExtDecision basic object at a particular index; if the index is more than size of buffer object, it is inserted at the tail. If the index is less than one, it is inserted at the first location.

Syntax

RcoDecisionBuffer.id = text //id of control location

Integer =  RcoDecisionBuffer .Insert(RcoExtDecision, Index /Integer/)

Return

RCO_SUCCESS     // = 1

RCO_WARNING     // = 0

RCO_FAILURE    //  = 2

 Note: If return value is RCO_FAILURE or RCO_WARNING, the Error member of RcoDecisionBuffer will show cause of the error.

RequestDecisions

Request a particular number of decisions from external process.

Syntax

RcoDecisionBuffer.id = text  //id of control location

Integer = RcoDecisionBuffer . RequestDecisions (project name/external process name /Text/, Decision

          attribute /Text/, Number of decisions /Integer/)

 Note: Project name and process name should be passed as single string separated by "/"; however, if the process belongs to the local project, the process name is sufficient.

Return

RCO_SUCCESS    // = 1

RCO_WARNING    // = 0

RCO_FAILURE    // = 2

 Note: If return value is RCO_FAILURE or RCO_WARNING, the Error member of RcoDecisionBuffer will show cause of the error.

SelectNextDecision

Selects a (first) decision from the decision buffer and executes when configured in RCOSite). If the decision is not configured in RCOSite, then it is not get executed and an error returns. Moreover, calling this function will also remove the first decision from buffer, so next call will execute next decision. If there are no decisions left in buffer then it returns an error stating there are no decisions left. A RequestDecisions call is required to be called once decision buffer empties, to execute more decisions.

Syntax

RcoDecisionBuffer.id = text //id of control location

Integer = RcoDecisionBuffer . SelectNextDecision ()

Return

RCO_SUCCESS    // = 1

RCO_WARNING    // = 0

RCO_FAILURE    // = 2

 Note: If return value is RCO_FAILURE or RCO_WARNING, the Error member of RcoDecisionBuffer will show cause of the error.

More information

RcoExtDecision.