Skip to main content

4. Encoding in the Flow Interface

In the streaming interface we can open the encoding editor by right-clicking on the stream and selecting View Server Code. We can also access the code of the corresponding event by double-clicking on the events of the flow and objects in the Code Navigator (Figure 2).

This section describes the properties, methods, and events of flow and flow objects with examples. The flow is from the "eBAFlowScrAdp.BaseFlowCode" class.

4.1. Flow

4.1.1. Properties

• CurrentEventFormId

Definition: The last event created in the flow is the id of the form. Type: System.Int32 Declaration: public int CurrentEventFormId { get; }

• CurrentReason

Definition: The most recently entered reason information from the reason definitions entered during any action. Type: System.String Declaration: public string CurrentReason { get; }

• eBaflow

Description: A property that holds the current values of the stream Type: eBAFlowScrAdp.BaseFlowCode Declaration: public eBAFlowScrAdp.BaseFlowCode ebaflow { get; }

• HideFlowStarter Definition: Used to show and hide the initiator of the stream in the stream history. When set to True, the user information that started the flow is hidden from the flow history with the * character. When set to False, the initiator's first and last name is written in the user info section. Type: System. Boolean Declaration: public bool HideFlowStarter { set; get; }

• HistoryCounter

Definition: The number of processes started so far for the process being processed. Type: System.Int32 Declaration: public int HistoryCounter { get; }

• id

Definition: The process number of the initiated process. A new number is assigned by the system for each process that is started.
Type: System.Int32 Declaration: public int id { get; }

• IsTest

Definition: Information about the mode in which the project runs. IsTest is in test mode if it is true, and it is in real mode if it is false. Type: System. Boolean Declaration: public bool IsTest { get; }

• LogonDelegated

Definition: A user with delegation privileges in an eBA can act on behalf of another user. With the LogonDelegated property, it can be determined that the user is acting with his own identity or by impersonating another user. Type: System. Boolean Declaration: public bool LogonDelegated { get; }

• LogonDelegatedUser

Definition: The user id (registration number) of the user who is transacting as a substitute for another user. Type: System.String Declaration: public string LogonDelegatedUser { get; }

• LogonDelegationPosition

Definition: The position id of the user who is trading in the place of another user. Type: System.String Declaration: public string LogonDelegationPosition { get; }

• LogonPosition

Definition: It is the position id information of the user who is logged in to the system. With this id information, the user who performs the operation in the process can be identified and user-specific scenarios can be applied. Type: System.String Declaration: public string LogonPosition { get; }

• LogonUser

Definition: It is the user id (registration number) information of the user who is logged in to the system Type: System.String Declaration: public string LogonUser { get; }

• LogonUserLanguage

Definition: It is the language information selected by the user who is logged in to the system. Type: System.String Declaration: public string LogonUserLanguage { get; }

• MultilanguageEnabled

Definition: It is the information whether the multilanguage feature of the process is activated or not. Type: System. Boolean Declaration: public virtual bool MultilanguageEnabled { get; }

• Process

Definition: Process name information.
Type: System.String Declaration: public string Process { get; }

• ProcessId

Description: Specifies the process number of the process that was initiated. Type: System.Int32 Declaration: public int ProcessId { get; }

• ProcessStatus

Description: Specifies the status information of the flow. Type: System.Int32 Declaration: public int ProcessStatus { get; }

Important Note The default value of Flow State is 1 (Start). In order for this value to change, when designing the flow, if the flow is desired to be in which step and in which state, the flow stop object should be used in those steps and the relevant state should be assigned. To check and determine what the value returned from the ProcessStatus property means verbally

  1. Right-click the flow form.
  2. Select Properties and click the statuses tab. From this section, you can check and customize the statuses.

• Project

Description: Specifies the name of the project. Type: System.String Declaration: public string Project { get; }

• ProjectVersion

Description: Specifies the version information for the project. Type: System.Int32 Declaration: public int ProjectVersion { get; }

Important Note Each change to a project is given a new version number for the project after it is compiled. In the eBA project, only flows work with versions. Forms, on the other hand, work as they were last compiled.

• SystemInstanceName

Definition: Specifies the instance information (TEST, PRODUCTION, etc.) of the system being worked on. Type: System.String Declaration: public string SystemInstanceName { get; }

• UserId

Definition: Specifies the id (registration number) of the user who is currently performing the operation on the process. Type: System.String Declaration: public string UserId { get; }

• UserLanguage

Definition: Specifies the language information selected by the user who is currently performing the operation on the process when logging in to the system. Type: System.String
Declaration: public string UserLanguage { get; }

4.1.2. Methods

• AddAttachment(string, string)

Definition: Position is used to add attachments to the mail sent for mail objects with mail feature, such as groups. Declaration: public void AddAttachment(string objectName, string filename) Parameters: objectName: Specifies the name of the object whose mail is to be intercepted. filename: Specifies the physical path of the document that is requested to be added as a mail attachment.

