Skip to main content

eBAIntegrationAPI

The eBAIntegrationAPI dll is located in the "Common" folder under the eBA installation directory. It is the dll used to run the queries prepared in the Integration Manager within the eBA project and to process the values returned as a result of the query in the form or flow parts of the project.

The eBAIntegrationAPI DLL i consists of the following namespace. All the classes that this namespace contains, the methods and properties of the classes are discussed in detail in this document.

##1.eBAIntegrationAPI

Contains the classes required to call the query to be run and to use the data returned as a result of the query in the code. It contains the following classes;

eBAIntegrationAPI

public class eBAIntegrationQuery

public class eBAIntegrationQueryParameters : System.Collections.Generic.Dictionary<string, string>

public class eBAIntegrationReader

public class eBAPagedIntegrationReader

public class eBAQueryResult

##1.1 eBAIntegrationQuery

Integration Manager is also defined in the Query class that is used to invoke the code.

Methods

public eBAIntegrationQuery(string connection, string query)

Creates a new object instance from the eBAIntegrationQuery class, passing the connection and query information as parameters

public System.Data.DataTable Execute(eBAPI.Connection.eBAConnection connection)

Returns the query result defined by passing the Connection parameter as type DataTable

public eBAIntegrationAPI.eBAQueryResult Execute(eBAPI.Connection.eBAConnection connection, int topCount)

Returns the query result of type eBAQueryResult defined by passing the connection and topCount parameter

Features

public string Connection { get; set; }

The Connection value is

public eBAIntegrationAPI.eBAIntegrationQueryParameters Parameters { get; }

The value of the query parameters is

public string Query { get; set; }

The value is the query

##1.2 eBAIntegrationQueryParameters is the query parameters class.

Methods

public eBAIntegrationQueryParameters()

Creates a new object instance from the eBAIntegrationQueryParameters class

##1.3 eBAIntegrationReader

The class from which the data reading operation is performed.

Methods

public void Close()

Closes the reader object when the read operation is finished

public void Dispose()

closes the reader object connection and empties the object contents

public eBAIntegrationReader(eBAPI.Connection.eBAConnection connection, string connectionName, string queryName)

Creates a new object instance from the eBAIntegrationReader class

public bool IsAlive()

The state information is whether the reader object is closed or active

public bool Read()

The read status information is

public bool Read(int readCount)

Returns read status information with the readCount parameter

Features

public string Connection { get; }

The Connection value is

public System.Data.DataTable Data { get; }

The data is of type DataTable

public int DefaultReadCount { get; set; }

The default value is the number of reads

public bool HasMoreData { get; }

The status value is whether more data is available

public bool IsClosed { get; }

The status information is whether it is closed

public eBAIntegrationAPI.eBAIntegrationQueryParameters Parameters { get; }

The value of the query parameters is

public string Query { get; }

The value is the query

##1.4 eBAPagedIntegrationReader

The class from which the operation of reading paginated data is performed.

Methods

public void Close()

Closes the reader object when the read operation is finished

public void Dispose()

closes the reader object connection and empties the object contents

public eBAPagedIntegrationReader(eBAPI.Connection.eBAConnection connection, string connectionName, string queryName, int itemsPerPage, int cachedPageCount)

Creates a new object instance from the eBAPagedIntegrationReader class

public bool MoveNextPage()

The Move to next page status value is

public bool MoveNextPage(int pagesToForward)

The pageToForward parameter is the move status value to the next page given

public bool MovePreviousPage()

The status value is Move to previous page

public bool MovePreviousPage(int pagesToBackward)

The value of the move to the previous page given the pagesToBackward parameter

public void Open()

Opens the reader object

Features

public int CachedPageCount { get; }

The value is the number of pages that are cached

public string Connection { get; }

The Connection value is

public System.Data.DataTable CurrentPage { get; }

The current page value

public int CurrentPageCount { get; }

The value is the number of pages available

public int CurrentPageNumber { get; }

is the current page number value

public int ItemsPerPage { get; }

The element value is the per page

public string Query { get; }

The query information is

##1.5 eBAQueryResult

The query result class is.

Methods

public eBAQueryResult()

Creates a new object instance from the eBAQueryResult class

Features

public System.Data.DataTable Data { get; set; }

The data value is of type DataTable

public bool HasMoreData { get; set; }

The state information is whether there is more data

Example Usage:

In the flow code, assign people who return a query result to the Position Group object:

    %SystemPath%\Common\eBAPI.dll 

%SystemPath%\Common\eBAIntegrationAPI.dll

using System.Data;

using eBAPI;

using eBAPI.Connection;

using eBAIntegrationAPI;

public void FlowScript1_Execute()

{

eBAConnection Connection = CreateServerConnection();

Connection.Open();

Try

{

eBAIntegrationQuery qry = new eBAIntegrationQuery("EBA", "USERLOAD");

qry. Parameters.Add("DEPARTMENT", FlowStarter1.Department );

DataTable DT = qry. Execute(Connection);

if(dt. Rows.Count ```>```0)

{

foreach(DataRow dr in dt. Rows)

{

FlowGroup1.AddConstantUser(dr. ItemArray[0]. ToString());

}

}

else

{

If there is no one in the group, the idsi of who you want the flow to go to is written

FlowGroup1.AddConstantUser("admin");

}

}

catch (Exception ex)

{

throw ex;

}

finally

{

Connection.Close();

}

}