Click or drag to resize

RuntimeServiceCreateWorkflowApplication Method

Creates a workflow application. Intended for web use only.

Namespace:  Advantys.Workflow.Web.Services.Processes.Runtime
Assembly:  Advantys.Workflow.Web.Services.Processes.Runtime (in Advantys.Workflow.Web.Services.Processes.Runtime.dll) Version: 7.14.3.31327 (7.14.3.201812052)
Syntax
public int CreateWorkflowApplication(
	string applicationDefinition
)

Parameters

applicationDefinition
Type: SystemString
Definition of the application as a string. Element names are case sensitive.

Return Value

Type: Int32
The creadted application ID.
Remarks
Available since WorkflowGen version: 6.2.0

Optional Parameters.

These parameters can be used in the query string or as parameters of the Headers object in the RuntimeService class instance. See example below.

DefaultApp (bool)Sets this application as the default WorkflowGen application
ReplaceIfExists (bool)Sets whether or not to replace an application with the same name.
Sample workflow application definition:
XML
<Application>
  <Name>COMPLETEACTION</Name>
  <Description>Complete action</Description>
  <Type>ASSEMBLY</Type>
  <Method>CompleteActivityInstanceWithContext</Method>
  <Username>wfgen_admin</Username>
  <Password>password</Password>
  <Active>Y</Active>
  <Assembly>Advantys.Workflow.Web.Services.Processes.Runtime</Assembly>
  <Class>Advantys.Workflow.Web.Services.Processes.Runtime.RuntimeService</Class>
  <Parameters>
    <Parameter>
      <Name>REQUEST_ID</Name>
      <Description>Request identifier</Description>
      <DataType>NUMERIC</DataType>
      <Direction>IN</Direction>
      <Required>Y</Required>
      <Default>N</Default>
    </Parameter>
    <Parameter>
      <Name>ACTION_ID</Name>
      <Description>Action identifier</Description>
      <DataType>NUMERIC</DataType>
      <Direction>IN</Direction>
      <Required>N</Required>
      <Default>Y</Default>
    </Parameter>
    <Parameter>
      <Name>ACTION_NAME</Name>
      <Description>Action name</Description>
      <DataType>TEXT</DataType>
      <Direction>IN</Direction>
      <Required>N</Required>
      <Default>N</Default>
    </Parameter>
    <Parameter>
      <Name>IMPERSONATE_USERNAME</Name>
      <Description>Impersonate username</Description>
      <DataType>TEXT</DataType>
      <Direction>IN</Direction>
      <Required>N</Required>
      <Default>Y</Default>
    </Parameter>
  </Parameters>
</Application>
Sample code:
RuntimeServiceWebService.RuntimeService myRuntimeService = new RuntimeServiceWebService.RuntimeService();
RuntimeServiceWebService.WorkflowApplicationHeader myWorkflowApplicationHeader = new RuntimeServiceWebService.WorkflowApplicationHeader();
myRuntimeService.WorkflowApplicationHeaderValue = myWorkflowApplicationHeader;

myWorkflowApplicationHeader.ApplicationId = applicationId;
myWorkflowApplicationHeader.ReplaceIfExists = replaceIfExists;
myWorkflowApplicationHeader.DefaultApp = defaultApp;

string myWorkflowApplicationDefinition = myRuntimeService.GetWorkflowApplication(applicationName, null);

See Also