• AddConstantPositionToEmailObject(string, string)

Definition: Used to add a position to the informational object. Notification is sent to people who have the added position code. Declaration: public void AddConstantPositionToEmailObject(string objectName, string positionCode) Parameters: objectName: Specifies the name of the informational object to insert. positionCode: Specifies the code of the position to add to the group.

• AddConstantPositionToGroup(string, string)

Definition: Used to add a position to a group object. Declaration: public void AddConstantPositionToGroup(string objectName, string positionCode) Parameters: objectName: Specifies the name of the group object to add. positionCode: Specifies the code of the position to add to the group.

• AddConstantUserToGroup(string, string)

Definition: Used to add users to the group object. Declaration: public void AddConstantUserToGroup(string objectName, string userCode) Parameters: objectName: Specifies the name of the group object to add. userCode: Specifies the code (registration number) of the user to add to the group.

• AddDepartmentProfessionToGroup(string, string, string)

Description: Allows people with the desired title in the desired deparmon to be added to the position group object. Declaration: public void AddDepartmentProfessionToGroup(string objectName, string department, string profession) Parameters: objectName: Specifies the name of the group object to add. department: Specifies the business unit code to add to the group. profession: Specifies the title code of the people to add to the group.

Example: AddDepartmentProfessionToGroup("Group1","G4","T1").

Users with title code T1 in department G4 were added to Group1.

• AddDocumentToObject(string, string, string, bool, int, bool)

Definition: To add a document to a position or group object.
Declaration: public void AddDocumentToObject(string objectName, string documentObjectName, string viewName, bool editable, int signStatus, bool showEvents) Parameters: objectName: Specifies the name of the group or position object to insert. documentObjectName: The name of the document to be inserted. viewName: The view name of the document to be inserted. editable: The parameter that allows the position(s) to display to be able to edit or just view the document. If True, the user can make changes to the document. If it is false, it can only view, not make changes. signStatus: Specifies the digital signature status of the document to be added. The situations are as follows.

 Parameter value=1 and Definition=None: The document indicates that no digital signature is defined.  Parameter value=1 and Definition Optional: Specifies that digital signing is optional.  Parameter value=1 and Definition Required: Indicates that digital signing is mandatory.  Parameter value=1 and Definition RequiredIfPossible: Specifies that it is mandatory if the user has a digital signature defined on the system. showEvents: It is the parameter that determines the visibility of the events when the document is displayed. If the value is sent false, the user cannot view the event buttons while viewing the document. It is necessary to switch to the flow tab to view and perform operations on the flow.
• AddFlowInitiatorToEmailObject(string)

Description: Adds the user who initiated the flow to the computation object. Declaration: public void AddFlowInitiatorToEmailObject(string objectName) Parameters: objectName: Specifies the name of the information object to insert.

• AddFlowInitiatorToGroup(string)

Description: Adds the user who started the flow to the group. Declaration: public void AddFlowInitiatorToGroup(string objectName) Parameters: objectName: Specifies the name of the group object to add.

• AddUserGroupToGroup(string,string)

Definition: Adds users from one group to the other group. Declaration: public void AddUserGroupToGroup(string objectName, string groupName) Parameters:
objectName: Specifies the name of the group object to add. groupName: Specifies the group name to add to the group.

• AddVariablePositionToGroup(string,string)

Definition: Adds the user defined in the Position object to the group. Declaration: public void AddVariablePositionToEmailObject(string objectName, string positionObject) Parameters: objectName: Specifies the name of the group object to add. positionObject: Specifies the position object to which the person to be added to the group is assigned.

• ClearAttachments(string)

Definition: Allows the removal of attachments added to mails to position and position group objects during flow operations.
Declaration: public void ClearAttachments(string objectName) Parameters: objectName: Specifies the name of the object from which the attachment will be removed.

Important note The ClearAttachments operation can be performed on objects that are not yet in the order of processing. For example, if the attachments in position1's mail are to be cleared, the flow steps should not have reached position1 yet. Otherwise, the plug-ins are sent.

• ClearEmailObject(string)

Definition: Allows the removal of attachments of e-mails to information objects during flow operations.
Declaration: public void ClearEmailObject(string objectName) Parameters: objectName: Specifies the name of the object from which the attachment will be removed.

• ClearGroup(string)

Description: Deletes all users added to the group object. Declaration: public void ClearGroup(string objectName) Parameters objectName: Specifies the group object in which to delete users.

• CreateDatabaseConnection

