This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.
The aim of this article is to give an example xml about how to start a workflow from a web service call.
Before You Begin
You must be familiar with the following:
In this example we start an instance of a workflow using WCF call, and using SoapUi. The workflow has some dependant datafield(s) values and thus needs data assigned to these datafield(s) when the workflow instance is started.
The sample workflow assigns a task to a user specified on a datafield "UserToAssignTask".
The XML needs to be in the following structure:
In the example above, notice that the ProcessInstance xml is only closed after datafield(s) have been assigned values, not before. If it is closed before, the workflow will start but with no DataFields values, and as a result a workflow go into an "Error" state.
Below is an example of the malformed xml.