Start a workflow automotically - no user intervention - dashboarding

  • 12 February 2014
  • 2 replies
  • 0 views

Badge +1

Hi,


The client wants to use K2 for visualization/dashboard purposes, just want to visualize better the outcomes of the current process.


I don't know if below 2 approaches are feasible or if there are another approaches better to do this, the purpose of using K2 is to show the user the benefits of it and possibly they could use K2 for future work


 


    -Run workflow process automatically based on the content of a given file which at the top of my head it says that it can be done programmatically.


    -Populate directly k2 database entities in a very straightforward way, storing data such as step 1 consisted of these attributes, then step 2 with these another attributes. I mean, store data directly avoiding simulating steps.


Thanks,


Julio


2 replies

Badge +1

Absolutely. In C#, use the following:

 

using SourceCode.Workflow.Client;

 

public class WorkFlowTest

{

  StartProcess(FormType form)

  {

     _WFServer = new Connection();

     _WFServer.Open(new ConnectionSetup { ConnectionString = Properties.Settings.Default.WorkflowServerConnectionString });

 

     ProcessInstance newProcess = this._WFServer.CreateProcessInstance("processName");

     newProcess.Folio = "My folio";

     _WFServer.StartProcessInstance(newProcess);    

         _WFServer.Dispose()

 

  }

}

}

 

Badge +1

Hi! yeap!

 

this material 300.NRT-K2_Workflow_APIs_and_Services-Runtime.pdf is the one that indicates how to interact with WFs through the API.

Reply