Definition: Provides a connection to the database defined in the eBA system. Whichever database system is used, the connection can be cast to it and encoding. Declaration: public System.Data.Common.DbConnection CreateDatabaseConnection() Example: In an eBA system using the mssql database structure, the connection can be established and cast as follows. SqlConnection con = (SqlConnection)CreateDatabaseConnection(); In all subsequent transactions, the codes used in database transactions are used on the .net side. Con. Open(); Try { SqlCommand dbcmd=new SqlCommand(@"UPDATE E_MyProject_Form" SET Text1=@Text1, Text2=@Text2 WHERE ID=@DOCID", con);

dbcmd. Parameters.Add(new SqlParameter("@Text1", Text1.Text)); } finally { Con. Close(); } • CreateDatabaseProvider

Definition: Database operations can be performed by providing a connection to the database defined in the eBA system. Coding can be done regardless of the type of database system used (oracle, mssql). Declaration: public eBADB.eBADBProvider CreateDatabaseProvider() Example: eBADBProvider db = CreateDatabaseProvider(); try { .db. Open(); DbDataAdapter = db. CreateDataAdapter(query +
Doc1.ProfileId); DataTable returnValue = new DataTable(); also. Fill(returnValue); return returnValue; } catch (Exception ex) { throw new Exception("Error : " + ex. Message); } finally { .db. Close(); }

• CreateServerConnection

Description: Creates a link to the eBAConnection class in the eBAPI library to use the functions of the eBA system. Detailed information about eBAConnection can be found in section 6.1 eBAPI.eBAConnection.
Declaration: public eBAPI.Connection.eBAConnection CreateServerConnection() void Dispose() Definition: Allows any open database connections to be closed. Used when the code operations are complete. Its use is important for system performance. Declaration: public void Dispose()

• string FormatMessage(string,bool)

Description: Returns a new string by formatting the sent string parameter as an eBA mail. If there are dynamic contents sent in the e-mail in the string, they are parse into the method. Declaration: public string FormatMessage(string message, bool isHtml) Parameters message: Specifies the text that is requested to be parse. isHtml: Specifies whether the string returned from the method will be in html format. Example:

string message="```<```?=ProcessId```>``` The purchase process has been approved, the invoice is worth ```<```?=DevariableName.Value```>``` TL."; string parsedMessage= FormatMessage(message,true); 

Output: parsedMessage=122 The purchase process has been approved, the invoice is worth $4,450.

• GetFlowObjectValue(string)

Definition: Returns the value of the object property sent as a parameter. Declaration: public string GetFlowObjectValue(string objectName) Parameters objectName: The value of the requested property is sent.

Example: String result1= GetFlowObjectValue("VariableName.Value"); VariableName: Refers to the name of the variable object. String result22= GetFlowObjectValue("PositionObject.UserId");
Output: result1=123 //value of the variablename object Result2=admin //Code of the user assigned to the position object

• GetHideFlowStarter

Description: Returns whether the initiator of the stream is hidden in the stream history. Declaration: public bool GetHideFlowStarter()

• GetHistoryCounter

Definition: Returns the number of processes that have been started so far for the process being processed. Declaration: public int GetHistoryCounter()

• Getid

Description: Returns the process number of the initiated process. Declaration: public int Getid()

• GetLogonDelegate

Definition: Returns information about whether another user has been impersonated or not. Declaration: public bool GetLogonDelegated()

• GetLogonDelegationPosition

Definition: Returns the position code of the user who impersonated another user and made the transaction. Declaration: public string GetLogonDelegationPosition()

• GetLogonPosition

Definition: Returns the position code of the user who is logged into the system. Declaration: public string GetLogonPosition()

• GetLogonUser

Definition: Returns the code (registration number) of the user who is logged in to the system. Declaration: public string GetLogonUser()

• GetPositionObjectDepartment(string)

Definition: Returns the department code of the user defined in the position object sent as a parameter. Declaration: public string GetPositionObjectDepartment(string objectName) Parameters: objectName: The name of the position object for which the department code is requested. Example:
string code= GetFlowObjectValue(GetPositionObjectDepartment("Position2"). ToString()) ; Output: Code=G1 //The department code of the user named Joe Doğru, defined in the Position2 object.

• GetPositionObjectEmail(string)

Definition: Returns the email of the user defined in the position object sent as a parameter. Declaration: public string GetPositionObjectEmail(string objectName) Parameters: objectName: The name of the position object for which the email information is requested

• GetPositionObjectFirstname(string)

Definition: Returns the name of the user defined on the position object sent as a parameter. Declaration: public string GetPositionObjectFirstname(string objectName) Parameters: objectName: The name of the position object for which the name information is requested

• GetPositionObjectLastname(string)

Definition: Returns the last name of the user defined in the position object sent as a parameter. Declaration: public string GetPositionObjectLastname(string objectName) Parameters: objectName: The last name is the name of the position object for which the last name is requested

• GetPositionObjectProfession(string)

Definition: Returns the title code of the user defined on the position object sent as a parameter. Declaration: public string GetPositionObjectProfession(string objectName) Parameters: objectName: The name of the position object for which title information is requested

• GetPositionObjectUserId(string)

Definition: Returns the code information (registration number) of the user defined on the position object sent as a parameter. Declaration: public string GetPositionObjectUserId(string objectName) Parameters: objectName: The name of the position object for which user code information is requested

• GetProcess

Description: Returns the name information of the initiated process. Declaration: public string GetProcess()

• GetProcessId

Description: Returns the number (sueç id) of the process initiated. Declaration: public int GetProcessId() • GetProject

Definition: Returns the name of the project in which the initiated process is defined. Declaration: public string GetProject()

• GetPublicValue(string)

Definition: Returns the value of a globally assigned variable. Declaration: public string GetPublicValue(string name) Parameters name: Specifies the name of the variable object.

Important Note The variable that is defined as a parameter must be assigned globally. Otherwise, the application will issue a warning during the execution of the code. To set a variable globally

  1. Right-click the variable object.
  2. Click Properties.
  3. Select the connection tab from the screen that opens.
  4. Check the General option.
  5. Click the OK button.

• GetUserId

Definition: Returns the code (registration number) of the user who is logged in to the system. Declaration: public string GetUserId()

• GetUserLanguage

Description: Returns the language that the user selects when logging into the system. Declaration: public string GetUserLanguage()

• HasMethod(string)

Definition: Returns the result of whether the method sent as a parameter is in the server code of the stream. Declaration: public bool HasMethod(string methodname) Parameters Methodname: Specifies the name of the method whose presence is being queried.

• Log(string)

Definition: Writes the sent parameter to the system as a log. When the log is added to the system, the date and process information are written in detail. To access the written logs, the system manager tool is run, the event viewer is clicked from the left menu. Workflow Process Custom is selected as the application name. Declaration: public void Log(string messageText) Parameters messageText: Specifies the text to be logged.

• SetFlowObjectValue(string,string)

Definition: Used to assign a value to an object property. Declaration: public void SetFlowObjectValue(string objectName, string value) Parameters objectName: Specifies the property of the object to which the value is to be assigned. value: Specifies the value to assign to the object property.

Example: SetFlowObjectValue("PositionObject.Position", "PG001"); PG001 is a position code defined in the organizational structure.

• SetHideFlowStarter(bool)

Description: Used to hide or display user information in the stream history of the stream initiator. To hide, the parameter must be true, and to display it, it must be false. By default, who started the stream is shown in the flow history. Declaration: public void SetHideFlowStarter(bool Value)

• SetPublicValue(string,string)

Definition: Performs the operation of assigning a value to the variable object sent as a parameter. Declaration: public void SetPublicValue(string name, string value) Parameters name: Specifies the name of the variable object. value: Specifies the value to assign to the variable object.

4.1.3. Events

• OnSessionStart

Definition: An event that runs at the moment the process starts. When the flow form is selected, it appears in the code navigator. In the code navigator, by double-clicking on the corresponding event, the method, automatic, is created that will run when the event is triggered on the server code side of the flow. The desired operations are written into the resulting method.

• OnSessionEnd

Definition: An event that runs when the process ends. When the flow form is selected, it appears in the code navigator. In the code navigator, by double-clicking on the corresponding event, the method that will run when the event is triggered on the server code side of the flow is created, automatically. The desired operations are written into the resulting method.

• OnSessionError

Definition: An event that runs when a process fails. When the flow form is selected, it appears in the code navigator. In the code navigator, by double-clicking the corresponding event, the method, automatic, is created that will run when the event is triggered on the server code side of the flow. The desired operations are written into the resulting method.

4.2. Position

The position object represents the user action steps that take place in the flow. The position object is of class "eBAFlowScrAdp.Objects.FlowPosition".

4.2.1. Properties

• AutoOpenApproval

Definition: According to the designed workflow scenario, after the user advances the flow in their approval, the flow can come back to the same user in later steps. In these cases, if AutoOpenApproval is set to Yes; In front of this user, instead of the flow history, the document is opened directly. If AutoOpenApproval is assigned as No; First, the flow history opens. If AutoOpenApproval is set as the Default; It works the same way as assigning Yes. Type: eBAFlowScrAdp.AutoOpenApprovalType Declaration: public eBAFlowScrAdp.AutoOpenApprovalType AutoOpenApproval { set; get; } Example:
PositionObject.AutoOpenApproval=AutoOpenApprovalType.Yes; PositionObject.AutoOpenApproval=AutoOpenApprovalType.No; PositionObject.AutoOpenApproval=AutoOpenApprovalType.Default;

• Department

Definition: The department information of the user assigned to the Position object. Type: System.String Declaration: public string Department { get; }

• Description

Definition: The Definition information of the Position object. Type: System.String Declaration: public string Description { set; get; }

• Documents

Description: Feature used to add documents to a position Type: eBAFlowScrAdp.Objects.FlowDocuments Declaration: public eBAFlowScrAdp.Objects.FlowDocuments Documents { get; } •Email

Definition: The email information of the user assigned to the Position object. Type: Sytem.String Declaration: public string Email { get; }

• EventFormId

Description: If event form is defined on events assigned to the position object, the event last displayed by this object is the id of the form. Type: System.Int32 Declaration: public int EventFormId { get; }

• Firstname

Definition: The name information of the user assigned to the position object. Type: System.String Declaration: string Firstname { get; }

• HasEventFormId

Definition: If any eventform is defined to the events of the position object; This information will return true. Type: System.Boolean Declaration: public bool HasEventFormId { get; }

• HasRequestId

Description: Has the position taken action information "Returns false if the position object where the property is used has not yet taken action, or true if it has acted." Type: System.Boolean Declaration: public bool HasRequestId{ get; }

• Lastname

Definition: The last name of the user assigned to the Position object. Type: System.String Declaration: public string Lastname { get; }

• Position

Definition: The position code information of the user assigned to the position object. Type: System.String Declaration: public string Position { set; get; }

• Profession

Definition: The title code information of the user assigned to the position object. Type: System.String Declaration: public string Profession { get; }

• RequestId

Description: Specifies each request number in the process. To find out the event ID information of the events and make changes

  1. Right-click the flow form.
  2. Select Properties.
  3. Click the Events tab. On the screen that opens, what is in the 'event' column is the requestid information of the events in the 'Description' column.
    Type: System.Int32 Declaration: public int RequestId { get; }

• SendMail

Definition: When the flow reaches the step where the corresponding position object is located, if the user assigned to the position object is asked to go to the mail; This value must be set to true. The default value is true. Type:System.Boolean Declaration: public bool SendMail { set; get; }

• User

Definition: Returns the user ID (registration number) of the user assigned to the position object. Type: System.String Declaration: public string User { set; get; }

• Username

Description: Returns the first and last name of the user assigned to the position object. Type: System.String Declaration: public string Username { get; }

4.2.2. Methods

• AddAttachment(string)

Description: When the flow reaches the step where the position object is located, it is used to add a plug-in to the mail that will go to the user assigned to the position object.
Declaration: public void AddAttachment(string filename) Parameters:
filename: Specifies the physical path of the document that is requested to be added as a mail attachment.

• ClearAttachments

Definition: Allows deleting attachments in the e-mail of the position object. Declaration: public void ClearAttachments()

• GetUser

Definition: Used to get the user ID (registration number) of the user assigned to the position object. Declaration: public string GetUser()

• SetEventEnable(int,bool)

Definition: It is the method by which it can be set whether an event owned by the position will appear according to the situation. Declaration: public void SetEventEnable(int eventId, bool enable) Parameters: eventId: The id number of the event that the position has enable: The state of whether the event appears or not. true is event visible, false is not visible

• SetFromPosition(string)

Definition: Used to assign a position to a position object. Declaration: public void SetFromPosition(string id) Parameters: id: Specifies the position code.

• SetFromUser(string)

Definition: Used to assign users to the Position object. Declaration: public void SetFromUser(string id) Parameters: id: Specifies the user code (registration number).

4.2.3. Events

• OnAfterEvent(object, OnAfterEventArguments)

Description: It works after the user clicks on any event button. When the position object on the flow form is selected, it appears in the code navigator. In the code navigator, the corresponding event is double-clicked. On the server code side of the flow, the method that will run when the event is triggered is automatically created. The desired operations are written into the resulting method. Declaration: public void Pozisyon2_OnAfterEvent(object sender,OnAfterEventArguments args) Parameters: args: Derives from the OnAfterEventArguments class. The class contains the following properties as accessible.

• OnBeforeEvent(object, OnBeforeEventArguments)

Definition: The person in the position is the event that runs just before taking action. Declaration: public void Pozisyon2_OnBeforeEvent(object sender,OnBeforeEventArguments args) Parameters: args: Event parameters. It has the same parameters as OnAfterEventArguments.

4.2.4. OnAfterEventArguments Properties

• ActionerType

Definition: Specifies that the user who performed the event is acting by proxy, by his own user, or on behalf of another user. Type: eBAFlowScrAdp.ActionerTypes Enum type. The defined values are as follows.  As: This value is used if the operation is performed by substituting.  Delegated: This value is used if the proxy is performed.  Self: This value is used if the transaction is made with its own user. Declaration: public eBAFlowScrAdp.ActionerTypes ActionerType { set; get; }

• ActionerUserId

Definition: Specifies the user code information of the user who performed the operation. This information is the information of the actual trading user. The user provides the transacting user information, even if the user is trading by proxy or on behalf of another user. Type: System.String Declaration: public string ActionerUserId { set; get; }

• EventCode

Description: Event id information can be accessed with this property. The event that the user performs can be controlled. The description of the event id can be found in the RequestId heading 2.1.Properties. Type: System.Int32 Declaration: public int EventCode { set; get; }

• EventFormId

Description: During flow design, an incident form can be added to user-owned event options. That way, when the user selects any of these events, they can view that form. The id information of the displayed form can be accessed through the EventFormId property. Type: System.Int32 Declaration: public int EventFormId { set; get; }

• ObjectName

Definition: Returns the name of the position object being traded. It is the name given to the position object during design. Type: System. String Declaration: public string ObjectName { set; get; }

• PositionId

Description: Specifies the position code information of the user assigned to the position object. The value of the ActionerType is not important. Type: System.String Declaration: public string PositionId { set; get; }

• Reason

Description: During design, if the reason option is checked in the events defined to the user, when the user clicks this event button, a screen is displayed where the user can enter the reason information. The Reason property specifies the reason information that the user provided. Type:Sytem.String Declaration: public string Reason { set; get; }

• UserId

Description: Specifies the user ID (registration number) of the user assigned to the position object. The value of the ActionerType is not important. Type: System.String Declaration: public string UserId { set; get; }

4.3. Start of Flow

The flow start object is the object that specifies the starting point of the flow of the designed process. This object should be at the top of every flow design. Other objects to be used in the flow design are ordered after this flow start object and relate to each other with the connection object. Only 1 in-stream object is allowed on a flow screen. The Start Flow object is of class "eBAFlowScrAdp.Objects.FlowStart"

4.3.1. Properties

• Description

Description: The header of the start stream object Type: System.String Declaration: public string Description { get; set; }

• HasRequestId

Definition: Whether the object has a request id or not Type: System.Boolean Declaration: public bool HasRequestId { get; }

• RequestId

Definition: Request id value Type: System.Integer Declaration: public int RequestId { get; }

4.4. End Stream

The flow end object is the object that specifies the step at which the flow of the designed process ends. In a flow design, this object is used in many places where the end of the flow is desired.

The Flow End object is of class "eBAFlowScrAdp.Objects.FlowEnd".

4.4.1. Properties

• SetFlowDeleted

Definition: The value of whether the system state of the process passing through the end-flow object should be set to "deleted" or not Type: System.Boolean Declaration: public bool SetFlowDeleted { get; set; }

• UpdateStatusAsFinished

Definition: The value of whether the state of the process passing through the end-flow object in the system should be set to "finished" or not Type: System.Boolean Declaration: public bool UpdateStatusAsFinished { get; set; }

4.5. Stream Initiator

The Flow Initiator object is the flow object that represents the person who started the process when a process is started from the web interface or by code. The properties, events, and methods that the stream initiator object has are the same as those of the normal position object. The property of the Flow Initiator object is that it represents the person who owns the work, who initiated the process by the system.

When a project is created in the development interface, the default flow diagram that comes in the flow design part of that project has 1 "Flow Initiator" object. For detailed descriptions of the properties, events, and methods that the object that initiates the flow has; See the position document.

Important Note: Although the initiator object of the flow has the same properties, events, and methods as the position object, there are structural differences between them. If the initiator object of the stream is not mailed by the system and the object that starts the flow is checked in the flow, this process falls on the Drafts, not the Approvals of the person who started the flow.

Important Note: The object that starts the stream should only be used once at the beginning of the stream. If, after that, the process needs to go back to the initiator of the flow, or if the process steps will go back to the person who started the flow, the Position object should be placed in the corresponding step, not the Flow Initiator object, and "Flow Initiator" should be selected as the value in the position object.

4.6. Group

A position group object is an object that is used when multiple people want to be subjected to actions in flow steps. While only one user or position can be added to the position object, multiple users, positions, user groups, departments, or title-based users can be added to the position group object. The Position Group object is of class "eBAFlowScrAdp.Objects.FlowGroup".

4.6.1. Properties

• AutoOpenApproval

Definition: According to the designed workflow scenario, after the user advances the flow in their approval, the flow can come back to the same user in later steps. In these cases, if AutoOpenApproval is set to Yes, the user displays the document directly instead of the flow history. If AutoOpenApproval No is assigned, the flow history is opened first. If AutoOpenApproval is assigned to Default, it works the same way as Assigning Yes. Type: eBAFlowScrAdp.AutoOpenApprovalType (enum type) Declaration: public eBAFlowScrAdp.AutoOpenApprovalType AutoOpenApproval { set; get; }

Example:
PositionGroupObject.AutoOpenApproval=AutoOpenApprovalType.Yes; PositionGroupObject.AutoOpenApproval=AutoOpenApprovalType.No; PositionGroupObject.AutoOpenApproval=AutoOpenApprovalType.Default;

• Description

Definition: Specifies the Description of the Position Group object. Type: System.String Declaration: public string Description { set; get; }

• Documents

Description: Attribute used to add documents to the position group Type: eBAFlowScrAdp.Objects.FlowDocuments Declaration: public eBAFlowScrAdp.Objects.FlowDocuments Documents { get; }

• EventFormId

Definition: For events assigned to the Position Group object, the event last displayed by this object specifies the id of the form, if event form is defined. If more than one user has performed an operation on the group object, it returns only the request id of the last operation. Type: System.Int32 Declaration: public int EventFormId { get; }

• EventFormIdList

Definition: If there is more than one user in the group, returns the event form IDs of all users, in a list.

Type: System.Collections.Generic.List```<```int```>```
Declaration: public System.Collections.Generic.List```<```int```>``` EventFormIdList { get; }

• HasEventFormId

Definition: If any event form is defined on the events of the Position Group object, this information will return true. Type: System.Boolean Declaration: public bool HasEventFormId { get; }

• RequestId

Description: Each request number in the process. Type: System.Int32 Declaration: public int RequestId { get; }

• RequestIdList

Definition: If there is more than one user in the Position Group object, it returns the request id information of the actions performed by all users, in a list.

Type: System.Collections.Generic.List```<```int```>``` 
Declaration: public System.Collections.Generic.List```<```int```>``` RequestIdList { get; }

• SendMail

Definition: Whether to send an action email to people in the group Type: System.Boolean Declaration: public bool SendMail { get; set; }

4.6.2. Methods

• AddAttachment(string)

Description: When the flow reaches the step where the position group object is located, it is used to add a plug-in to the mail that will go to the user assigned to the position object.
Declaration: public void AddAttachment(string filename) Parameters:
filename: Specifies the physical path of the document that is requested to be added as a mail attachment.

• ClearAttachments

Description: Allows deleting attachments in the e-mail of the position group object. Declaration: public void ClearAttachments()

• AddConstantPosition(string)

Definition: Allows a fixed position to be added to the position group object. Declaration: public void AddConstantPosition(string positionCode) Parameters: positionCode: Specifies the position code information of the user to be added to the group.

• AddConstantUser(string)

Definition: Allows a fixed user to be added to the position group object. Declaration: public void AddConstantUser(string userCode) Parameters: userCode: Specifies the user code (registration number) of the user to be added to the group.

• AddDepartmentProfession(string,string)

Definition: Allows the addition of users with the desired title in the desired department to the position group object. Declaration: public void AddDepartmentProfession(string department, string profession) Parameters: deparment: Specifies the department code of the user to add to the group. profession: Specifies the title code of the users to add to the group.

• AddFlowInitiator

Description: Adds the user who initiated the flow to the position group object. Declaration: public void AddFlowInitiator()

• AddUserGroup (string)

Definition: The method that adds user groups created in the system to the position group object in the flow. Declaration: public void AddUserGroup(string groupName) Parameter: groupName: The name of the user group that is desired to be added to the position group object

• AddVariablePosition(string)

Description: Adds the user assigned to the position object, which is sent as a parameter to the position group object. Declaration: public void AddVariablePosition(string positionObject) Parameter: positionObject: Specifies the name of the position object to add to the group.

• ClearAttachments

Definition: A method that cleans up files added to a group. Declaration: public void ClearAttachments()

• ClearGroup

Description: Deletes all users assigned to the position group object.
Declaration: public void ClearGroup() • SetEventEnable(int,bool)

Definition: It is the method by which it can be set whether an event owned by a position group will appear according to the situation. Declaration: public void SetEventEnable(int eventId, bool enable) Parameters: eventId: The id number of the event owned by the position group enable: The state of whether the event appears or not. true is event visible, false is not visible

4.6.3. Events

• OnAfterEvent

The required definitions for OnAfterEvent are described in the Position object. Because there can be more than one user in the position group object, OnAfterEvent works for each user operation in the group based on the information of the user who is performing the operation.

4.7. Information

An information object is an object used to send an information mail to the people defined in the system at any time in the process. The informational object is of class "eBAFlowScrAdp.Objects.FlowMail".

4.7.1. Properties

• Description

Description: The header value of the informational object Type: System.String Declaration: public string Description { set; get; }

• Documents

Definition: Attribute used to attach documents to the information object Type: eBAFlowScrAdp.Objects.FlowDocuments Declaration: public eBAFlowScrAdp.Objects.FlowDocuments Documents { get; }

4.7.2. Methods

• AddAttachment(string)

Definition: A method for attaching the file, given as a filename, to the corresponding informational object. Declaration: public void AddAttachment(string filename) Parameters:
filename: Specifies the physical path of the document that is requested to be added as a mail attachment.

• ClearAttachments

Definition: A method that cleans up files attached to an informational object. Declaration: public void ClearAttachments()

• AddConstantPosition(string)

Definition: A method for adding a position-based user to the notification object by giving the position id value as a parameter. Declaration: public void AddConstantPosition(string positionCode) Parameters: positionCode: Specifies the position code information of the user to be added to the information.

• AddConstantUser(string)

Definition: A method for adding a user to an information object by giving the user name value as a parameter. Declaration: public void AddConstantUser(string userCode) Parameters: userCode: Specifies the user code (registration number) of the user to be included in the notification.

• AddFlowInitiator

Definition: A method that adds the user who initiated the flow to the notification object. Declaration: public void AddFlowInitiator()

• AddVariablePosition(string)

Definition: A method for adding a position object in a flow to an information object. Finds whichever user or position is in the position object and adds it to the notification. Declaration: public void AddVariablePosition(string positionObject) Parameter: positionObject: Specifies the name of the position object to include in the information.

• ClearGroup

Definition: A method that clears the contents of an informational object. Declaration: public void ClearGroup()

4.8. Variable

A variable object is an object that allows some data on the flow side to be kept as a constant value and used in the flow design or code side. The value that this object will hold can also be set on the code side, it can also get its value from this field by binding to a field on the form. The variable object is of class "eBAFlowScrAdp.Objects.FlowVariable".

4.8.1. Properties

• Value

Definition: The string type value of the variable. Type: System.String Declaration: public string Value { get; set; } • ValueAsInteger

Definition: The integer-type value of the variable object Type: System.Integer Declaration: public int ValueAsInteger { get; set; }

4.9. Document

The object that holds the forms that are designed in the project and the information on the form. Document object, in the flow; position, position group, information, etc. are added as documents and the project form to which the document object is linked is displayed in the relevant step. In addition, by accessing the document object on the flow code side, code operations can be performed on the form to which the document object is connected. The document object is of class "eBAFlowScrAdp.Objects.FlowDocument".

4.9.1. Properties

• Path

Definition: The path information of the document in the eBA system. Type: System.String Declaration: public string Path { set; get; }

• ProfileData

Description: Feature used to access form data linked to the document object Type: eBAFormData.eBAForm Declaration: public eBAFormData.eBAForm ProfileData { get; }

• ProfileForm

Description: If an eBA form is defined to the document object, the ProfileForm is the name of this defined form. Type: System.String Declaration: public string ProfileForm { set; get; }

• ProfileId

Definition: The id of the eBA form defined to the document object. Type: System.Int32 Declaration: public int ProfileId { set; get; }

• ProfileProcess

Description: The name of the project where the document object is located. Type: System.String Declaration: public string ProfileProcess { set; get; }

4.10. Flow Stopper

The flow stopper object ensures that the flow remains at that step until the trigger is made with the code. As a result of the script trigger, the flow can be routed as desired according to the parameter value for which this object is triggered. When it is necessary to trigger another process with the code using the values in the current process at a certain point in the flow and when it is necessary to continue the current process according to the return value returned from this triggered process, the relevant flow can be triggered with the help of this object and the current process can be stopped until the value returns from that flow. However, when "Timeout" is selected as the triggering event of the flow stop object and the desired time for the flow to wait is entered, the timeout event can be run at the end of the specified time and the flow can continue by itself. This keeps the flow on hold for a certain period of time. The Flow Stop object is of class "eBAFlowScrAdp.Objects.FlowPauser".

4.10.1. Properties

• Description

Description: Header information of the flow stop object Type: System.String Declaration: public string Description { get; set; } • HasRequestId

Description: Information about whether the flow has progressed from the Flow Stop object "The Flow stop object where the property is used returns false if it has not yet taken action, or true if it has taken action." Type: System.Boolean Declaration: public bool HasRequestId { get; } • RequestId

Description: The id of the event in which the flow stop takes action Type: System.Integer Declaration: public int RequestId { get; }

4.10.2. Events

• OnAfterEvent(object, OnAfterEventArguments)

Description: An event that runs after a stopper object is triggered. Declaration: public void AkisDurdurucu1_OnAfterEvent(object sender,OnAfterEventArguments args) Parameters: args: Derives from the OnAfterEventArguments class.

4.11. Examples

4.11.1. Timeout value assignment

Timeout value assignment is the process of updating the time-out values of position and timer objects by finding the difference between the start and end dates.

Example: DateTime startDate = MBSNCDATE. Value; DateTime endDate = MBITISDATE. Value; TimeSpan ts = endDate - startDate; String hour= Math.Round(ts. TotalHours). ToString();

Assigning to a Timer object:

ebaflow. SetFlowObjectValue("Scheduler1.day", "0"); Scheduler1 is the name of the scheduler object ebaflow. SetFlowObjectValue("Timer1.hour", hour); ebaflow. SetFlowObjectValue("Scheduler1.minute","0");

Assign a time-out event to the defined position object:

ebaflow. SetFlowObjectValue("Position1.day", "0"); Position1 is the name of the position object. ebaflow. SetFlowObjectValue("Position1.hour", hour); ebaflow. SetFlowObjectValue("Position1.minute","0");

4.11.2. Changing the content of Mail

Updating the mail subject and content of the position object is shown in the following example. Example: ebaflow. SetFlowObjectValue("Position1.Subject", subject); ebaflow. SetFlowObjectValue("Position1.Text", content);

4.11.3. Assignment to Group Object

The following example illustrates the assignment of a list of approvers to a group object programmatically pulled from the form table. Example: FormTable tblReferences = frm. Tables["tblName"]; foreach(var row in tblReferences.Rows) { string userId = row["UserId"]. AsString; AddConstantUserToGroup("GroupName", userId); }