Call Business process

Dear Team,

                  Problem: business process not trigger from web service.

                  How to trigger business process in wcf web service.Please guid me how to trigger?

        Thanks in advance.

Regards,

Sekhar.

Like 0

Like

5 comments

Dear Sekhar,

Here is the example of how to start business process with parameter from server side code.

using Terrasoft.Core;

using Terrasoft.Core.Process;

using Terrasoft.Core.Process.Configuration;

 

ProcessSchema schema = UserConnection.ProcessSchemaManager.GetInstanceByName("LeadManagement");

//schema = UserConnection.ProcessSchemaManager.GetInstanceByUId(leadManagementProcessUId);

 

//different engines for interpretable and compiled BP

bool canUseFlowEngine = ProcessSchemaManager.GetCanUseFlowEngine(UserConnection, schema);

if(canUseFlowEngine) {

    var flowEngine = new FlowEngine(UserConnection);

    var param = new Dictionary<string, string>();

    param["LeadId"] = Entity.Id.ToString();

    flowEngine.RunProcess(schema, param);

} else {

    Process process = schema.CreateProcess(UserConnection);

    process.SetPropertyValue("LeadId", Entity.Id);

    process.Execute(UserConnection);

}   

Hope you will find it helpful.

Regards,

Anastasia

Anastasia Botezat,

Hi Anastasia. Your code illustrates how to call a BP by passing parameters. How would one go about reading BP parameters after the execution of the business process??

 

M Shrikanth,

 

Hello,

 

You've already created a thread here https://community.creatio.com/questions/read-business-process-parameter… so we will discuss this topic there.

 

Best regards,

Oscar

Anastasia Botezat,



Hello,



Is the method async or not?

I just run a test and it did not wait for the result.



Best regards,

Solem A.

Solem Khan Abdusalam,

 

Hello,

 

This is a synchronous call, also tested out-of-the-box by calling a process with 10 000 repetitions of data reading in a cycle.

Show all comments