Scheduled Flow Triggering
At first, create an Integration Query through eBA System Manage and create an overload as follows, open the execute method of the function.
Fill in the function as follows
%SystemPath%\Common\eBAPI.dll
%SystemPath%\Common\eBAIntegrationAPI.dll
using eBAPI;
using eBAPI.DocumentManagement;
using eBAPI.Connection;
using System.Data;
using eBAIntegrationAPI;
public void FlowScript1_Execute()
{
eBAPI.Workflow.WorkflowProcess mgr = null;
Providing a connection to the server
eBAConnection con = CreateServerConnection();
Con. open();
eBAIntegrationQuery qry= new eBAIntegrationQuery("connectionName", "queryName");
qry. Parameters.Add("parameterName", UserId.Text); If there is a parameter
DataTable dt = qry. Execute(con);
foreach(DataRow dr in dt)
{
if(dr["Field"]. ToString() == "Test")
{
Con. Impersonate("huzzal", ImpersonationStatusType.Hidden); The person who performs the procedure with the impersonate can be set.
mgr = con. WorkflowManager.CreateProcess("akisTrigger"); The name of the flow that you want to trigger.
When streaming from the outside, parameters can be sent to the stream.
Mgr. Parameters.Add("prm1","value1"); variable1 is the variable object marked public in the stream
process. Parameters.Add(parameterName1,parameterValue1);
process. Parameters.Add(parameterName2,parameterValue2); Parameters can be duplicated.
Mgr. Parameters.Update();
Mgr. Start(); The stream is started
int pId = mgr. ProcessId; Initiated process id
}
}
Con. Close();
}
We design the flow to be triggered as follows and write the parameters that come with the function object on the form. In the triggering process, we send parameters to the variable objects on the flow side.
We can change the value of an object in the document by using the eBAForm Object in the function object. You can use the eBAForm Object in the following way.
eBAForm modal = new eBAForm(Document1.ProfileID);
Modal. fields["Field"]. AsString = "asdas";
Modal. Update();
You can control the operation of the system by scheduling the first flow created via eBA System Manager.