EBA WEB SERVICE START-CONTINUE
1. Information
It is necessary to add a web service link to the external application as a web reference
-->
http://localhost/eba.net/ws/ebawsapi.asmx
**The user who will make the transaction must have the following authorization.
-- sysHiddenImpersonation -- sysImpersonation
** Request id for
select * from FLOWREQUESTS Where PROCESSID='1465'
It is necessary to get the last value of the ID value returned from the query.
2. Flow Side
We add 2 variables to the flow side. 1 of them will receive the formid (form will be created in the external application) 2.ci will be the variable that holds the value that will indicate that the process starts externally.
In the flow, routing will be made according to the comparison object. I'm sharing the image.
3. WebService C# Code
Namespace external_EBA_Project
{
internal class Program
{
static void Main(string[] args)
{
EbaProjeService projeService = new EbaProjeService();
projectService.EbaStartProcess("Ext_EbaProject");
projectService.EbaContinueProject(1465, 3, 5, "External Process continued");
}
}
public class EbaProjeService
{
eBAWSAPI ebaservice = new eBAWSAPI();
public string ebauser { get; set; } = "admin";
public string ebapass { get; set; } = "0";
public string ebatargetuser { get; set; } = "admin";
public string ebalanguage { get; set; } = "Turkish";
public void EbaStartProcess(string projename) //Ext_EbaProject
{
We create a form...
CreateFormParameters createForm = new CreateFormParameters();
createForm.Form = "Form";
createForm.Process = projectname;
var resultform = ebaservice. CreateForm(ebauser, ebapass, ebatargetuser, ebalanguage, createForm);
We send parameters to the flow side.
WorkflowStartParameters startParameters = new WorkflowStartParameters();
List```<```WorkflowParameter```>``` parameters = new List```<```WorkflowParameter```>```();
parameters. Add(new WorkflowParameter()
{
Name = "vStatus",
Value = "1"
});
parameters. Add(new WorkflowParameter()
{
Name = "vdocid",
Value = resultform. DocumentId.ToString()
});
startParameters.Process = projectname;
startParameters.ProcessParameters = parameters. ToArray();
We trigger the process with startprocess.
var result = ebaservice. StartProcess(ebauser, ebapass, ebatargetuser, ebalanguage, startParameters);
}
public void EbaContinueProject(int surecid,int requestid, int eventid,string reason)
{
WorkflowContinueParameters wfContinueParameters = new WorkflowContinueParameters();
wfContinueParameters.ProcessId = processID;
wfContinueParameters.RequestId = requestid;
wfContinueParameters.ReturnValue = eventid; The event id of the position is normally 5 - 6
wfContinueParameters.Reason = reason;
ebaservice. ContinueProcess(ebauser, ebapass, ebatargetuser, ebalanguage, wfContinueParameters);
}
}
}